بنقرة واحدة
spec
Use when the user prompts "write spec" or "make spec".
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when the user prompts "write spec" or "make spec".
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when the user prompts "code doc" to create or update internal Orchid ORM code documentation from changes/ specs, short-code feature folders, or existing implementation code.
Use when the user prompts "implementation note" for an existing change idea.
Use when the user prompts "do task".
Use when the user prompts "changeset".
Use when the user prompts "write ideas" or "make ideas".
Use when the user prompts "refine design".
| name | spec |
| description | Use when the user prompts "write spec" or "make spec". |
Ignore other spec-writing or brainstorming skills.
Create or update exactly:
changes/<feature-name>/<NUMBER-idea-name>/spec.mdchanges/<feature-name>/<NUMBER-idea-name>/tasks.mdThis is a design-completion command, not research-only and not implementation.
The prompt should identify:
changes/selected-variant.md nor an ideas.md section appliesExamples:
/spec 611-row-level-security-integration 2/spec row-level-security-integration "Run work inside an explicit RLS context"Resolve one authoritative requirements baseline, in this order:
changes/<feature-name>/<NUMBER-idea-name>/selected-variant.md, when it exists.<number>, the exact # <number> section in changes/<feature-name>/ideas.md.The baseline is the source of truth for goals, scope, examples, naming, constraints, trade-offs, and confirmed decisions. Fill gaps needed for a complete design, but do not contradict it. If selected-variant.md has ## Refinement, treat confirmed Q&A there as current intent; when it conflicts with the main body, the refinement wins.
If the winning baseline is missing or too thin to define user-visible requirements without inventing the feature, stop and ask one focused question.
changes/.
changes/<feature-name>/<NUMBER-idea-name>.ideas.md must contain the exact # <number> section.selected-variant.md or ideas.md.changes/<feature-name>/research.md exists, read it after the baseline.
docs/src/.vitepress/dist/llms.txt for Orchid API naming, user-facing patterns, and natural extension points.guidelines/code.md or guidelines/test.md, plus nested guidelines/code.md or guidelines/test.md files for directories likely to change.src/index.ts; downstream internal pqb access goes through pqb/internal.Use the baseline, optional research, docs, and code reality together.
The design must:
## Assumptions only when the baseline leaves a real gapThe design must not:
spec.mdOutput path: changes/<feature-name>/<NUMBER-idea-name>/spec.md
If it exists, read it first, preserve still-correct content, remove stale content, and reconcile it with the current baseline and codebase. Do not append duplicates.
Use this shape. No top-level title.
## Summary
<Short, concrete description of what to implement.>
```ts
<Code example for the new public API or workflow.>
```
## What Changes
- <Concise proposed change.>
- <Another proposed change.>
## Assumptions
- <Important behavioral or scope decision needed because the baseline left a real gap.>
## Capabilities
- `capability-id`: <Standalone responsibility this code addition provides.>
- `another-capability`: <Another standalone responsibility, only when needed.>
<If the idea only extends existing surfaces and adds no standalone capability, say so explicitly.>
## Detailed Design
### Public API
<Define the public surface and semantics, not implementation.>
```ts
<Optional short type or interface snippet.>
```
- <Rule, guarantee, or invariant.>
### Shared State or Data Shape
<Only if shared state, normalized options, or a cross-cutting data shape matters.>
### Integration and Lifecycle
<Where behavior plugs into existing Orchid flows.>
### <Package-Specific or Responsibility-Specific Behavior>
<Only when one package, adapter, or subsystem needs materially different behavior.>
### Error Handling and Limits
- <Contract-level failure mode, guarantee, or limit.>
### Documentation
<Only gotchas or unobvious user-facing edge cases. Do not state that public API must be documented.>
spec.md requirements:
Summary says what to build and includes enough examples to make every new public API/workflow unambiguous.What Changes is short, targeted, and complete.Assumptions appears before Capabilities and only when materially important; omit it otherwise. Do not list naming choices or minor API-shape preferences.Capabilities appears before Detailed Design. Do not mirror the idea name mechanically, invent placeholders, or hide separate responsibilities inside one umbrella capability.role, set-config, or dynamic-query-session.Detailed Design is responsibility-centered, concrete, and complete, but not an implementation plan. Use only needed sections.Guidelines section.Capability examples:
role switching and set-config support, prefer separate role and set-config capabilities unless one real responsibility covers both.dynamic-query-session.tasks.mdOutput path: changes/<feature-name>/<NUMBER-idea-name>/tasks.md
If it exists, read it first, preserve still-correct tasks, remove stale tasks, and reconcile it with final spec.md.
The file must start with this section before any package or docs work:
## 0. read spec.md and guidelines
- 0.1 Read `spec.md`, including `spec.md` `## Detailed Design`, before starting any later task. Follow that design for every later task, and make sure the final implementation matches it exactly.
- 0.2 Check whether any later task you were prompted to do requires coding. If yes, read and follow every guideline below for that work, and verify that all produced code follows them to the letter.
- you must follow guidelines/code.md or guidelines/test.md for coding
- you must follow <relevant-nested-path>/guidelines/code.md or <relevant-nested-path>/guidelines/test.md for coding
Section 0 rules:
0.1 and 0.2; both are plain list items, not checkboxes.guidelines/code.md or guidelines/test.md and every relevant nested guidelines/code.md or guidelines/test.md for directories the implementation will change.After section 0, only these sections are valid:
docs section, only for repo-root docs/ work, placed after package workchangeset section with the next number and one non-coding task that follows .agents/skills/changeset/SKILL.mdPackage section names must be package folder names or root package script names. For schema config work, use zod and/or valibot, never schema-configs or schemaConfigs. Keep package-local docs in the relevant package section.
Every implementation checkbox task after section 0:
1.1.1, 1.1.2If one requirement spans multiple packages, create a separate task in each affected package section. Do not create empty sections, standalone test tasks, generic research tasks, vague cleanup tasks, or exact test-writing instructions.
Every package coding task must start its subtask list with:
<task>.1 scope: <short package area or capability class><task>.2 acceptance: <high-level expected outcome>Then add change-specific subtasks. End every coding task with these exact verification subtasks after the numeric prefix:
pnpm verifyspec.md for every new user-visible requirementWhen writing those lines in tasks.md, keep the backticks around spec.md and pnpm verify as shown in the example below.
Non-coding tasks, including repo-root docs-only tasks and the final changeset task, do not get the four coding verification subtasks.
Use this structure:
## 0. read spec.md and guidelines
- 0.1 Read `spec.md`, including `spec.md` `## Detailed Design`, before starting any later task. Follow that design for every later task, and make sure the final implementation matches it exactly.
- 0.2 Check whether any later task you were prompted to do requires coding. If yes, read and follow every guideline below for that work, and verify that all produced code follows them to the letter.
- you must follow guidelines/code.md or guidelines/test.md for coding
- you must follow packages/pqb/src/query/guidelines/code.md or packages/pqb/src/query/guidelines/test.md for coding
## 1. pqb
- [ ] 1.1 <change slice title>
- 1.1.1 scope: query-builder read-only query capability
- 1.1.2 acceptance: read-only query objects keep read behavior and reject mutation APIs at the type level.
- 1.1.3 <high-level actionable subtask>
- 1.1.4 verify implementation against guidelines
- 1.1.5 code must be covered by tests
- 1.1.6 tests and types must pass: run `pnpm verify`
- 1.1.7 reconcile `spec.md` for every new user-visible requirement
## 2. orm
- [ ] 2.1 <change slice title>
- 2.1.1 scope: ORM table configuration
- 2.1.2 acceptance: table declarations can opt into read-only query objects without changing default writable behavior.
- 2.1.3 <high-level actionable subtask>
- 2.1.4 verify implementation against guidelines
- 2.1.5 code must be covered by tests
- 2.1.6 tests and types must pass: run `pnpm verify`
- 2.1.7 reconcile `spec.md` for every new user-visible requirement
## 3. docs
- [ ] 3.1 <docs change slice title>
- 3.1.1 <high-level docs subtask>
## 4. changeset
- [ ] 4.1 Finalize the change
- 4.1.1 Follow `.agents/skills/changeset/SKILL.md` to finalize the change.
While writing tasks.md, keep this implementation-time rule in mind but do not emit it as its own section:
spec.md.## Detailed Design subsection before implementation. Add a new responsibility-centered subsection only when none fits.Summary, What Changes, Assumptions, and Capabilities aligned when the design materially changes.Before finishing, verify:
research.md was used from the parent feature folderspec.md preserves the baseline, has no top-level title, and has no Guidelines sectionSummary, What Changes, optional Assumptions, Capabilities, and Detailed Design satisfy the rules aboveDetailed Design is complete, coherent, and not implementation-prescriptiveWhat Changes item and declared capability is covered by tasks.mdtasks.md starts with section 0; 0.1 and 0.2 are the only numbered entries there and are not checkboxes0 lists root and relevant nested code or test guidelinesscope: and acceptance:pnpm verifydocs, and final changesetAsk one focused question only when folder/idea resolution is ambiguous or the baseline is missing/too thin.