agents-templated 2.2.11 → 2.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +2 -3
  2. package/agents/commands/README.md +2 -8
  3. package/agents/commands/arch-check.md +58 -33
  4. package/agents/commands/audit.md +58 -38
  5. package/agents/commands/debug-track.md +58 -33
  6. package/agents/commands/docs.md +58 -34
  7. package/agents/commands/fix.md +58 -34
  8. package/agents/commands/learn-loop.md +58 -33
  9. package/agents/commands/perf.md +58 -34
  10. package/agents/commands/plan.md +58 -34
  11. package/agents/commands/pr.md +58 -35
  12. package/agents/commands/problem-map.md +58 -33
  13. package/agents/commands/release-ready.md +58 -33
  14. package/agents/commands/release.md +58 -39
  15. package/agents/commands/risk-review.md +58 -33
  16. package/agents/commands/scope-shape.md +58 -33
  17. package/agents/commands/task.md +58 -35
  18. package/agents/commands/test.md +58 -34
  19. package/agents/commands/ux-bar.md +58 -33
  20. package/lib/workflow.js +8 -21
  21. package/package.json +1 -1
  22. package/templates/CLAUDE.md +3 -0
  23. package/templates/README.md +2 -3
  24. package/templates/agents/commands/README.md +2 -8
  25. package/templates/agents/commands/arch-check.md +58 -33
  26. package/templates/agents/commands/audit.md +58 -38
  27. package/templates/agents/commands/debug-track.md +58 -33
  28. package/templates/agents/commands/docs.md +58 -34
  29. package/templates/agents/commands/fix.md +58 -34
  30. package/templates/agents/commands/learn-loop.md +58 -33
  31. package/templates/agents/commands/perf.md +58 -34
  32. package/templates/agents/commands/plan.md +58 -34
  33. package/templates/agents/commands/pr.md +58 -35
  34. package/templates/agents/commands/problem-map.md +58 -33
  35. package/templates/agents/commands/release-ready.md +58 -33
  36. package/templates/agents/commands/release.md +58 -39
  37. package/templates/agents/commands/risk-review.md +58 -33
  38. package/templates/agents/commands/scope-shape.md +58 -33
  39. package/templates/agents/commands/task.md +58 -35
  40. package/templates/agents/commands/test.md +58 -34
  41. package/templates/agents/commands/ux-bar.md +58 -33
  42. package/templates/agents/skills/README.md +9 -0
  43. package/templates/agents/skills/debug-skill/SKILL.md +39 -0
  44. package/templates/agents/skills/feature-forge/SKILL.md +39 -0
  45. package/templates/agents/skills/secure-code-guardian/SKILL.md +39 -0
  46. package/agents/commands/docs-sync.md +0 -33
  47. package/agents/commands/perf-scan.md +0 -33
  48. package/agents/commands/quality-gate.md +0 -33
  49. package/agents/commands/refactor.md +0 -34
  50. package/agents/commands/scaffold.md +0 -34
  51. package/templates/agents/commands/docs-sync.md +0 -33
  52. package/templates/agents/commands/perf-scan.md +0 -33
  53. package/templates/agents/commands/quality-gate.md +0 -33
  54. package/templates/agents/commands/refactor.md +0 -34
  55. package/templates/agents/commands/scaffold.md +0 -34
