Problem
Schema artifact instructions can include a rules field with directives like "AFTER CREATING ARTIFACT — Use an async haiku sub-agent to run /artifact-validate-claim-create-footnotes skill." These rules are injected into the LLM prompt when creating an artifact via /opsx:continue.
The problem: rules are advisory. The LLM can skip, forget, or deprioritize them — especially when the user interrupts, context is long, or the LLM is focused on the artifact content itself. In a recent session, the rule to spawn a validation sub-agent after artifact creation was ignored until the user manually pointed it out.
This is a general problem: any rule that says "after X, do Y" relies on the LLM remembering and choosing to follow it. There is no enforcement mechanism.
What's needed
A deterministic way to fire rule-defined actions at specific points in the artifact lifecycle (e.g., post-create, pre-advance). The mechanism should not depend on the LLM choosing to comply — it should be automatic.
Context
- The
rules field is already part of the schema instruction output (openspec instructions <artifact> --change <name> --json)
- The existing citation-validator hook (PostToolUse:Write) proves the pattern — it fires deterministically on every Write and blocks on failure
- The friction was observed during whiteboard creation in the
tdd-teams schema, where a post-create validation rule was skipped
Problem
Schema artifact instructions can include a
rulesfield with directives like "AFTER CREATING ARTIFACT — Use an async haiku sub-agent to run /artifact-validate-claim-create-footnotes skill." These rules are injected into the LLM prompt when creating an artifact via/opsx:continue.The problem: rules are advisory. The LLM can skip, forget, or deprioritize them — especially when the user interrupts, context is long, or the LLM is focused on the artifact content itself. In a recent session, the rule to spawn a validation sub-agent after artifact creation was ignored until the user manually pointed it out.
This is a general problem: any rule that says "after X, do Y" relies on the LLM remembering and choosing to follow it. There is no enforcement mechanism.
What's needed
A deterministic way to fire rule-defined actions at specific points in the artifact lifecycle (e.g., post-create, pre-advance). The mechanism should not depend on the LLM choosing to comply — it should be automatic.
Context
rulesfield is already part of the schema instruction output (openspec instructions <artifact> --change <name> --json)tdd-teamsschema, where a post-create validation rule was skipped