@homericintelligence/athena-opencode 0.5.0 → 0.5.2

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 (146) hide show
  1. package/README.md +30 -17
  2. package/package.json +2 -2
  3. package/plugin.js +20 -5
  4. package/skills/TECHNICAL_ENGLISH.md +78 -0
  5. package/skills/_cli.py +33 -22
  6. package/skills/_plugin.json +1 -0
  7. package/skills/_support/docs/dependency-resolution.md +203 -0
  8. package/skills/_support/docs/policies/development.md +131 -0
  9. package/skills/_support/docs/policies/evidence-integrity.md +40 -0
  10. package/skills/_support/docs/principles/README.md +565 -0
  11. package/skills/_support/docs/principles/details/p001-kiss.md +114 -0
  12. package/skills/_support/docs/principles/details/p002-yagni.md +109 -0
  13. package/skills/_support/docs/principles/details/p003-dry.md +126 -0
  14. package/skills/_support/docs/principles/details/p004-solid.md +165 -0
  15. package/skills/_support/docs/principles/details/p005-modularity.md +123 -0
  16. package/skills/_support/docs/principles/details/p006-principle-of-least-astonishment.md +115 -0
  17. package/skills/_support/docs/principles/details/p007-subtraction-over-addition.md +113 -0
  18. package/skills/_support/docs/principles/details/p008-understand-before-subtracting.md +115 -0
  19. package/skills/_support/docs/principles/details/p009-general-mechanisms-over-special-cases.md +108 -0
  20. package/skills/_support/docs/principles/details/p010-scope-fidelity.md +117 -0
  21. package/skills/_support/docs/principles/details/p011-minimal-coherent-change.md +128 -0
  22. package/skills/_support/docs/principles/details/p012-evidence-before-modification.md +115 -0
  23. package/skills/_support/docs/principles/details/p013-avoid-hasty-abstractions.md +112 -0
  24. package/skills/_support/docs/principles/details/p014-preserve-unrequested-behavior.md +110 -0
  25. package/skills/_support/docs/principles/details/p015-architecture-conformance.md +124 -0
  26. package/skills/_support/docs/principles/details/p016-separation-of-concerns.md +125 -0
  27. package/skills/_support/docs/principles/details/p017-high-cohesion-low-coupling.md +130 -0
  28. package/skills/_support/docs/principles/details/p018-information-hiding.md +128 -0
  29. package/skills/_support/docs/principles/details/p019-explicit-contracts.md +134 -0
  30. package/skills/_support/docs/principles/details/p020-executable-architecture.md +130 -0
  31. package/skills/_support/docs/principles/details/p021-evolutionary-and-reversible-design.md +126 -0
  32. package/skills/_support/docs/principles/details/p022-test-behavior-not-implementation.md +129 -0
  33. package/skills/_support/docs/principles/details/p023-parameterized-table-driven-testing.md +129 -0
  34. package/skills/_support/docs/principles/details/p024-boundary-value-testing.md +128 -0
  35. package/skills/_support/docs/principles/details/p025-property-based-testing-for-invariants.md +133 -0
  36. package/skills/_support/docs/principles/details/p026-regression-before-repair.md +134 -0
  37. package/skills/_support/docs/principles/details/p027-deterministic-and-hermetic-tests.md +128 -0
  38. package/skills/_support/docs/principles/details/p028-test-failure-paths.md +133 -0
  39. package/skills/_support/docs/principles/details/p029-generalize-error-policy-preserve-specific-cause.md +131 -0
  40. package/skills/_support/docs/principles/details/p030-nearest-responsible-error-boundary.md +133 -0
  41. package/skills/_support/docs/principles/details/p031-propagate-rather-than-swallow.md +131 -0
  42. package/skills/_support/docs/principles/details/p032-handle-once-preserve-causality.md +137 -0
  43. package/skills/_support/docs/principles/details/p033-state-safe-failure-semantics.md +140 -0
  44. package/skills/_support/docs/principles/details/p034-fail-fast.md +132 -0
  45. package/skills/_support/docs/principles/details/p035-fail-secure-fail-closed.md +137 -0
  46. package/skills/_support/docs/principles/details/p036-graceful-degradation.md +137 -0
  47. package/skills/_support/docs/principles/details/p037-idempotency-before-retry.md +139 -0
  48. package/skills/_support/docs/principles/details/p038-bounded-retry.md +145 -0
  49. package/skills/_support/docs/principles/details/p039-bounded-waiting.md +151 -0
  50. package/skills/_support/docs/principles/details/p040-bounded-resources.md +138 -0
  51. package/skills/_support/docs/principles/details/p041-backpressure-and-load-shedding.md +141 -0
  52. package/skills/_support/docs/principles/details/p042-fault-isolation-bulkheads.md +140 -0
  53. package/skills/_support/docs/principles/details/p043-circuit-breakers.md +148 -0
  54. package/skills/_support/docs/principles/details/p044-atomicity-where-possible.md +141 -0
  55. package/skills/_support/docs/principles/details/p045-compensation-where-atomicity-is-impossible.md +163 -0
  56. package/skills/_support/docs/principles/details/p046-resumability.md +138 -0
  57. package/skills/_support/docs/principles/details/p047-observability-is-part-of-correctness.md +134 -0
  58. package/skills/_support/docs/principles/details/p048-secure-by-design.md +132 -0
  59. package/skills/_support/docs/principles/details/p049-secure-by-default.md +126 -0
  60. package/skills/_support/docs/principles/details/p050-least-privilege.md +123 -0
  61. package/skills/_support/docs/principles/details/p051-complete-mediation.md +124 -0
  62. package/skills/_support/docs/principles/details/p052-separation-of-duties.md +129 -0
  63. package/skills/_support/docs/principles/details/p053-validate-at-trust-boundaries.md +126 -0
  64. package/skills/_support/docs/principles/details/p054-defense-in-depth.md +135 -0
  65. package/skills/_support/docs/principles/details/p055-minimize-attack-surface.md +133 -0
  66. package/skills/_support/docs/principles/details/p056-secrets-stay-out-of-code-and-context.md +137 -0
  67. package/skills/_support/docs/principles/details/p057-supply-chain-integrity.md +135 -0
  68. package/skills/_support/docs/principles/details/p058-bounded-agent-authority.md +137 -0
  69. package/skills/_support/docs/principles/details/p059-data-is-not-instruction.md +130 -0
  70. package/skills/_support/docs/principles/details/p060-constrain-sub-agents.md +136 -0
  71. package/skills/_support/docs/principles/details/p061-separate-decision-from-high-impact-execution.md +131 -0
  72. package/skills/_support/docs/principles/details/p062-human-approval-for-irreversible-or-high-risk-actions.md +129 -0
  73. package/skills/_support/docs/principles/details/p063-requirement-to-code-traceability.md +116 -0
  74. package/skills/_support/docs/principles/details/p064-requirement-to-test-traceability.md +116 -0
  75. package/skills/_support/docs/principles/details/p065-verify-before-claiming-completion.md +131 -0
  76. package/skills/_support/docs/principles/details/p066-preserve-existing-work.md +114 -0
  77. package/skills/_support/docs/principles/details/p067-no-test-cheating.md +126 -0
  78. package/skills/_support/docs/principles/details/p068-no-validation-bypass.md +119 -0
  79. package/skills/_support/docs/principles/details/p069-independent-review-for-high-risk-changes.md +129 -0
  80. package/skills/_support/docs/principles/details/p070-code-health-must-not-regress.md +116 -0
  81. package/skills/_support/docs/principles/details/p071-consistency-over-personal-preference.md +117 -0
  82. package/skills/_support/docs/principles/details/p072-technical-evidence-over-preference.md +122 -0
  83. package/skills/_support/docs/principles/details/p073-optimize-only-with-evidence.md +123 -0
  84. package/skills/_support/docs/principles/details/p074-prefer-existing-mechanisms.md +121 -0
  85. package/skills/_support/docs/principles/details/p075-make-invalid-states-hard-to-represent.md +128 -0
  86. package/skills/_support/docs/principles/details/p076-parse-then-validate-then-operate.md +133 -0
  87. package/skills/_support/docs/principles/details/p077-separate-policy-from-mechanism.md +112 -0
  88. package/skills/_support/docs/principles/details/p078-single-source-of-truth.md +131 -0
  89. package/skills/_support/docs/principles/details/p079-explicit-ownership-and-lifetimes.md +124 -0
  90. package/skills/_support/docs/principles/details/p080-make-concurrency-deliberate.md +122 -0
  91. package/skills/_support/docs/principles/details/p081-forward-progress-with-safety.md +125 -0
  92. package/skills/_support/docs/principles/details/p082-design-for-cancellation.md +133 -0
  93. package/skills/_support/docs/principles/details/p083-irreversible-actions-last.md +124 -0
  94. package/skills/_support/docs/principles/details/p084-prefer-local-reasoning.md +131 -0
  95. package/skills/_support/docs/principles/details/p085-explicit-is-better-than-implicit.md +123 -0
  96. package/skills/_support/docs/principles/details/p086-readability-counts.md +113 -0
  97. package/skills/_support/docs/principles/details/p087-comments-explain-why-code-explains-what.md +120 -0
  98. package/skills/_support/docs/principles/details/p088-delete-dead-code.md +125 -0
  99. package/skills/_support/docs/principles/details/p089-delete-obsolete-configuration-and-dependencies.md +125 -0
  100. package/skills/_support/docs/principles/details/p090-prefer-negative-code.md +134 -0
  101. package/skills/_support/docs/principles/details/p091-test-driven-development.md +149 -0
  102. package/skills/_support/docs/review/README.md +63 -0
  103. package/skills/_support/docs/review/behavior-first-testing.md +78 -0
  104. package/skills/_support/docs/review/common.md +400 -0
  105. package/skills/_support/docs/review/design-docs.md +74 -0
  106. package/skills/_support/docs/review/issue-planning.md +247 -0
  107. package/skills/_support/docs/review/language-routing.md +141 -0
  108. package/skills/_support/docs/review/repository-scorecard.md +170 -0
  109. package/skills/advise/SKILL.md +108 -74
  110. package/skills/advise/scripts/list_retrievable_skills.py +20 -8
  111. package/skills/advise/scripts/resolve_knowledge_checkout.py +533 -0
  112. package/skills/brainstorm/SKILL.md +163 -127
  113. package/skills/change-review/SKILL.md +91 -71
  114. package/skills/change-review/references/scope-resolution.md +69 -46
  115. package/skills/change-review/scripts/resolve_scope.py +144 -84
  116. package/skills/finalize-plan/SKILL.md +205 -139
  117. package/skills/git-worktrees/SKILL.md +100 -80
  118. package/skills/git-worktrees/scripts/prepare_worktree.py +34 -15
  119. package/skills/issue-review/SKILL.md +136 -79
  120. package/skills/learn/SKILL.md +359 -192
  121. package/skills/myrmidon-swarm/SKILL.md +126 -86
  122. package/skills/plan-issue/SKILL.md +122 -81
  123. package/skills/pr-review/SKILL.md +184 -116
  124. package/skills/pr-review/references/criteria.md +61 -37
  125. package/skills/pr-review/references/delivery.md +277 -101
  126. package/skills/pr-review/references/evidence.md +346 -149
  127. package/skills/pr-review/references/prevalidated.md +93 -61
  128. package/skills/pr-review/scripts/collect_evidence.py +312 -162
  129. package/skills/pr-review/scripts/deliver_go.py +701 -0
  130. package/skills/pr-review/scripts/diff_context.py +34 -15
  131. package/skills/pr-review/scripts/materialize_snapshot.py +141 -130
  132. package/skills/pr-review/scripts/pr_identity.py +27 -15
  133. package/skills/pr-review/scripts/resolve_pr.py +77 -41
  134. package/skills/realign/SKILL.md +516 -0
  135. package/skills/realign/references/aislop-integration.md +215 -0
  136. package/skills/realign/references/architecture-and-structure.md +271 -0
  137. package/skills/realign/references/control-flow-and-errors.md +344 -0
  138. package/skills/realign/references/tests-dependencies-and-security.md +261 -0
  139. package/skills/realign/scripts/resolve_assessment.py +1525 -0
  140. package/skills/repo-review/SKILL.md +202 -131
  141. package/skills/simplify/SKILL.md +174 -0
  142. package/skills/systematic-debugging/SKILL.md +212 -192
  143. package/skills/systematic-debugging/scripts/repository_evidence.py +26 -8
  144. package/skills/test-driven-development/SKILL.md +126 -96
  145. package/skills/tidy/SKILL.md +104 -59
  146. package/skills/tidy/scripts/run_tidy.py +54 -6