@@ -1,38 +1,58 @@
1
- # /audit
2
-
3
- ## A. Intent
4
- Run structured engineering audit across security, correctness, and maintainability.
5
-
6
- ## B. When to Use
7
- Use before high-impact merges, releases, and external reviews.
8
-
9
- ## C. Required Inputs
10
- - Audit scope
11
- - Risk profile
12
- - Compliance baseline
13
- - Hardening profile requirement (if applicable)
14
-
15
- ## D. Deterministic Execution Flow
16
- 1. Resolve audit scope.
17
- 2. Run static checks.
18
- 3. Run security checks.
19
- 4. Run dependency/config checks.
20
- 5. Verify hardening evidence when hardening-required profile applies.
21
- 6. Classify findings by severity.
22
- 7. Emit audit report.
23
-
24
- ## E. Structured Output Template
25
- - `scope`
26
- - `checks_executed[]`
27
- - `findings[]`
28
- - `severity_summary`
29
- - `remediation_plan[]`
30
- - `hardening_evidence_status`
31
-
32
- ## F. Stop Conditions
33
- - Inaccessible scope.
34
- - Unavailable tooling.
35
-
36
- ## G. Safety Constraints
37
- - Classify secret leaks and auth bypass as critical.
38
- - Classify missing hardening verification evidence as release-blocking when hardening is required.
1
+ # /audit
2
+
3
+ ## A. Intent
4
+ Produce a deterministic risk and compliance audit with prioritized findings.
5
+
6
+ ## B. When to Use
7
+ - Use before release or for targeted quality/security reviews.
8
+ - Do not use as a substitute for implementation planning.
9
+
10
+ ## C. Context Assumptions
11
+ - Audit scope is defined.
12
+ - Relevant artifacts are available.
13
+ - Severity rubric is agreed.
14
+
15
+ ## D. Required Inputs
16
+ | Input | Type | Example |
17
+ |---------------------|------------|----------------------------------|
18
+ | `audit_scope` | string | "authentication flows" |
19
+ | `checklist` | string[] | ["security", "tests", "rollback"] |
20
+ | `evidence_set` | artifact | PR diff, logs, reports |
21
+
22
+ ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
+ - [ ] scope is explicit
24
+ - [ ] evidence artifacts are accessible
25
+ - [ ] severity model is available
26
+
27
+ ## F. Execution Flow
28
+ 1. Collect scoped evidence and standards.
29
+ 2. Evaluate checks against evidence.
30
+ 3. Classify findings by severity.
31
+ 4. Decision point ->
32
+ - condition A -> critical unresolved finding -> block recommendation
33
+ - condition B -> no critical blocker -> continue.
34
+ 5. Assemble remediation actions and owners.
35
+ 6. Emit audit report.
36
+
37
+ ## G. Output Schema
38
+
39
+ ```json
40
+ {
41
+ "audit_id": "string",
42
+ "findings": ["array","of","strings"],
43
+ "severity": "low | medium | high",
44
+ "blocker": "string | null"
45
+ }
46
+ ```
47
+
48
+ ## H. Output Target
49
+ - Default delivery: stdout
50
+ - Override flag: --output=<target>
51
+
52
+ ## I. Stop Conditions <- abort with error message, never emit partial output
53
+ - scope cannot be determined
54
+ - critical evidence is missing
55
+
56
+ ## J. Safety Constraints
57
+ - Hard block: hard block when critical finding lacks mitigation
58
+ - Warn only: warn when medium findings are deferred
@@ -1,33 +1,58 @@
1
- # /debug-track
2
-
3
- ## A. Intent
4
- Produce a root-cause-first defect investigation path with bounded fixes.
5
-
6
- ## B. When to Use
7
- Use for bugs, regressions, and unexpected runtime behavior.
8
-
9
- ## C. Required Inputs
10
- - Defect symptom
11
- - Reproduction context
12
- - Expected behavior
13
-
14
- ## D. Deterministic Execution Flow
15
- 1. Reproduce defect consistently.
16
- 2. Trace data and execution path.
17
- 3. Confirm root cause with evidence.
18
- 4. Propose minimal patch.
19
- 5. Validate fix and regression safety.
20
-
21
- ## E. Structured Output Template
22
- - `reproduction_steps[]`
23
- - `root_cause`
24
- - `affected_surface[]`
25
- - `patch_plan`
26
- - `regression_checks[]`
27
-
28
- ## F. Stop Conditions
29
- - Defect not reproducible.
30
- - Root cause remains unverified.
31
-
32
- ## G. Safety Constraints
33
- - Do not patch symptoms without root-cause evidence.
1
+ # /debug-track
2
+
3
+ ## A. Intent
4
+ Run root-cause-first debugging workflow and guarantee evidence-backed defect diagnosis.
5
+
6
+ ## B. When to Use
7
+ - Use when behavior is broken, failing, or regressing in runtime.
8
+ - Do not use to apply speculative patches without diagnosis.
9
+
10
+ ## C. Context Assumptions
11
+ - Defect symptom is captured.
12
+ - A reproduction path is available or can be derived.
13
+ - Runtime context is accessible.
14
+
15
+ ## D. Required Inputs
16
+ | Input | Type | Example |
17
+ |---------------------|------------|----------------------------------|
18
+ | `defect_symptom` | string | "payment retries loop forever" |
19
+ | `repro_steps` | string[] | ["submit order", "disconnect network"] |
20
+ | `runtime_artifact` | artifact | error logs, trace screenshot, failing test |
21
+
22
+ ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
+ - [ ] reproduction path is actionable
24
+ - [ ] evidence can be collected at runtime
25
+ - [ ] investigation scope is bounded
26
+
27
+ ## F. Execution Flow
28
+ 1. Reproduce issue and capture trace.
29
+ 2. Follow execution and state transitions.
30
+ 3. Confirm root cause with evidence.
31
+ 4. Decision point ->
32
+ - condition A -> root cause unverified -> continue investigation
33
+ - condition B -> verified -> continue.
34
+ 5. Draft minimal patch strategy and checks.
35
+ 6. Emit debug investigation report.
36
+
37
+ ## G. Output Schema
38
+
39
+ ```json
40
+ {
41
+ "debug_id": "string",
42
+ "evidence": ["array","of","strings"],
43
+ "certainty": "low | medium | high",
44
+ "root_cause": "string | null"
45
+ }
46
+ ```
47
+
48
+ ## H. Output Target
49
+ - Default delivery: stdout
50
+ - Override flag: --output=<target>
51
+
52
+ ## I. Stop Conditions <- abort with error message, never emit partial output
53
+ - issue cannot be reproduced with available context
54
+ - root cause cannot be evidenced
55
+
56
+ ## J. Safety Constraints
57
+ - Hard block: hard block on symptom-only fixes without diagnosis
58
+ - Warn only: warn when reproduction is intermittent
@@ -1,34 +1,58 @@
1
- # /docs
2
-
3
- ## A. Intent
4
- Generate or update documentation aligned to implemented behavior.
5
-
6
- ## B. When to Use
7
- Use when code, APIs, operations, or workflows change.
8
-
9
- ## C. Required Inputs
10
- - Documentation scope
11
- - Source changes
12
- - Target audience
13
-
14
- ## D. Deterministic Execution Flow
15
- 1. Resolve source-of-truth artifacts.
16
- 2. Extract behavior and API deltas.
17
- 3. Map deltas to sections.
18
- 4. Apply concise updates.
19
- 5. Validate examples/commands.
20
- 6. Emit docs change report.
21
-
22
- ## E. Structured Output Template
23
- - `scope`
24
- - `sources[]`
25
- - `sections_updated[]`
26
- - `example_validation`
27
- - `follow_up_actions[]`
28
-
29
- ## F. Stop Conditions
30
- - Missing source artifacts.
31
- - Unresolved ambiguity.
32
-
33
- ## G. Safety Constraints
34
- - Do not publish secrets, tokens, or credentials.
1
+ # /docs
2
+
3
+ ## A. Intent
4
+ Create deterministic documentation outputs aligned with current implementation behavior.
5
+
6
+ ## B. When to Use
7
+ - Use when generating or updating docs as a direct deliverable.
8
+ - Do not use for release decision making.
9
+
10
+ ## C. Context Assumptions
11
+ - Source behavior is known.
12
+ - Target audience is defined.
13
+ - Doc destination is available.
14
+
15
+ ## D. Required Inputs
16
+ | Input | Type | Example |
17
+ |---------------------|------------|----------------------------------|
18
+ | `doc_scope` | string | "API auth endpoints" |
19
+ | `source_refs` | string[] | ["src/auth.ts", "openapi.yaml"] |
20
+ | `doc_artifact` | artifact | existing README path or docs URL |
21
+
22
+ ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
+ - [ ] scope is explicit
24
+ - [ ] source refs are accessible
25
+ - [ ] destination path is writable
26
+
27
+ ## F. Execution Flow
28
+ 1. Collect implementation references.
29
+ 2. Draft structured documentation content.
30
+ 3. Validate examples and references.
31
+ 4. Decision point ->
32
+ - condition A -> mismatch with implementation -> revise doc content
33
+ - condition B -> aligned -> continue.
34
+ 5. Assemble final documentation package.
35
+ 6. Emit documentation output.
36
+
37
+ ## G. Output Schema
38
+
39
+ ```json
40
+ {
41
+ "doc_id": "string",
42
+ "updated_sections": ["array","of","strings"],
43
+ "confidence": "low | medium | high",
44
+ "gap": "string | null"
45
+ }
46
+ ```
47
+
48
+ ## H. Output Target
49
+ - Default delivery: file
50
+ - Override flag: --output=<target>
51
+
52
+ ## I. Stop Conditions <- abort with error message, never emit partial output
53
+ - source references are unavailable
54
+ - critical behavior cannot be documented accurately
55
+
56
+ ## J. Safety Constraints
57
+ - Hard block: hard block on knowingly incorrect implementation claims
58
+ - Warn only: warn when sections remain TODO with owner
@@ -1,34 +1,58 @@
1
- # /fix
2
-
3
- ## A. Intent
4
- Apply the smallest safe change that resolves a verified defect.
5
-
6
- ## B. When to Use
7
- Use for bugs with reproducible evidence.
8
-
9
- ## C. Required Inputs
10
- - Defect description
11
- - Reproduction evidence
12
- - Target scope
13
-
14
- ## D. Deterministic Execution Flow
15
- 1. Validate defect evidence.
16
- 2. Reproduce failure.
17
- 3. Locate root cause.
18
- 4. Generate minimal patch.
19
- 5. Execute targeted validation.
20
- 6. Emit fix report.
21
-
22
- ## E. Structured Output Template
23
- - `defect_id`
24
- - `root_cause`
25
- - `patch_summary`
26
- - `files_changed[]`
27
- - `validation_results[]`
28
-
29
- ## F. Stop Conditions
30
- - Non-reproducible failure.
31
- - Root cause unresolved.
32
-
33
- ## G. Safety Constraints
34
- - Do not broaden scope beyond defect boundary.
1
+ # /fix
2
+
3
+ ## A. Intent
4
+ Apply the smallest safe code fix with regression evidence and bounded impact.
5
+
6
+ ## B. When to Use
7
+ - Use after root cause is confirmed and a targeted fix is required.
8
+ - Do not use when defect cause is still speculative.
9
+
10
+ ## C. Context Assumptions
11
+ - Issue is reproducible or sufficiently evidenced.
12
+ - Root cause has been identified.
13
+ - Regression checks are available.
14
+
15
+ ## D. Required Inputs
16
+ | Input | Type | Example |
17
+ |---------------------|------------|----------------------------------|
18
+ | `defect_id` | string | "BUG-142" |
19
+ | `affected_paths` | string[] | ["src/auth.ts", "tests/auth.test.ts"] |
20
+ | `evidence` | artifact | stack trace, failing test output, screenshot |
21
+
22
+ ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
+ - [ ] root cause evidence is present
24
+ - [ ] fix scope is bounded
25
+ - [ ] regression checks are defined
26
+
27
+ ## F. Execution Flow
28
+ 1. Read defect evidence and failing paths.
29
+ 2. Implement minimal change set.
30
+ 3. Run targeted validations.
31
+ 4. Decision point ->
32
+ - condition A -> validation fails -> iterate fix or abort
33
+ - condition B -> validation passes -> continue.
34
+ 5. Prepare change rationale and impact summary.
35
+ 6. Emit fix package with evidence.
36
+
37
+ ## G. Output Schema
38
+
39
+ ```json
40
+ {
41
+ "fix_id": "string",
42
+ "changed_files": ["array","of","strings"],
43
+ "risk": "low | medium | high",
44
+ "rollback_note": "string | null"
45
+ }
46
+ ```
47
+
48
+ ## H. Output Target
49
+ - Default delivery: stdout
50
+ - Override flag: --output=<target>
51
+
52
+ ## I. Stop Conditions <- abort with error message, never emit partial output
53
+ - no verified root-cause evidence
54
+ - regression validation unavailable for critical path
55
+
56
+ ## J. Safety Constraints
57
+ - Hard block: no broad refactor inside fix-only workflow
58
+ - Warn only: warn when temporary workaround is used
@@ -1,33 +1,58 @@
1
- # /learn-loop
2
-
3
- ## A. Intent
4
- Capture delivery lessons and convert them into concrete next-cycle actions.
5
-
6
- ## B. When to Use
7
- Use after release or milestone completion.
8
-
9
- ## C. Required Inputs
10
- - Completed work summary
11
- - Incident/defect outcomes
12
- - Team or process observations
13
-
14
- ## D. Deterministic Execution Flow
15
- 1. Summarize wins and misses.
16
- 2. Identify repeated friction points.
17
- 3. Propose concrete process and tooling actions.
18
- 4. Assign ownership and priority.
19
- 5. Emit next-cycle action list.
20
-
21
- ## E. Structured Output Template
22
- - `wins[]`
23
- - `misses[]`
24
- - `root_process_issues[]`
25
- - `next_actions[]`
26
- - `owner_map`
27
-
28
- ## F. Stop Conditions
29
- - No actionable next steps.
30
- - Lessons are not tied to observable outcomes.
31
-
32
- ## G. Safety Constraints
33
- - Avoid vague retrospectives without owned follow-through actions.
1
+ # /learn-loop
2
+
3
+ ## A. Intent
4
+ Capture deterministic retrospective outcomes and convert lessons into next-cycle actions.
5
+
6
+ ## B. When to Use
7
+ - Use after delivery milestones, incidents, or release cycles.
8
+ - Do not use for pre-implementation planning.
9
+
10
+ ## C. Context Assumptions
11
+ - Cycle outcome data is available.
12
+ - Owners for follow-up actions can be assigned.
13
+ - Retrospective scope is defined.
14
+
15
+ ## D. Required Inputs
16
+ | Input | Type | Example |
17
+ |---------------------|------------|----------------------------------|
18
+ | `cycle_name` | string | "Sprint 18" |
19
+ | `observations` | string[] | ["test flakiness", "scope churn"] |
20
+ | `evidence_artifact` | artifact | metrics dashboard, incident notes, PR links |
21
+
22
+ ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
+ - [ ] observations are evidence-backed
24
+ - [ ] action owners can be assigned
25
+ - [ ] follow-up window is defined
26
+
27
+ ## F. Execution Flow
28
+ 1. Collect outcomes, wins, and misses.
29
+ 2. Identify root process issues and patterns.
30
+ 3. Prioritize actionable improvements.
31
+ 4. Decision point ->
32
+ - condition A -> no actionable item -> request clearer observations
33
+ - condition B -> actionable set ready -> continue.
34
+ 5. Map actions to owners and timelines.
35
+ 6. Emit learn-loop action report.
36
+
37
+ ## G. Output Schema
38
+
39
+ ```json
40
+ {
41
+ "loop_id": "string",
42
+ "actions": ["array","of","strings"],
43
+ "urgency": "low | medium | high",
44
+ "blocker": "string | null"
45
+ }
46
+ ```
47
+
48
+ ## H. Output Target
49
+ - Default delivery: stdout
50
+ - Override flag: --output=<target>
51
+
52
+ ## I. Stop Conditions <- abort with error message, never emit partial output
53
+ - retrospective inputs are anecdotal without evidence
54
+ - no owner can be assigned to critical actions
55
+
56
+ ## J. Safety Constraints
57
+ - Hard block: hard block on publishing blame-focused output without actionable remediation
58
+ - Warn only: warn when metrics are incomplete but direction is still usable
@@ -1,34 +1,58 @@
1
- # /perf
2
-
3
- ## A. Intent
4
- Evaluate and optimize performance using measurable baselines.
5
-
6
- ## B. When to Use
7
- Use when latency, throughput, memory, or build-time regressions are reported.
8
-
9
- ## C. Required Inputs
10
- - Target metrics
11
- - Baseline environment
12
- - Optimization scope
13
-
14
- ## D. Deterministic Execution Flow
15
- 1. Capture baseline metrics.
16
- 2. Identify bottlenecks.
17
- 3. Apply one optimization unit.
18
- 4. Re-measure metrics.
19
- 5. Compare against baseline.
20
- 6. Emit performance report.
21
-
22
- ## E. Structured Output Template
23
- - `baseline_metrics`
24
- - `optimization_units[]`
25
- - `post_metrics`
26
- - `regression_check`
27
- - `recommendation`
28
-
29
- ## F. Stop Conditions
30
- - Missing baseline metrics.
31
- - Non-reproducible benchmark.
32
-
33
- ## G. Safety Constraints
34
- - Do not trade security controls for performance.
1
+ # /perf
2
+
3
+ ## A. Intent
4
+ Define and execute deterministic performance optimization workflow against known baselines.
5
+
6
+ ## B. When to Use
7
+ - Use when improving latency, throughput, or resource efficiency.
8
+ - Do not use for one-off smoke checks; use /perf-scan for quick regression comparison.
9
+
10
+ ## C. Context Assumptions
11
+ - Baseline metrics exist or can be captured.
12
+ - Performance target is defined.
13
+ - Measurement method is repeatable.
14
+
15
+ ## D. Required Inputs
16
+ | Input | Type | Example |
17
+ |---------------------|------------|----------------------------------|
18
+ | `performance_goal` | string | "p95 latency under 200ms" |
19
+ | `baseline_metrics` | string[] | ["p95=260ms", "cpu=70%"] |
20
+ | `benchmark_artifact` | artifact | profiling report or benchmark output |
21
+
22
+ ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
+ - [ ] goal is measurable
24
+ - [ ] baseline metric set is present
25
+ - [ ] benchmark method is consistent
26
+
27
+ ## F. Execution Flow
28
+ 1. Capture or validate baseline metrics.
29
+ 2. Apply targeted optimization changes.
30
+ 3. Measure post-change metrics.
31
+ 4. Decision point ->
32
+ - condition A -> target unmet -> iterate optimization
33
+ - condition B -> target met -> continue.
34
+ 5. Summarize gains, tradeoffs, and risks.
35
+ 6. Emit performance optimization report.
36
+
37
+ ## G. Output Schema
38
+
39
+ ```json
40
+ {
41
+ "perf_run_id": "string",
42
+ "metrics": ["array","of","strings"],
43
+ "impact": "low | medium | high",
44
+ "regression": "string | null"
45
+ }
46
+ ```
47
+
48
+ ## H. Output Target
49
+ - Default delivery: stdout
50
+ - Override flag: --output=<target>
51
+
52
+ ## I. Stop Conditions <- abort with error message, never emit partial output
53
+ - baseline cannot be measured reliably
54
+ - measurement method is non-deterministic
55
+
56
+ ## J. Safety Constraints
57
+ - Hard block: do not trade correctness/security for performance gains
58
+ - Warn only: warn when gains are within noise threshold
@@ -1,34 +1,58 @@
1
- # /plan
2
-
3
- ## A. Intent
4
- Generate an executable implementation plan with ordered steps and risk controls.
5
-
6
- ## B. When to Use
7
- Use for non-trivial work requiring sequencing, dependencies, and checkpoints.
8
-
9
- ## C. Required Inputs
10
- - Objective
11
- - Scope boundaries
12
- - Constraints
13
-
14
- ## D. Deterministic Execution Flow
15
- 1. Parse objective and constraints.
16
- 2. Extract atomic work units.
17
- 3. Compute dependency order.
18
- 4. Attach validation checkpoints.
19
- 5. Attach risk and rollback notes.
20
- 6. Emit plan artifacts.
21
-
22
- ## E. Structured Output Template
23
- - `plan_summary`
24
- - `work_units[]`
25
- - `dependency_graph`
26
- - `validation_checkpoints[]`
27
- - `risk_register[]`
28
-
29
- ## F. Stop Conditions
30
- - Missing objective or scope.
31
- - Contradictory constraints.
32
-
33
- ## G. Safety Constraints
34
- - Include security and testing gates for code-changing units.
1
+ # /plan
2
+
3
+ ## A. Intent
4
+ Build a deterministic implementation plan with scoped phases and acceptance checks.
5
+
6
+ ## B. When to Use
7
+ - Use when a feature or change request is approved for planning before coding starts.
8
+ - Do not use for post-incident debugging; use /debug-track instead.
9
+
10
+ ## C. Context Assumptions
11
+ - Problem statement and objective are available.
12
+ - Primary stakeholders and delivery window are known.
13
+ - Scope boundaries can be explicitly defined.
14
+
15
+ ## D. Required Inputs
16
+ | Input | Type | Example |
17
+ |---------------------|------------|----------------------------------|
18
+ | `objective` | string | "Ship onboarding v2" |
19
+ | `constraints` | string[] | ["2-week deadline", "no schema rewrite"] |
20
+ | `references` | artifact | PRD link, issue URL, screenshot |
21
+
22
+ ## E. Pre-Execution Guards <- fail fast, check ALL before running
23
+ - [ ] objective is non-empty and testable
24
+ - [ ] constraints are explicit and non-contradictory
25
+ - [ ] required references are accessible
26
+
27
+ ## F. Execution Flow
28
+ 1. Collect requirements and constraints.
29
+ 2. Split work into ordered phases and milestones.
30
+ 3. Attach measurable acceptance criteria per phase.
31
+ 4. Decision point ->
32
+ - condition A -> phase risk > threshold -> add mitigation gate
33
+ - condition B -> otherwise -> continue with baseline plan.
34
+ 5. Assemble plan artifacts and dependency map.
35
+ 6. Emit final plan package.
36
+
37
+ ## G. Output Schema
38
+
39
+ ```json
40
+ {
41
+ "plan_id": "string",
42
+ "phases": ["array","of","strings"],
43
+ "risk_level": "low | medium | high",
44
+ "notes": "string | null"
45
+ }
46
+ ```
47
+
48
+ ## H. Output Target
49
+ - Default delivery: stdout
50
+ - Override flag: --output=<target>
51
+
52
+ ## I. Stop Conditions <- abort with error message, never emit partial output
53
+ - any guard in section E fails
54
+ - acceptance criteria cannot be made measurable
55
+
56
+ ## J. Safety Constraints
57
+ - Hard block: no hidden scope expansion beyond declared boundaries
58
+ - Warn only: allow proceed with warning when estimate confidence is low