You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document reserved apply and archive rule targets, validation expectations, and user-facing docs impact for the proposal discussion.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: openspec/changes/extend-config-injection-to-apply-archive/proposal.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,20 @@ We should reuse the existing config model so project-level guidance stays availa
12
12
- Preserve the current archive command safety checks and prompts; this change is about instruction surfaces, not new archive command enforcement semantics.
13
13
- Do not expand this change to `verify` or `sync`; this proposal only covers `apply` and `archive`.
14
14
15
+
### Config Structure
16
+
17
+
- Continue using the existing top-level `context` field, and inject that project context into `apply` and `archive` instruction surfaces in addition to artifact instructions.
18
+
- Reserve `rules.apply` for workflow guidance injected into `/opsx:apply` instructions.
19
+
- Reserve `rules.archive` for workflow guidance injected into `/opsx:archive` instructions.
20
+
- Keep existing artifact keys such as `rules.specs`, `rules.design`, and `rules.tasks` unchanged for backward compatibility.
21
+
22
+
### Validation and Error Handling
23
+
24
+
- Extend config validation so reserved workflow targets are accepted alongside artifact keys.
25
+
- Keep malformed or unknown rule targets as validation errors with actionable messages so users can correct `openspec/config.yaml` before running workflow instructions.
26
+
- Apply artifact rules only to matching artifact instructions, and apply workflow rules only to their corresponding workflow instruction surfaces.
27
+
- Surface validation failures to callers of apply/archive instruction generation and cover those cases with unit and integration tests.
28
+
15
29
## Capabilities
16
30
17
31
### New Capabilities
@@ -28,4 +42,5 @@ We should reuse the existing config model so project-level guidance stays availa
28
42
-`src/core/project-config.ts` and related validation will need to recognize workflow targets while remaining backward compatible for artifact keys.
29
43
-`src/commands/workflow/instructions.ts` and related types will need to surface injected context/rules for apply instructions.
30
44
- Archive workflow templates and supporting generation paths will need to consume injected context/rules for `/opsx:archive` guidance.
31
-
-`src/core/config-prompts.ts`, config docs, and relevant specs/tests will need updates so the documented behavior matches the new instruction surfaces.
45
+
-`src/core/config-prompts.ts`, `docs/opsx.md`, config examples, and relevant specs/tests will need updates so the documented behavior matches the new instruction surfaces.
46
+
- User-facing docs should include examples showing `rules.apply` and `rules.archive` alongside existing artifact rules, plus migration guidance for teams deciding when to keep artifact-specific guidance versus move workflow guidance into phase-specific targets.
0 commit comments