@@ -1,128 +1,168 @@
1
1
  ---
2
2
  name: myrmidon-swarm
3
3
  license: BSD-3-Clause
4
- description: Coordinate complex work through dependency-aware subagents in isolated worktrees, with a sequential fallback. Requires the Mnemosyne knowledge backend through advise and fails closed when it cannot be prepared.
4
+ description: Coordinate complex work with dependency-aware subagents in isolated worktrees. Use sequential work if the host cannot delegate. This skill requires the Mnemosyne knowledge backend through advise. Stop if the backend cannot be prepared.
5
5
  argument-hint: <task description>
6
6
  allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Agent]
7
7
  ---
8
8
 
9
9
  # Myrmidon swarm
10
10
 
11
- Use this for a task with several independently useful workstreams. Do not use it for work that one
12
- agent can complete more clearly.
11
+ Use this skill for a task that has multiple independent work items. Do not use it if one agent can
12
+ complete the task clearly.
13
+
14
+ Apply the [ASD-STE100 technical-English policy](../TECHNICAL_ENGLISH.md) to this skill and to
15
+ all prose that it produces.
13
16
 
14
17
  ## Engineering principles
15
18
 
16
- Use the [canonical engineering-principles catalog](../../docs/principles/README.md) through these
19
+ Use the [canonical engineering-principles catalog](../_support/docs/principles/README.md) for these
17
20
  workflow-specific rules:
