-
Notifications
You must be signed in to change notification settings - Fork 4.5k
docs: clarify archive spec terminology #1682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,27 +95,27 @@ ${STORE_SELECTION_GUIDANCE} | |
| delta specs from other artifacts. | ||
|
|
||
| **If delta specs exist:** | ||
| - Compare each delta spec with its corresponding main spec at \`<planningHome.root>/openspec/specs/<capability-path>/spec.md\` (use the store-aware \`planningHome.root\` from step 2, not a hardcoded repo path) | ||
| - Compare each delta spec with its corresponding current spec at \`<planningHome.root>/openspec/specs/<capability-path>/spec.md\` (use the store-aware \`planningHome.root\` from step 2, not a hardcoded repo path). If the capability is new, the current spec does not exist yet and the delta will create it. | ||
| - Determine what changes would be applied (adds, modifications, removals, renames) | ||
| - Show a combined summary before prompting | ||
|
|
||
| **Prompt options:** | ||
| - If changes needed: "Sync now (recommended)", "Archive without syncing" | ||
| - If already synced: "Archive now", "Sync anyway", "Cancel" | ||
| - If changes needed: "Apply to current specs now (recommended)", "Archive without applying" | ||
| - If already applied: "Archive now", "Apply again", "Cancel" | ||
|
|
||
| Route on the answer: | ||
| - "Cancel" — stop, do not archive | ||
| - "Archive without syncing" or "Archive now" — proceed to archive | ||
| - "Sync now" or "Sync anyway" — sync, then verify (below) | ||
| - "Archive without applying" or "Archive now" — proceed to archive | ||
| - "Apply to current specs now" or "Apply again" — apply, then verify (below) | ||
| - Anything else — ask again rather than archiving | ||
|
|
||
| Before a selected sync writes any main spec, run | ||
| Before a selected application writes any current spec, run | ||
| \`openspec instructions specs --change "<name>" --json\` once with the same | ||
| selected-root flags. Require a zero exit status and valid artifact-instruction | ||
| JSON. If the lookup fails or returns invalid JSON, report the error and stop | ||
| before writing any main spec or moving the change. A valid response with omitted | ||
| before writing any current spec or moving the change. A valid response with omitted | ||
| \`rules\` is the no-rules case. Apply returned \`rules\` only to the content and | ||
| form of main specs produced by this merge; do not use them as archive guidance, | ||
| form of current specs produced by this application; do not use them as archive guidance, | ||
| change CLI behavior, or copy the rule text into any output file. | ||
|
|
||
| Then run the \`openspec-sync-specs\` workflow inline (agent-driven intelligent merge) for change '<name>', passing the delta spec analysis and the fetched specs-rule snapshot from above, and wait for it to finish. The inline sync must reuse that snapshot without fetching \`specs\` instructions again. Do not delegate it to a background task — step 5 would move \`changeRoot\` out from under a sync that is still reading it, leaving the change archived and the main specs never updated. If your agent can only run it by delegation, delegate synchronously and wait for the result. | ||
|
|
@@ -162,7 +162,7 @@ ${STORE_SELECTION_GUIDANCE} | |
| **Change:** <change-name> | ||
| **Schema:** <schema-name> | ||
| **Archived to:** the archive path derived from \`planningHome.changesDir\`/<target-name>/ | ||
| **Specs:** <"✓ Synced to main specs" only if the step 4 verification passed; otherwise "No delta specs" or "Sync skipped"> | ||
| **Specs:** <"✓ Applied to current specs" only if the step 4 verification passed; otherwise "No delta specs" or "Application skipped"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Use application terminology in all summary instructions. Line 154 and Line 336 still instruct the agent to report Also applies to: 347-347 🤖 Prompt for AI Agents |
||
|
|
||
| <"All artifacts complete. All tasks complete." — or, if archived with warnings, list them instead (e.g. "Archived with 2 incomplete tasks")> | ||
| \`\`\` | ||
|
|
@@ -277,27 +277,27 @@ ${STORE_SELECTION_GUIDANCE} | |
| delta specs from other artifacts. | ||
|
|
||
| **If delta specs exist:** | ||
| - Compare each delta spec with its corresponding main spec at \`<planningHome.root>/openspec/specs/<capability-path>/spec.md\` (use the store-aware \`planningHome.root\` from step 2, not a hardcoded repo path) | ||
| - Compare each delta spec with its corresponding current spec at \`<planningHome.root>/openspec/specs/<capability-path>/spec.md\` (use the store-aware \`planningHome.root\` from step 2, not a hardcoded repo path). If the capability is new, the current spec does not exist yet and the delta will create it. | ||
| - Determine what changes would be applied (adds, modifications, removals, renames) | ||
| - Show a combined summary before prompting | ||
|
|
||
| **Prompt options:** | ||
| - If changes needed: "Sync now (recommended)", "Archive without syncing" | ||
| - If already synced: "Archive now", "Sync anyway", "Cancel" | ||
| - If changes needed: "Apply to current specs now (recommended)", "Archive without applying" | ||
| - If already applied: "Archive now", "Apply again", "Cancel" | ||
|
|
||
| Route on the answer: | ||
| - "Cancel" — stop, do not archive | ||
| - "Archive without syncing" or "Archive now" — proceed to archive | ||
| - "Sync now" or "Sync anyway" — sync, then verify (below) | ||
| - "Archive without applying" or "Archive now" — proceed to archive | ||
| - "Apply to current specs now" or "Apply again" — apply, then verify (below) | ||
| - Anything else — ask again rather than archiving | ||
|
|
||
| Before a selected sync writes any main spec, run | ||
| Before a selected application writes any current spec, run | ||
| \`openspec instructions specs --change "<name>" --json\` once with the same | ||
| selected-root flags. Require a zero exit status and valid artifact-instruction | ||
| JSON. If the lookup fails or returns invalid JSON, report the error and stop | ||
| before writing any main spec or moving the change. A valid response with omitted | ||
| before writing any current spec or moving the change. A valid response with omitted | ||
| \`rules\` is the no-rules case. Apply returned \`rules\` only to the content and | ||
| form of main specs produced by this merge; do not use them as archive guidance, | ||
| form of current specs produced by this application; do not use them as archive guidance, | ||
| change CLI behavior, or copy the rule text into any output file. | ||
|
|
||
| Then run the \`/opsx:sync\` workflow inline (agent-driven intelligent merge) for change '<name>', passing the delta spec analysis and the fetched specs-rule snapshot from above, and wait for it to finish. The inline sync must reuse that snapshot without fetching \`specs\` instructions again. Do not delegate it to a background task — step 5 would move \`changeRoot\` out from under a sync that is still reading it, leaving the change archived and the main specs never updated. If your agent can only run it by delegation, delegate synchronously and wait for the result. | ||
|
|
@@ -344,7 +344,7 @@ ${STORE_SELECTION_GUIDANCE} | |
| **Change:** <change-name> | ||
| **Schema:** <schema-name> | ||
| **Archived to:** the archive path derived from \`planningHome.changesDir\`/<target-name>/ | ||
| **Specs:** ✓ Synced to main specs | ||
| **Specs:** ✓ Applied to current specs | ||
|
|
||
| All artifacts complete. All tasks complete. | ||
| \`\`\` | ||
|
|
@@ -370,12 +370,12 @@ All artifacts complete. All tasks complete. | |
| **Change:** <change-name> | ||
| **Schema:** <schema-name> | ||
| **Archived to:** the archive path derived from \`planningHome.changesDir\`/<target-name>/ | ||
| **Specs:** Sync skipped (user chose to skip) | ||
| **Specs:** Application skipped (user chose to skip) | ||
|
|
||
| **Warnings:** | ||
| - Archived with 2 incomplete artifacts | ||
| - Archived with 3 incomplete tasks | ||
| - Delta spec sync was skipped (user chose to skip) | ||
| - Applying the delta specs was skipped (user chose to skip) | ||
|
|
||
| Review the archive if this was not intentional. | ||
| \`\`\` | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Make archive semantics consistent with the optional application path.
The glossary and overview say archive always applies delta specs, but the archive workflow permits archiving without application. Document both outcomes and state that current specs describe the new reality only after application.
docs/glossary.md#L39-L41: qualify theArchivedefinition.docs/overview.md#L26-L26: describe archive with and without delta-spec application.📍 Affects 2 files
docs/glossary.md#L39-L41(this comment)docs/overview.md#L26-L26🤖 Prompt for AI Agents