Shared Execution Policy
This file is the supporting behavioral contract for /nova-plugin:produce-plan and the deprecated /nova-plugin:nova-produce-plan compatibility entrypoint. Prefer the direct command; the compatibility name remains only for the current major-version migration window.
- Resolve natural-language and explicit
KEY=value inputs using ../_shared/parameter-resolution.md; explicit non-conflicting values take precedence.
- Apply
../_shared/safety-preflight.md before side effects. Never infer approval, destructive scope, credentials, or output destinations.
- Follow
../_shared/output-contracts.md and ../_shared/artifact-policy.md; report completed, skipped, and blocked validation truthfully.
- Respect the frontmatter tool boundary. Missing inputs, unavailable dependencies, overlapping user changes, or repository-policy conflicts are blockers rather than permission to broaden scope.
Execution
- Parse
$ARGUMENTS against the workflow-specific inputs below.
- Read only the context required for the requested scope.
- Apply the workflow contract and its strict output format.
- Stop before unauthorized side effects; otherwise validate in proportion to risk and report residual risk.
Workflow Contract
Generated from workflow-specs/behaviors.v2.json. This block is authoritative. Run node scripts/generate-behavior-surfaces.mjs --write after changing the IR; if explanatory text below conflicts, fail closed.
Generated Behavior Index
- Purpose: Write a review-ready plan artifact from explicit intent and constraints without implementing code.
- Canonical inputs:
REQUEST(required aliases=PLAN_INTENT,INPUT); PLAN_OUTPUT_PATH(required aliases=OUTPUT_PATH); PLAN_PROFILE(optional aliases=PROFILE default="general" exact="general","lite","java-backend"); ANALYSIS_INPUTS(optional aliases=EVIDENCE); CONSTRAINTS(optional aliases=BOUNDARIES)
- Resolved variant authority:
{"PLAN_PROFILE":"java-backend"} normalized={"PLAN_PROFILE":"java-backend"} -> runtime/contracts/backend-plan.json; {"PLAN_PROFILE":"lite"} normalized={"PLAN_PROFILE":"lite"} -> runtime/contracts/plan-lite.json; {} normalized={"PLAN_PROFILE":"general"} -> runtime/contracts/produce-plan.json. Declared selector defaults are applied before matching. An exact normalized override wins; a non-exact combination that triggers an alias specialization stops as conflicting, and only a valid combination that triggers no specialization uses the canonical fallback. The complete resolved runtime contract is authoritative and no field falls back to canonical prose.
- Claude static-entrypoint gate: Native command and Skill frontmatter are static. A matching command wrapper may continue after it has verified that its invoked command id equals
resolvedWorkflowId; this canonical Skill must not re-resolve or reject that validated wrapper. Only when this canonical Skill is itself the Claude native invoked entrypoint and no validated wrapper gate exists must resolvedWorkflowId equal produce-plan. Otherwise STOP before tools or side effects and invoke the exact direct command /nova-plugin:<resolved commandEntrypoint.directCommandId>; never execute the specialized contract under unmatched canonical frontmatter. Generic and Codex adapters may execute the resolved contract directly under adapter enforcement.
- Decision entries: 2; canonical routes and variants:
produce-plan {"PLAN_PROFILE":"java-backend"}.
- Workflow steps:
validate-inputs → load-evidence → select-profile → write-plan → summarize
- Output: mode=
artifact; order=plan artifact → artifact path → executive summary; severity=none.
- Deviation/failure: mode=
approval-required; failure order=status → blocker → required input → safe next action.
- Full IR:
runtime/contracts/produce-plan.json#behaviorContract embeds the complete decision table, invariants, stops, field definitions, validation, and failure contract from the same source. Detailed guidance below may not override it.
Purpose
Generate review-ready design/plan documentation based on intent and constraints.
Inputs
| Parameter |
Required |
Default |
Notes |
Example |
PLAN_OUTPUT_PATH |
Profile |
N/A |
Required for general and java-backend; omitted by lite |
docs/plans/refund.md |
REQUEST |
Yes |
N/A |
Goal of this plan; PLAN_INTENT and INPUT are aliases |
Fix callback idempotency |
PLAN_PROFILE |
No |
general |
general, lite, or java-backend |
java-backend |
ANALYSIS_INPUTS |
Recommended |
N/A |
Prior analysis references |
docs/analysis/callback.md |
CONSTRAINTS |
No |
N/A |
Boundaries |
Backward compatible |
Outputs
general and java-backend write a full plan document to the explicit path
and return only that path plus executive-summary bullets in chat.
lite uses the resolved plan-lite chat-only contract and does not require
or infer PLAN_OUTPUT_PATH.
Workflow
- Validate required fields.
- Select profile template.
- Produce complete plan with explicit trade-offs.
- For artifact profiles, write the file and return the constrained chat
summary; for
lite, emit only the resolved chat outline.
Examples
- Natural trigger:
Use produce-plan to draft a formal plan for payment retry flow.
- Explicit trigger:
produce-plan PLAN_OUTPUT_PATH=docs/plans/auth.md PLAN_INTENT=Unify auth chain PLAN_PROFILE=general.
Safety
- Design only, no code change.
- Stop when required fields are missing.
Profile Document Structure
For general and java-backend, write a review-ready design checkpoint only
to the explicit PLAN_OUTPUT_PATH; never infer it. Base decisions on supplied
evidence and constraints, keep alternatives and trade-offs explicit, and do not
modify production code. lite follows its resolved chat-only runtime contract.
Profile: general (default)
The plan document MUST include these 9 sections in order:
Background & Problem Statement
- Context leading to this plan
- Summary of the problem being addressed
- Pointers to relevant analysis artifacts
Goals & Non-Goals
- Explicit success criteria
- Clearly stated non-goals to prevent scope creep
Constraints & Assumptions
- Technical, organizational, or temporal constraints
- Assumptions inherited from analysis or business context
Alternatives Considered
- Meaningful alternatives that were evaluated
- High-level pros and cons of each
- Clear reasons for rejection
Final Approach & Rationale
- Chosen approach
- Why this approach best satisfies goals and constraints
- Key trade-offs being accepted
Step-by-Step Implementation Plan
- Ordered implementation phases
- Key milestones or checkpoints
- Ownership or responsibility boundaries if relevant
Risks & Mitigations
- Technical, operational, and delivery risks
- Concrete mitigation strategies (not just acknowledgements)
Test & Validation Strategy
- How correctness will be validated
- Types of tests required (unit, integration, manual, etc.)
- Rollout validation signals
Rollback Strategy
- Conditions under which rollback is required
- High-level rollback steps
- Expected impact and limitations
Profile: java-backend
For Java/Spring backend designs, include these 12 sections:
- Background & Problem Statement
- Scope Definition (what is in/out of scope)
- Business Rules & Invariants (domain constraints, validation rules)
- Architecture Overview (layers, modules, boundaries)
- Data Model & Persistence (entities, repositories, schema considerations)
- Transaction & Consistency Design (transaction boundaries, isolation levels, distributed transactions)
- Concurrency & Idempotency (thread-safety, race conditions, retry handling)
- Error Handling & Observability (exception strategy, logging, metrics, tracing)
- Implementation Plan (Step-by-Step)
- Testing Strategy (unit, integration, contract tests)
- Rollback & Safety Plan
- Risks & Open Questions
OUTPUT RULES
Chat output MUST include ONLY:
- The absolute or relative file path written
- A 3–5 bullet executive summary:
- What is being done
- Why this approach was chosen
- Major risks or trade-offs
Do NOT:
- Paste the plan content into chat
- Add commentary outside the required output
4.0 VARIANT PROFILES
- Default: formal review-ready plan written to
PLAN_OUTPUT_PATH.
PLAN_PROFILE=lite: former plan-lite chat-only behavior; no artifact path is inferred.
PLAN_PROFILE=java-backend: former backend-plan twelve-section Java/Spring profile.
The former plan-review entry is a nova-review variant, not a planning writer.
END OF COMMAND
1---2name: nova-produce-plan3description: Write a formal plan document to file using general or java-backend profile; design checkpoint only.4license: MIT5---67## Shared Execution Policy89This file is the supporting behavioral contract for `/nova-plugin:produce-plan` and the deprecated `/nova-plugin:nova-produce-plan` compatibility entrypoint. Prefer the direct command; the compatibility name remains only for the current major-version migration window.1011- Resolve natural-language and explicit `KEY=value` inputs using `../_shared/parameter-resolution.md`; explicit non-conflicting values take precedence.12- Apply `../_shared/safety-preflight.md` before side effects. Never infer approval, destructive scope, credentials, or output destinations.13- Follow `../_shared/output-contracts.md` and `../_shared/artifact-policy.md`; report completed, skipped, and blocked validation truthfully.14- Respect the frontmatter tool boundary. Missing inputs, unavailable dependencies, overlapping user changes, or repository-policy conflicts are blockers rather than permission to broaden scope.1516## Execution17181. Parse `$ARGUMENTS` against the workflow-specific inputs below.192. Read only the context required for the requested scope.203. Apply the workflow contract and its strict output format.214. Stop before unauthorized side effects; otherwise validate in proportion to risk and report residual risk.2223## Workflow Contract2425<!-- BEGIN GENERATED BEHAVIOR CONTRACT -->26> Generated from `workflow-specs/behaviors.v2.json`. This block is authoritative. Run `node scripts/generate-behavior-surfaces.mjs --write` after changing the IR; if explanatory text below conflicts, fail closed.2728### Generated Behavior Index2930- **Purpose:** Write a review-ready plan artifact from explicit intent and constraints without implementing code.31- **Canonical inputs:** `REQUEST`(required aliases=PLAN_INTENT,INPUT); `PLAN_OUTPUT_PATH`(required aliases=OUTPUT_PATH); `PLAN_PROFILE`(optional aliases=PROFILE default="general" exact="general","lite","java-backend"); `ANALYSIS_INPUTS`(optional aliases=EVIDENCE); `CONSTRAINTS`(optional aliases=BOUNDARIES)32- **Resolved variant authority:** `{"PLAN_PROFILE":"java-backend"} normalized={"PLAN_PROFILE":"java-backend"} -> runtime/contracts/backend-plan.json`; `{"PLAN_PROFILE":"lite"} normalized={"PLAN_PROFILE":"lite"} -> runtime/contracts/plan-lite.json`; `{} normalized={"PLAN_PROFILE":"general"} -> runtime/contracts/produce-plan.json`. Declared selector defaults are applied before matching. An exact normalized override wins; a non-exact combination that triggers an alias specialization stops as conflicting, and only a valid combination that triggers no specialization uses the canonical fallback. The complete resolved runtime contract is authoritative and no field falls back to canonical prose.33- **Claude static-entrypoint gate:** Native command and Skill frontmatter are static. A matching command wrapper may continue after it has verified that its invoked command id equals `resolvedWorkflowId`; this canonical Skill must not re-resolve or reject that validated wrapper. Only when this canonical Skill is itself the Claude native invoked entrypoint and no validated wrapper gate exists must `resolvedWorkflowId` equal `produce-plan`. Otherwise STOP before tools or side effects and invoke the exact direct command `/nova-plugin:<resolved commandEntrypoint.directCommandId>`; never execute the specialized contract under unmatched canonical frontmatter. Generic and Codex adapters may execute the resolved contract directly under adapter enforcement.34- **Decision entries:** 2; canonical routes and variants: `produce-plan {"PLAN_PROFILE":"java-backend"}`.35- **Workflow steps:** `validate-inputs` → `load-evidence` → `select-profile` → `write-plan` → `summarize`36- **Output:** mode=`artifact`; order=`plan artifact` → `artifact path` → `executive summary`; severity=none.37- **Deviation/failure:** mode=`approval-required`; failure order=`status` → `blocker` → `required input` → `safe next action`.38- **Full IR:** `runtime/contracts/produce-plan.json#behaviorContract` embeds the complete decision table, invariants, stops, field definitions, validation, and failure contract from the same source. Detailed guidance below may not override it.39<!-- END GENERATED BEHAVIOR CONTRACT -->4041### Purpose4243Generate review-ready design/plan documentation based on intent and constraints.4445### Inputs4647| Parameter | Required | Default | Notes | Example |48| ------------------ | ----------- | --------- | --------------------------- | --------------------------- |49| `PLAN_OUTPUT_PATH` | Profile | N/A | Required for `general` and `java-backend`; omitted by `lite` | `docs/plans/refund.md` |50| `REQUEST` | Yes | N/A | Goal of this plan; `PLAN_INTENT` and `INPUT` are aliases | `Fix callback idempotency` |51| `PLAN_PROFILE` | No | `general` | `general`, `lite`, or `java-backend` | `java-backend` |52| `ANALYSIS_INPUTS` | Recommended | N/A | Prior analysis references | `docs/analysis/callback.md` |53| `CONSTRAINTS` | No | N/A | Boundaries | `Backward compatible` |5455### Outputs5657- `general` and `java-backend` write a full plan document to the explicit path58 and return only that path plus executive-summary bullets in chat.59- `lite` uses the resolved `plan-lite` chat-only contract and does not require60 or infer `PLAN_OUTPUT_PATH`.6162### Workflow63641. Validate required fields.652. Select profile template.663. Produce complete plan with explicit trade-offs.674. For artifact profiles, write the file and return the constrained chat68 summary; for `lite`, emit only the resolved chat outline.6970### Examples7172- Natural trigger: `Use produce-plan to draft a formal plan for payment retry flow.`73- Explicit trigger: `produce-plan PLAN_OUTPUT_PATH=docs/plans/auth.md PLAN_INTENT=Unify auth chain PLAN_PROFILE=general`.7475### Safety7677- Design only, no code change.78- Stop when required fields are missing.7980## Profile Document Structure8182For `general` and `java-backend`, write a review-ready design checkpoint only83to the explicit `PLAN_OUTPUT_PATH`; never infer it. Base decisions on supplied84evidence and constraints, keep alternatives and trade-offs explicit, and do not85modify production code. `lite` follows its resolved chat-only runtime contract.868788##### Profile: general (default)8990The plan document MUST include these 9 sections in order:91921. **Background & Problem Statement**93 - Context leading to this plan94 - Summary of the problem being addressed95 - Pointers to relevant analysis artifacts96972. **Goals & Non-Goals**98 - Explicit success criteria99 - Clearly stated non-goals to prevent scope creep1001013. **Constraints & Assumptions**102 - Technical, organizational, or temporal constraints103 - Assumptions inherited from analysis or business context1041054. **Alternatives Considered**106 - Meaningful alternatives that were evaluated107 - High-level pros and cons of each108 - Clear reasons for rejection1091105. **Final Approach & Rationale**111 - Chosen approach112 - Why this approach best satisfies goals and constraints113 - Key trade-offs being accepted1141156. **Step-by-Step Implementation Plan**116 - Ordered implementation phases117 - Key milestones or checkpoints118 - Ownership or responsibility boundaries if relevant1191207. **Risks & Mitigations**121 - Technical, operational, and delivery risks122 - Concrete mitigation strategies (not just acknowledgements)1231248. **Test & Validation Strategy**125 - How correctness will be validated126 - Types of tests required (unit, integration, manual, etc.)127 - Rollout validation signals1281299. **Rollback Strategy**130 - Conditions under which rollback is required131 - High-level rollback steps132 - Expected impact and limitations133134135##### Profile: java-backend136137For Java/Spring backend designs, include these 12 sections:1381391. **Background & Problem Statement**1402. **Scope Definition** (what is in/out of scope)1413. **Business Rules & Invariants** (domain constraints, validation rules)1424. **Architecture Overview** (layers, modules, boundaries)1435. **Data Model & Persistence** (entities, repositories, schema considerations)1446. **Transaction & Consistency Design** (transaction boundaries, isolation levels, distributed transactions)1457. **Concurrency & Idempotency** (thread-safety, race conditions, retry handling)1468. **Error Handling & Observability** (exception strategy, logging, metrics, tracing)1479. **Implementation Plan (Step-by-Step)**14810. **Testing Strategy** (unit, integration, contract tests)14911. **Rollback & Safety Plan**15012. **Risks & Open Questions**151152153#### OUTPUT RULES154155Chat output MUST include ONLY:1561571. The absolute or relative file path written1582. A 3–5 bullet **executive summary**:159 - What is being done160 - Why this approach was chosen161 - Major risks or trade-offs162163Do NOT:164165- Paste the plan content into chat166- Add commentary outside the required output167168169#### 4.0 VARIANT PROFILES170171- Default: formal review-ready plan written to `PLAN_OUTPUT_PATH`.172- `PLAN_PROFILE=lite`: former `plan-lite` chat-only behavior; no artifact path is inferred.173- `PLAN_PROFILE=java-backend`: former `backend-plan` twelve-section Java/Spring profile.174175The former `plan-review` entry is a `nova-review` variant, not a planning writer.176177#### END OF COMMAND