18
21
 
19
- - [P019 — Explicit Contracts](../../docs/principles/README.md#p019): give every work item explicit
22
+ - [P019 — Explicit Contracts](../_support/docs/principles/README.md#p019): Give each work item explicit
20
23
  inputs, outputs, invariants, dependencies, acceptance criteria, and failure behavior.
21
- - [P033 — State-Safe Failure Semantics](../../docs/principles/README.md#p033): stop integration on
22
- failed or stale work and preserve a valid coordinator tree plus recoverable delegated state.
23
- - [P039 Bounded Waiting](../../docs/principles/README.md#p039): assign appropriate deadlines,
24
- timeout behavior, or cancellation conditions to delegated and background work.
25
- - [P050 Least Privilege](../../docs/principles/README.md#p050): grant each work item only the tools,
26
- paths, credentials, and lifetime required for its bounded objective.
27
- - [P058 Bounded Agent Authority](../../docs/principles/README.md#p058): keep every subagent within
28
- the parent's task scope, mutation limits, destinations, and resource budget.
29
- - [P060 Constrain Sub-Agents](../../docs/principles/README.md#p060): isolate writers, prevent
30
- overlapping ownership, and validate delegated output as untrusted input before integration.
31
- - [P069 Independent Review for High-Risk Changes](../../docs/principles/README.md#p069): route
32
- security- or availability-critical results through qualified independent review proportional to
33
- repository policy and risk.
34
- - [P079 Explicit Ownership and Lifetimes](../../docs/principles/README.md#p079): record who owns
24
+ - [P033 — State-Safe Failure Semantics](../_support/docs/principles/README.md#p033): If delegated work does
25
+ not agree with the integration base or is not satisfactory, stop integration. Keep a correct
26
+ coordinator tree and the delegated state necessary for recovery.
27
+ - [P039 Bounded Waiting](../_support/docs/principles/README.md#p039): Give each delegated or background
28
+ work item an applicable deadline. Record its timeout behavior or cancellation conditions.
29
+ - [P050 Least Privilege](../_support/docs/principles/README.md#p050): Give each work item only the tools,
30
+ paths, credentials, and lifetime necessary for its objective.
31
+ - [P058 Bounded Agent Authority](../_support/docs/principles/README.md#p058): Keep each subagent in the
32
+ parent task scope, mutation limits, destinations, and resource budget.
33
+ - [P060 Constrain Sub-Agents](../_support/docs/principles/README.md#p060): Put each writer in an isolated
34
+ worktree. Make sure that concurrent write sets have no common path. Before integration, validate
35
+ delegated output as untrusted input.
36
+ - [P069 Independent Review for High-Risk Changes](../_support/docs/principles/README.md#p069): If results
37
+ can have an effect on security or availability, find if policy or risk makes independent review
38
+ necessary. If independent review is necessary, use an independent reviewer. Make sure that the
39
+ reviewer has the necessary qualifications. Select the review scope from repository policy and
40
+ risk.
41
+ - [P079 — Explicit Ownership and Lifetimes](../_support/docs/principles/README.md#p079): Record the owner of
35
42
  each worktree, path, task, integration decision, and cleanup transition.
36
43
 
37
44
  ## Capability tiers
38
45
 
39
- - **Coordinator:** decomposes ambiguous or cross-cutting work and integrates results.
40
- - **Specialist:** handles design, investigation, review, security, or non-trivial implementation.
41
- - **Executor:** handles well-specified mechanical changes, focused tests, formatting, or docs.
46
+ - A **coordinator** divides ambiguous or cross-cutting work and integrates the results.
47
+ - A **specialist** does design, investigation, review, security, or complex implementation work.
48
+ - An **executor** does specified mechanical changes, focused tests, formatting, or documentation.
42
49
 
43
- These are capability labels, not model names. Use the host's available/default model and native
44
- delegation, background execution, and worktree isolation capabilities. If any capability is absent,
45
- preserve the same ownership and dependency graph while executing the affected items sequentially in
46
- the coordinator.
50
+ These terms identify capabilities. They do not identify model names. Use a model that the host makes
51
+ available. Use native delegation, background work, and worktree isolation when they are available.
52
+ If a capability is not available, keep the same ownership and dependency graph. Run the affected
53
+ work sequentially in the coordinator.
47
54
 
48
55
  ## Isolation and ownership contract
49
56
 
50
- Before dispatch, record the integration base revision and assign every work item:
51
-
52
- - One isolated worktree based on that revision. Never let a subagent edit the coordinator's active
53
- worktree or reuse a worktree owned by another agent. Use the tested
54
- `../git-worktrees/scripts/prepare_worktree.py` helper by its absolute path resolved from this skill
55
- directory while retaining the target repository as the current working directory. Supply an exact
56
- non-overlapping `--path`, its trusted `--path-root`, and `--start-point <integration-SHA>` when the
57
- host does not provide native worktree isolation.
58
- - An explicit file and directory ownership set. Concurrent write sets must not overlap. Shared files
59
- belong to the coordinator or to one designated integration item after dependent work completes.
60
- - A bounded objective, dependencies, acceptance criteria, validation commands, mutation limits,
61
- granted capabilities, and an appropriate deadline, timeout, or cancellation condition.
62
- - A delivery format the host can integrate, such as a reviewed commit, patch, or complete read-only
63
- report. The coordinator remains responsible for the final result.
64
-
65
- Read-only agents may inspect overlapping evidence, but they must not edit it. If safe isolation
66
- cannot be established, stop delegation and use the sequential fallback.
57
+ Before you start subagents, record the integration base revision. For each work item:
58
+
59
+ - Create one isolated worktree from the integration base revision. Do not let a subagent edit the
60
+ active worktree of the coordinator. Do not reuse a worktree that another agent owns. If the host
61
+ does not supply worktree isolation, use the tested
62
+ `../git-worktrees/scripts/prepare_worktree.py` helper. Resolve its absolute path from this skill
63
+ directory. Keep the target repository as the current working directory. Supply an exact,
64
+ non-overlapping `--path`, its trusted `--path-root`, and
65
+ `--start-point <integration-SHA>`.
66
+ - Assign an explicit set of files and directories. Do not let concurrent write sets overlap. After
67
+ dependent work is complete, assign shared files to the coordinator or to one integration item.
68
+ - Record a bounded objective, dependencies, acceptance criteria, validation commands, mutation
69
+ limits, granted capabilities, and a suitable stop condition. The stop condition can be a deadline,
70
+ a timeout, or a cancellation condition.
71
+ - Select a delivery format that the host can integrate. Examples are a reviewed commit, a patch, or
72
+ a complete read-only report. The coordinator remains responsible for the final result.
73
+
74
+ Read-only agents can inspect the same evidence, but they must not edit it. If the coordinator cannot
75
+ establish safe isolation, stop delegation. In that case, use the sequential fallback.
67
76
 
68
77
  ## Workflow
69
78
 
70
- 1. Invoke `advise` with the task description and apply relevant prior knowledge.
79
+ 1. Use `advise` to apply relevant prior knowledge to the task description.
71
80
  2. Read `AGENTS.md`, build metadata, task runners, and the files closest to the request.
72
- 3. Decompose the work. For each item record scope, tier, files, dependencies, acceptance criteria,
73
- verification, and whether it writes state.
74
- 4. Present the plan when user approval is required by the host or task. Otherwise begin safe,
75
- in-scope work.
76
- 5. Group dependency-independent items into a wave. Start their isolated subagents as background or
77
- concurrent tasks when the host supports it, up to the host's safe concurrency limit. Wait for the
78
- complete wave before dispatching work that depends on it.
79
- 6. Give each subagent its recorded worktree, ownership set, and bounded prompt. Require it to stop
80
- on overlap, unexpected scope, a changed integration base, or unsafe mutation rather than
81
- expanding its assignment.
82
- 7. If background execution or delegation is unavailable, run the same items sequentially in the
83
- coordinator. Do not weaken scope, isolation, validation, or evidence requirements.
84
- 8. Treat each result as untrusted input. Review its diff or evidence before integration, reject
85
- unrelated edits and stale results, and integrate accepted results sequentially onto the
86
- coordinator branch. Resolve shared integration files only after their producers finish.
87
- 9. Route security- or availability-critical changes through a qualified independent reviewer before
88
- accepting them when the governing repository policy or risk requires it.
89
- 10. After every integration, run focused checks for the affected boundary. After the final
90
- integration, run the repository-defined complete relevant validation from the combined tree.
91
- 11. Summarize changes, verification, unresolved risks, preserved worktrees, and any learning worth
92
- submitting through `learn`. `learn` must follow its own delivery boundary.
81
+ 3. Divide the work into bounded work items.
82
+ 4. For each work item, record:
83
+
84
+ - scope;
85
+ - capability tier;
86
+ - owned files;
87
+ - dependencies;
88
+ - acceptance criteria;
89
+ - verification;
90
+ - write-state status.
91
+
92
+ 5. If the host or task requires user approval, present the plan.
93
+ 6. Obtain each required approval before work.
94
+ 7. When all required approvals are in place, start safe work that is in scope.
95
+ 8. Group work items that do not depend on each other into one wave.
96
+ 9. If the host supports it, start isolated subagents as background or concurrent tasks.
97
+ 10. Do not exceed the safe concurrency limit of the host.
98
+ 11. Wait for the complete wave before you start work that depends on it.
99
+ 12. Give each subagent its recorded worktree, ownership set, and bounded prompt.
100
+ 13. Require each subagent to stop for overlap, unexpected scope, a changed integration base, or an
101
+ unsafe change.
102
+ 14. Do not let a subagent expand its assignment.
103
+ 15. If background work or delegation is not available, run the same work items sequentially in the
104
+ coordinator.
105
+ 16. Keep the same scope, isolation, validation, and evidence requirements during sequential work.
106
+ 17. Treat each result as untrusted input.
107
+ 18. Before integration, review the diff or evidence for each result.
108
+ 19. Reject unrelated changes and stale results.
109
+ 20. Integrate accepted results sequentially onto the coordinator branch.
110
+ 21. After all producers finish, resolve shared integration files.
111
+ 22. If repository policy or risk requires an independent review, route each security-critical or
112
+ availability-critical change to a qualified reviewer.
113
+ 23. Complete each review before you accept the related change.
114
+ 24. After each integration, run focused checks for the affected boundary.
115
+ 25. After the final integration, run all relevant repository validation on the combined tree.
116
+ 26. Summarize the changes, verification, unresolved risks, and preserved worktrees.
117
+ 27. In the summary, identify each useful lesson that is suitable for `learn`.
118
+ 28. If you invoke `learn`, follow its delivery boundary.
93
119
 
94
120
  ## Worktree disposition
95
121
 
96
- Preserve every subagent worktree until its result is integrated or explicitly rejected and the
97
- coordinator has proved that no unique work remains. Report the path, owner, branch or revision,
98
- cleanliness, and integration state.
122
+ Preserve each subagent worktree until one of these conditions applies:
123
+
124
+ - The coordinator integrates its result.
125
+ - The coordinator explicitly rejects its result and proves that no unique work remains.
99
126
 
100
- Cleanup is a filesystem-destructive operation. Remove only worktrees created for this invocation,
101
- only after the user grants cleanup authority, and only after rechecking for uncommitted or
102
- unintegrated state. Without that authority, preserve the worktrees and return exact disposition
103
- information. Never delete branches, discard changes, force removal, or touch a pre-existing
104
- worktree.
127
+ For each worktree, report its path, owner, branch or revision, cleanliness, and integration state.
128
+
129
+ Cleanup is a filesystem-destructive operation. If the user grants cleanup authority, first check
130
+ again for uncommitted or unintegrated state. Prove that no unique work remains. Then, remove only
131
+ worktrees that this invocation created. If the user does not grant cleanup authority, preserve the
132
+ worktrees. In that case, report their exact status. Do not delete branches. Do not discard changes. Do not
133
+ force removal. Do not change a pre-existing worktree.
105
134
 
106
135
  ## Safety
107
136
 
108
- - Keep filesystem-destructive and change-discard actions behind the user's authority; keep all
109
- constructive work within the requested scope and its repository safeguards.
137
+ - Keep filesystem-destructive and change-discard actions behind the user's authority.
138
+ - Keep constructive work within the requested scope and repository safeguards.
110
139
  - Preserve existing user changes and all pre-existing worktrees.
111
140
  - Never claim a subagent ran or a check passed without evidence.
112
- - Prefer the smallest number of agents that creates real parallel value.
141
+ - Use the minimum number of agents that can do independent work in parallel.
113
142
 
114
143
  ## Failed approaches
115
144
 
116
- - Letting specialists write outside their owned worktrees or file sets, or reusing another agent's
117
- worktree.
118
- - Merging, removing, or disposing worktrees without the disposition contract and the user's cleanup
119
- authority.
120
- - Reporting swarm status without per-specialist outcomes, evidence, and worktree disposition.
121
- - Expanding a subagent's assignment past its bounded prompt instead of stopping on overlap.
145
+ - Do not let specialists write outside their worktrees or file sets.
146
+ - Do not reuse a worktree that another agent owns.
147
+ - Do not merge results without the disposition contract.
148
+ - Do not remove worktrees without the disposition contract.
149
+ - Do not remove worktrees without user cleanup authority.
150
+ - Do not report swarm status without results, evidence, and worktree status for each specialist.
151
+ - Do not expand a subagent assignment beyond its bounded prompt. Stop if assignments overlap.
122
152
 
123
153
  ## Status format
124
154
 
125
- Report each work item with its tier, dependency wave, worktree, owned paths, execution mode
126
- (concurrent or sequential fallback), status, result, integration revision, and verification. The
127
- final summary must distinguish completed work from recommendations and unresolved blockers and
128
- must list every preserved or removed worktree.
155
+ For each work item, report:
156
+
157
+ - capability tier;
158
+ - dependency wave;
159
+ - worktree;
160
+ - owned paths;
161
+ - execution mode, which is concurrent or sequential fallback;
162
+ - status;
163
+ - result;
164
+ - integration revision;
165
+ - verification.
166
+
167
+ In the final summary, distinguish completed work from recommendations and unresolved blockers. List
168
+ each preserved or removed worktree.
@@ -1,111 +1,152 @@
1
1
  ---
2
2
  name: plan-issue
3
3
  license: BSD-3-Clause
4
- description: Draft or publish one canonical implementation plan for a GitHub or GitLab issue after architecture and knowledge review. Use when an issue needs an executable, behavior-first plan; `--draft` is read-only.
4
+ description: Draft or publish one canonical implementation plan for a GitHub or GitLab issue. Use this skill after architecture and knowledge review when an issue needs an executable, behavior-first plan. The `--draft` mode is read-only.
5
5
  argument-hint: "[--draft] ISSUE_NUMBER_OR_URL"
6
6
  allowed-tools: [Read, Bash, Grep, Glob, Agent]
7
7
  ---
8
8
 
9
9
  # Plan an issue
10
10
 
11
- Why: turn current issue requirements into the smallest architecture-aligned,
12
- behavior-verifiable plan before implementation begins.
11
+ Use this skill to create the smallest architecture-aligned plan for the current issue requirements.
12
+ Include behavior-first verification in the plan. Create the plan before implementation starts.
13
13
 
14
- Use the shared [issue-planning contract](../../docs/review/issue-planning.md),
15
- [review contract](../../docs/review/common.md),
16
- [language routing](../../docs/review/language-routing.md), and
17
- [behavior-first testing](../../docs/review/behavior-first-testing.md).
14
+ Apply the [ASD-STE100 technical-English policy](../TECHNICAL_ENGLISH.md) to this skill and to
15
+ all prose that it produces.
16
+
17
+ Use the shared [issue-planning contract](../_support/docs/review/issue-planning.md),
18
+ [review contract](../_support/docs/review/common.md),
19
+ [language routing](../_support/docs/review/language-routing.md), and
20
+ [behavior-first testing](../_support/docs/review/behavior-first-testing.md).
18
21
 
19
22
  ## Engineering principles
20
23
 
21
- Apply the canonical [engineering-principles catalog](../../docs/principles/README.md) through these
22
- planning decisions:
23
-
24
- - [P010 Scope Fidelity](../../docs/principles/README.md#p010) and
25
- [P063 Requirement-to-Code Traceability](../../docs/principles/README.md#p063) map every plan step to
26
- the exact issue requirements and exclude unrelated work.
27
- - [P012 Evidence Before Modification](../../docs/principles/README.md#p012) and
28
- [P015 Architecture Conformance](../../docs/principles/README.md#p015) require repository evidence
29
- and established boundaries to shape the plan before files or abstractions are proposed.
30
- - [P001 KISS — Keep It Simple, Stupid](../../docs/principles/README.md#p001),
31
- [P002 YAGNI You Ain't Gonna Need It](../../docs/principles/README.md#p002), and
32
- [P074 Prefer Existing Mechanisms](../../docs/principles/README.md#p074) select the smallest current,
33
- architecture-aligned solution using an appropriate existing mechanism where possible.
34
- - [P008 Understand Before Subtracting](../../docs/principles/README.md#p008) requires verified purpose,
35
- consumers, and contracts before a plan removes or consolidates an existing mechanism.
24
+ Use the canonical [engineering-principles catalog](../_support/docs/principles/README.md) for these
25
+ decisions:
26
+
27
+ - [P010 Scope Fidelity](../_support/docs/principles/README.md#p010):
28
+ - Do not include work that is not in the issue.
29
+ - [P063 Requirement-to-Code Traceability](../_support/docs/principles/README.md#p063):
30
+ - For each plan step, record a link to the applicable issue requirement.
31
+ - [P012 Evidence Before Modification](../_support/docs/principles/README.md#p012):
32
+ - Before you put files or abstractions in the plan, examine repository evidence.
33
+ - [P015 Architecture Conformance](../_support/docs/principles/README.md#p015):
34
+ - When you make the plan, obey established architecture boundaries and dependency directions.
35
+ - [P001 KISS Keep It Simple, Stupid](../_support/docs/principles/README.md#p001):
36
+ - Select the minimum solution that obeys all current requirements.
37
+ - [P002 YAGNI You Ain't Gonna Need It](../_support/docs/principles/README.md#p002):
38
+ - If a capability has no specified current requirement, do not add it.
39
+ - [P074 Prefer Existing Mechanisms](../_support/docs/principles/README.md#p074):
40
+ - If an applicable existing mechanism is available, use it.
41
+ - [P008 Understand Before Subtracting](../_support/docs/principles/README.md#p008):
42
+ - Before you plan a removal or consolidation, examine the mechanism's purpose, consumers, and
43
+ contracts.
36
44
 
37
45
  ## Scope and delivery
38
46
 
39
- `--draft` is read-only. A requested plan without it may publish only the
40
- actor-owned canonical-plan issue comment described by the issue-planning
41
- contract; it does not expand scope to implementation, labels, assignments, commits,
42
- pushes, pull requests, merges, or other forge mutations.
47
+ `--draft` is read-only. If the request does not include `--draft`, you may publish only the
48
+ actor-owned canonical-plan issue comment in the issue-planning contract. Do not implement code. Do
49
+ not change labels or assignments. Do not create commits. Do not push branches. Do not create pull
50
+ requests. Do not merge changes. Do not make other forge changes.
43
51
 
44
- Use the forge's native issue-comment mechanism. If it cannot safely identify or
45
- update the actor-owned plan, return a ready-to-publish draft and explain the
46
- capability or ownership gap.
52
+ Use the native issue-comment mechanism of the forge. If the forge cannot safely identify or update
53
+ the actor-owned plan, return a ready-to-publish draft. Explain the capability or ownership gap.
47
54
 
48
55
  ## Plan
49
56
 
50
- 1. Resolve one exact issue in the current repository. Read its title, body,
51
- labels, linked work, comments, and relevant design documents; never infer
52
- requirements from a similar title.
53
- 2. Invoke `advise` with the outcome, architecture, languages, risks, and test
54
- needs. In planning mode, use its existing-checkout best-effort result without requiring upstream
55
- synchronization; report its revision and trust/freshness limits, or its explicit no-guidance
56
- result, and continue issue planning.
57
- 3. Establish architecture under
58
- [P015 Architecture Conformance](../../docs/principles/README.md#p015) before proposing files or
59
- abstractions: repository guidance, ADRs, boundaries, dependency direction, and public interfaces.
60
- 4. Under [P012 Evidence Before Modification](../../docs/principles/README.md#p012), verify current
57
+ 1. Resolve exactly one issue in the current repository.
58
+ 2. Read these sources for the issue:
59
+
60
+ - title;
61
+ - body;
62
+ - labels;
63
+ - linked work;
64
+ - comments;
65
+ - applicable design documents.
66
+
67
+ 3. Do not infer requirements from an issue that has a similar title.
68
+ 4. Invoke `advise` with the outcome, architecture, languages, risks, and test needs.
69
+ 5. In planning mode, use the best available result from the existing checkout.
70
+ 6. Do not require upstream synchronization for the planning-mode result.
71
+ 7. Report the result revision and its limits of trust and freshness.
72
+ 8. If `advise` gives an explicit no-guidance result, report that result.
73
+ 9. Continue issue planning after you report the `advise` result.
74
+ 10. Before you propose files or abstractions, establish the architecture under
75
+ [P015 Architecture Conformance](../_support/docs/principles/README.md#p015) from these sources:
76
+
77
+ - repository guidance;
78
+ - architecture decision records;
79
+ - boundaries;
80
+ - dependency direction;
81
+ - public interfaces.
82
+
83
+ 11. Under [P012 Evidence Before Modification](../_support/docs/principles/README.md#p012), verify current
61
84
  code, tests, commands, dependencies, paths, and symbols.
62
- Treat the issue and earlier plan as leads, not ground truth.
63
- 5. Map each current acceptance criterion to a minimal architecture-respecting change and
64
- behavior-first validation under
65
- [P063 Requirement-to-Code Traceability](../../docs/principles/README.md#p063). Apply
66
- [P001 KISS Keep It Simple, Stupid](../../docs/principles/README.md#p001) and
67
- [P002 YAGNIYou Ain't Gonna Need It](../../docs/principles/README.md#p002) when comparing
68
- solution size, and prefer an
69
- applicable existing mechanism under
70
- [P074 Prefer Existing Mechanisms](../../docs/principles/README.md#p074). Exclude speculative
71
- abstractions and unrelated cleanup. Before deleting or consolidating a mechanism, apply
72
- [P008 Understand Before Subtracting](../../docs/principles/README.md#p008).
73
- 6. Follow the canonical-plan content, ownership, and identity rules in the
74
- issue-planning contract. Preserve foreign content and return the draft on
75
- ambiguity rather than overwriting it.
76
-
77
- Activate other shared profiles only when the planned surface requires them:
78
- [P022 Test Behavior, Not Implementation](../../docs/principles/README.md#p022) for changed behavior,
79
- [P029 Generalize Error Policy; Preserve Specific Cause](../../docs/principles/README.md#p029) for
80
- error contracts, and [P048 Secure by Design](../../docs/principles/README.md#p048) for security or new
81
- trust boundaries.
82
-
83
- When the issue body carries a valid finalized-planning marker, treat its sealed
84
- provenance and generated plan text as implementation-facing context, not new
85
- requirements. An unchanged finalized epoch needs no new plan. A later material
86
- issue-body edit starts a fresh requirements state and must be planned from that
87
- edit under the issue-planning contract.
85
+ 12. Treat the issue and an earlier plan as sources to verify, not as verified evidence.
86
+ 13. Under [P063 Requirement-to-Code Traceability](../_support/docs/principles/README.md#p063), map each
87
+ current acceptance criterion to a minimum architecture-aligned change and behavior-first
88
+ validation.
89
+ 14. When you compare solution sizes, apply
90
+ [P001 KISSKeep It Simple, Stupid](../_support/docs/principles/README.md#p001) and
91
+ [P002 YAGNI You Ain't Gonna Need It](../_support/docs/principles/README.md#p002).
92
+ 15. Prefer an applicable existing mechanism under
93
+ [P074 Prefer Existing Mechanisms](../_support/docs/principles/README.md#p074).
94
+ 16. Do not include speculative abstractions or unrelated cleanup.
95
+ 17. Before you delete or consolidate a mechanism, apply
96
+ [P008 Understand Before Subtracting](../_support/docs/principles/README.md#p008).
97
+ 18. Follow the canonical-plan content, ownership, and identity rules in the issue-planning contract.
98
+ 19. Preserve all content that another actor owns.
99
+ 20. If ownership or identity is ambiguous, return the draft.
100
+ 21. Do not overwrite content with ambiguous ownership or identity.
101
+
102
+ Activate these shared profiles only for the specified surface:
103
+
104
+ - For changed behavior, activate
105
+ [P022 Test Behavior, Not Implementation](../_support/docs/principles/README.md#p022).
106
+ - For error contracts, activate
107
+ [P029 Generalize Error Policy; Preserve Specific Cause](../_support/docs/principles/README.md#p029).
108
+ - For security or a new trust boundary, activate
109
+ [P048 Secure by Design](../_support/docs/principles/README.md#p048).
110
+
111
+ If the issue body has a valid finalized-planning marker, use only its sealed provenance as
112
+ implementation context. Use the generated plan text for the same purpose. Do not treat them as new
113
+ requirements. If the finalized epoch is unchanged, do not create a new plan. If a later material
114
+ edit changes the issue body, start a new requirements state. Plan from that edit under the
115
+ issue-planning contract.
88
116
 
89
117
  For a material architecture decision, include or cite a
90
- [design record](../../docs/review/design-docs.md) that leads with why, then its
91
- block diagram and high-level design before clear component details. Do not
92
- create a durable design artifact for a simple change without a repository need.
118
+ [design record](../_support/docs/review/design-docs.md). Start the design record with the reason for the
119
+ decision. Then, give the block diagram and high-level design before clear component details. Do not
120
+ create a durable design artifact for a simple change unless the repository needs it.
93
121
 
94
- Name only repository-discovered validation commands; never claim an unrun
95
- command passed or create a prose-string test to make the plan look verifiable.
96
- Immediately before publication, re-resolve the canonical identity and withhold
97
- the update if the requirements, marker, comment, or plan content drifted.
122
+ Name only validation commands that you find in the repository. Do not claim that a command passed
123
+ if you did not run it. Do not create a prose-string test to make the plan appear verifiable.
124
+ Immediately before publication, resolve the canonical identity again. If the requirements, marker,
125
+ comment, or plan content changed, withhold the update.
98
126
 
99
127
  ## Failed approaches
100
128
 
101
- - Planning from the issue title alone or inferring requirements from a similar issue.
102
- - Embedding unverified assumptions instead of verifying paths, symbols, and commands against
103
- current repository evidence and citing `file:line`.
104
- - Starting implementation during planning, or expanding delivery past the canonical-plan comment.
105
- - Claiming an unrun validation command passed, or overwriting foreign plan content on ambiguity.
129
+ - Do not plan from the issue title alone.
130
+ - Do not infer requirements from a similar issue.
131
+ - Do not include an assumption before you verify paths, symbols, and commands in current repository
132
+ evidence. Cite the evidence as `file:line`.
133
+ - Do not start implementation during planning.
134
+ - Do not deliver changes beyond the canonical-plan comment.
135
+ - Do not claim that a validation command passed if you did not run it.
136
+ - Do not overwrite content from another actor if ownership is ambiguous.
106
137
 
107
138
  ## Result
108
139
 
109
- Return the issue, architecture decision, Mnemosyne revision or no-guidance status and relevant
110
- guidance, plan action or draft, requirement mapping, validation plan, and every unresolved decision.
111
- If published, return the forge URL or comment identity; otherwise state why publication was withheld.
140
+ Return these items:
141
+
142
+ - issue identity;
143
+ - architecture decision;
144
+ - Mnemosyne revision or no-guidance status;
145
+ - applicable guidance;
146
+ - plan action or draft;
147
+ - requirement mapping;
148
+ - validation plan;
149
+ - each unresolved decision.
150
+
151
+ If you publish the plan, return the forge URL or comment identity. If you withhold publication,
152
+ state the reason.