Skip to content

Commit ecd5d38

Browse files
魏云飞claude
andcommitted
Clarify workflow rule targets in proposal.
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>
1 parent da592a4 commit ecd5d38

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

  • openspec/changes/extend-config-injection-to-apply-archive

openspec/changes/extend-config-injection-to-apply-archive/proposal.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ We should reuse the existing config model so project-level guidance stays availa
1212
- Preserve the current archive command safety checks and prompts; this change is about instruction surfaces, not new archive command enforcement semantics.
1313
- Do not expand this change to `verify` or `sync`; this proposal only covers `apply` and `archive`.
1414

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+
1529
## Capabilities
1630

1731
### New Capabilities
@@ -28,4 +42,5 @@ We should reuse the existing config model so project-level guidance stays availa
2842
- `src/core/project-config.ts` and related validation will need to recognize workflow targets while remaining backward compatible for artifact keys.
2943
- `src/commands/workflow/instructions.ts` and related types will need to surface injected context/rules for apply instructions.
3044
- 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

Comments
 (0)