@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,141 +1,161 @@
1
1
  ---
2
2
  name: git-worktrees
3
3
  license: BSD-3-Clause
4
- description: Use when starting feature work that needs isolation from current workspace creates isolated git worktrees with safety verification. Fails closed, reporting and stopping without creating or deleting anything when the target directory is not ignored or a clean base commit cannot be verified.
4
+ description: Use for feature work that needs an isolated Git worktree. If Git does not ignore a project-local directory, use the verified temporary-directory fallback. If repository guidance requires the local directory, report the problem. In that case, stop before creation. If the helper cannot verify a clean base commit, report the problem. In that case, stop before creation. Do not delete anything.
5
5
  argument-hint: <branch-name or feature description>
6
6
  allowed-tools: [Bash, Read]
7
7
  ---
8
8
 
9
- # Using Git Worktrees
9
+ # Use Git worktrees
10
10
 
11
11
  ## Overview
12
12
 
13
- Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
13
+ Git worktrees are isolated workspaces that share one repository. You can work on multiple branches
14
+ at the same time. You do not have to switch the active branch.
14
15
 
15
- **Working rule:** Systematic directory selection plus safety verification produces reliable
16
- isolation.
16
+ Apply the [ASD-STE100 technical-English policy](../TECHNICAL_ENGLISH.md) to this skill and to all
17
+ prose that it produces.
17
18
 
18
- **When NOT to use this skill manually:** The `myrmidon-swarm` skill owns worktree creation for its
19
- background subagents. Use this skill for manual development work, not to duplicate swarm setup.
19
+ **Rule:** Select the directory systematically. Then complete the safety checks. These actions give
20
+ reliable isolation.
21
+
22
+ **Do not use this skill for `myrmidon-swarm` worktrees.** That skill creates worktrees for its
23
+ background subagents. Use this skill for manual development work.
20
24
 
21
25
  ## Engineering principles
22
26
 
23
- Use the [canonical engineering-principles catalog](../../docs/principles/README.md) through these
27
+ Use the [canonical engineering-principles catalog](../_support/docs/principles/README.md) for these
24
28
  workflow-specific rules:
25
29
 
26
- - [P010 — Scope Fidelity](../../docs/principles/README.md#p010): create only the requested isolated
27
- branch and worktree; leave cleanup and unrelated repository changes to their owning workflows.
28
- - [P012 — Evidence Before Modification](../../docs/principles/README.md#p012): inspect repository
29
- guidance, the selected base revision, directory state, ignore rules, and baseline checks first.
30
- - [P021 — Evolutionary and Reversible Design](../../docs/principles/README.md#p021): isolate feature
31
- work at an exact base so it can be reviewed, integrated, preserved, or abandoned independently.
32
- - [P033 State-Safe Failure Semantics](../../docs/principles/README.md#p033): fail before creation
33
- when validation fails and preserve any created worktree when later setup or tests fail.
34
- - [P053Validate at Trust Boundaries](../../docs/principles/README.md#p053): pass branch, base, path,
35
- and path-root values through the tested helper's validation rather than composing raw Git commands.
36
- - [P058 — Bounded Agent Authority](../../docs/principles/README.md#p058): bind creation to the named
37
- branch, exact start SHA, validated destination, and requested feature scope.
38
- - [P065 Verify Before Claiming Completion](../../docs/principles/README.md#p065): report the actual
39
- path and start SHA and run the repository-defined clean-baseline checks before declaring readiness.
40
- - [P083Irreversible Actions Last](../../docs/principles/README.md#p083): complete dry-run and safety
41
- validation before creating the branch and worktree, and delegate later removal to `tidy`.
42
-
43
- ## Directory Selection
30
+ - [P010 — Scope Fidelity](../_support/docs/principles/README.md#p010): Make only the requested isolated
31
+ branch and worktree. Delegate cleanup and unrelated changes to the applicable workflows.
32
+ - [P012 — Evidence Before Modification](../_support/docs/principles/README.md#p012): Before creation,
33
+ examine repository guidance, the selected base revision, directory state, ignore rules, and
34
+ baseline checks.
35
+ - [P021 Evolutionary and Reversible Design](../_support/docs/principles/README.md#p021): Put feature work
36
+ in an isolated worktree at the selected base commit. Only if you have user authority and can use
37
+ the cleanup workflow, remove the worktree.
38
+ - [P033State-Safe Failure Semantics](../_support/docs/principles/README.md#p033): If validation is not
39
+ satisfactory, stop before creation. If setup or a test after creation is not satisfactory, keep
40
+ the worktree.
41
+ - [P053 Validate at Trust Boundaries](../_support/docs/principles/README.md#p053): Use the tested helper
42
+ to validate branch, base, path, and path-root values. Do not use these values in a Git command
43
+ without the helper.
44
+ - [P058Bounded Agent Authority](../_support/docs/principles/README.md#p058): Make only the named branch
45
+ and worktree for the requested feature. Use the selected start commit and validated destination.
46
+ - [P065 — Verify Before Claiming Completion](../_support/docs/principles/README.md#p065): Before you report
47
+ that you prepared the worktree, do the repository checks for a clean baseline. Report the path
48
+ and start commit.
49
+ - [P083 — Irreversible Actions Last](../_support/docs/principles/README.md#p083): Before creation, complete
50
+ the dry-run. Before creation, complete the safety validation. Use `tidy` for removal.
51
+
52
+ ## Select the directory
44
53
 
45
54
  Follow this priority order:
46
55
 
47
- ### 1. Check Existing Directories
56
+ ### 1. Check existing directories
48
57
 
49
58
  The tested `scripts/prepare_worktree.py` helper checks `.worktrees` and then `worktrees`. If both
50
- exist, `.worktrees` wins.
59
+ directories exist, the helper selects `.worktrees`.
51
60
 
52
61
  ### 2. Check repository guidance
53
62
 
54
- Read `AGENTS.md` and its referenced repository guidance. If a preference is specified, pass it to
55
- the helper with `--directory DIRECTORY`.
63
+ Read `AGENTS.md` and its referenced repository guidance. If repository guidance specifies a
64
+ preference, pass it to the helper with `--directory DIRECTORY`.
56
65
 
57
66
  ### 3. Portable default
58
67
 
59
- When no repository preference exists, use the host's temporary directory from
60
- `tempfile.gettempdir()` with `<project>-<branch>`. This is commonly `/tmp` on Unix-like hosts and
61
- avoids polluting the project directory.
68
+ If the repository does not specify a location, use the host temporary directory from
69
+ `tempfile.gettempdir()` with `<project>-<branch>`. On Unix-like hosts, this directory is usually
70
+ `/tmp`. This location keeps the worktree outside the project directory.
62
71
 
63
72
  The helper computes the project name from the repository root.
64
73
 
65
- ## Safety Verification
74
+ ## Verify safety
66
75
 
67
- ### For Project-Local Directories (.worktrees or worktrees)
76
+ ### For project-local directories
68
77
 
69
- **MUST verify directory is ignored before creating worktree.** The helper fails closed when its
70
- project-local directory is not ignored.
78
+ Before you create a project-local worktree, verify that Git ignores its directory. If Git does not
79
+ ignore the directory, the helper stops before it makes a change.
71
80
 
72
- **If NOT ignored:**
81
+ #### If Git does not ignore the directory
73
82
 
74
- 1. Do not silently edit or commit `.gitignore`, and do not create the project-local worktree.
75
- 2. Prefer a safe temporary destination by passing both
76
- `--path <temporary-root>/<project>-<branch>` and `--path-root <temporary-root>` to the helper;
77
- derive `<temporary-root>` from the host and report the fallback path.
78
- 3. If repository guidance requires the project-local directory, report the unmet ignore-policy
79
- prerequisite and stop. Change `.gitignore` only as a separately authorized, scoped change; after
80
- that change is validated and committed, rerun worktree preparation.
83
+ 1. Do not edit `.gitignore`.
84
+ 2. Do not commit `.gitignore`.
85
+ 3. Do not create the project-local worktree.
86
+ 4. If repository guidance requires the project-local directory, report the ignore-policy
87
+ prerequisite.
88
+ 5. If repository guidance requires the project-local directory, stop.
89
+ 6. Change `.gitignore` only in a separate authorized change.
90
+ 7. After that change is validated and committed, prepare the worktree again.
91
+ 8. If repository guidance does not require the project-local directory, get `<temporary-root>` from
92
+ the host.
93
+ 9. Give preference to a safe temporary destination.
94
+ 10. Pass `--path <temporary-root>/<project>-<branch>` and `--path-root <temporary-root>` to the helper.
95
+ 11. Report the fallback path.
81
96
 
82
- **Why critical:** Prevents accidentally committing worktree contents to repository.
97
+ This check prevents Git from tracking the worktree contents.
83
98
 
84
- ### For /tmp Locations
99
+ ### For `/tmp` locations
85
100
 
86
- No `.gitignore` verification needed outside the project entirely.
101
+ You do not have to verify `.gitignore` for a path under `/tmp`. This path is outside the project.
87
102
 
88
- ## Creation Steps
103
+ ## Create the worktree
89
104
 
90
- 1. Resolve and record the intended base commit SHA.
91
- 2. Keep the target repository as the current working directory. Resolve `scripts/prepare_worktree.py`
92
- against this installed skill directory and invoke that absolute helper path with
93
- `BRANCH_NAME --start-point BASE_SHA --dry-run`. For a contract requiring a distinct branch and
94
- path, also pass exact `--path` and `--path-root` values.
95
- 3. Create it with the same arguments without `--dry-run`, optionally supplying the documented
96
- repository preference through `--directory`. When an unignored local directory requires the
97
- temporary fallback, pass the same exact `--path` and `--path-root` to both calls. Never replace
98
- the recorded SHA with ambient HEAD.
99
- 4. Change to the returned path and run the repository-defined bootstrap when one exists.
100
- 5. Verify a clean baseline with the repository-defined tests and report the path, start SHA, and result.
105
+ 1. Resolve the intended base commit SHA.
106
+ 2. Record the intended base commit SHA.
107
+ 3. Keep the target repository as the current working directory.
108
+ 4. Resolve `scripts/prepare_worktree.py` from this installed skill directory.
109
+ 5. Prepare `BRANCH_NAME --start-point BASE_SHA --dry-run` as the helper arguments.
110
+ 6. If the contract requires a distinct branch and path, add exact `--path` and `--path-root` values.
111
+ 7. If repository guidance specifies a directory, add it through `--directory`.
112
+ 8. If an unignored local directory requires the temporary fallback, retain the exact `--path` and
113
+ `--path-root` values.
114
+ 9. For this fallback, use those values for both helper calls.
115
+ 10. Invoke the helper by its absolute path with the prepared dry-run arguments.
116
+ 11. Create the worktree with the same arguments without `--dry-run`.
117
+ 12. Do not replace the recorded SHA with the current `HEAD`.
118
+ 13. Change to the returned path.
119
+ 14. If the repository defines a bootstrap, run it.
120
+ 15. Use the repository tests to verify a clean baseline.
121
+ 16. Report the path, start SHA, and result.
101
122
 
102
- **If tests fail:** Report failures, ask whether to proceed or investigate.
123
+ **If the tests fail:** Report the failures. Ask whether to continue or investigate.
103
124
 
104
- **If tests pass:** Report ready.
125
+ **If the tests pass:** Report that the worktree is ready.
105
126
 
106
- ## Cleanup
127
+ ## Clean up
107
128
 
108
- When work is done, invoke `tidy` for branch and worktree cleanup. It prepares the trusted
109
- Hephaestus dependency and delegates directly to `hephaestus-tidy`, whose interactive workflow owns
110
- discovery, preservation rules, deletion prompts, rebases, and cleanup safeguards. Do not duplicate
111
- that policy or improvise deletion commands in this skill.
129
+ When the work is complete, invoke `tidy` for branch and worktree cleanup. `tidy` prepares the trusted
130
+ Hephaestus dependency. It delegates the work directly to `hephaestus-tidy`. The interactive workflow
131
+ controls discovery, preservation rules, deletion prompts, rebases, and cleanup safeguards. Do not
132
+ duplicate that policy. Do not write deletion commands in this skill.
112
133
 
113
134
  Preserve the worktree by default. Delivery, merge, abandonment, or a general cleanup request does
114
- not itself authorize this skill to remove it; route any cleanup through `tidy` and leave the
115
- decision to the Hephaestus workflow and the user's answers to its prompts.
135
+ not authorize this skill to remove the worktree. Use `tidy` for each cleanup. The Hephaestus
136
+ workflow and the user's answers to its prompts control the removal decision.
116
137
 
117
138
  ## Quick Reference
118
139
 
119
140
  | Situation | Action |
120
141
  | ----------- | -------- |
121
- | `.worktrees/` exists + ignored | Use it |
142
+ | `.worktrees/` exists and is ignored | Use it. |
122
143
  | Neither exists | Use the host temporary directory with `<project>-<branch>` |
123
- | Directory not ignored | Use and report an explicit temporary path, or stop on a repository-mandated local path |
124
- | Tests fail at baseline | Report failures + ask before proceeding |
144
+ | Directory is not ignored | Use an explicit temporary path. Report the path. If the repository requires a local path, stop. |
145
+ | Tests fail at baseline | Report the failures. Ask before you continue. |
125
146
 
126
147
  ## Failed approaches
127
148
 
128
- - **Skipping ignore verification** for project-local worktrees contents get tracked
129
- - **Proceeding with failing baseline** can't distinguish new bugs from pre-existing
130
- - **Not cleaning up** stale worktrees accumulate
131
-
132
- ## Integration
149
+ - Do not skip ignore verification for a project-local worktree. Git can track the worktree contents.
150
+ - If the baseline tests fail, do not continue unless the user explicitly tells you to continue. You
151
+ cannot separate new defects from existing defects.
152
+ - When cleanup is authorized, use `tidy`. Do not leave stale worktrees.
133
153
 
134
- **Pairs with:**
154
+ ## Related workflow
135
155
 
136
156
  - Invoke `tidy` for dependency-locked delegation to Hephaestus branch and worktree cleanup.
137
- - Verify with fresh runnable evidence per the evidence-integrity policy before finishing and
138
- cleaning up.
157
+ - Before you report completion or start cleanup, get fresh runnable evidence. Follow the
158
+ [evidence-integrity policy](../_support/docs/policies/evidence-integrity.md).
139
159
 
140
160
  ---
141
161
 
@@ -1,18 +1,31 @@
1
1
  #!/usr/bin/env python3
2
- """Select, validate, and optionally create an isolated Git worktree."""
2
+ """Prepare an isolated Git worktree."""
3
3
 
4
4
  from __future__ import annotations
5
5
 
6
+ import importlib.util
6
7
  import json
7
8
  import subprocess
8
9
  import sys
9
10
  import tempfile
10
11
  from pathlib import Path
11
-
12
- if __package__ in {None, ""}:
13
- sys.path.insert(0, str(Path(__file__).resolve().parents[3]))
14
-
15
- from skills._cli import argument_parser, run_command
12
+ from typing import TYPE_CHECKING
13
+
14
+ if TYPE_CHECKING or __package__ not in {None, ""}:
15
+ from skills._cli import argument_parser, run_command
16
+ else:
17
+ _cli_path = Path(__file__).resolve().parents[2] / "_cli.py"
18
+ _cli_spec = importlib.util.spec_from_file_location(
19
+ "athena_installed_cli", _cli_path
20
+ )
21
+ if _cli_spec is None or _cli_spec.loader is None:
22
+ raise RuntimeError(
23
+ f"The installed Athena CLI helper is unavailable: '{_cli_path}'."
24
+ )
25
+ _cli = importlib.util.module_from_spec(_cli_spec)
26
+ _cli_spec.loader.exec_module(_cli)
27
+ argument_parser = _cli.argument_parser
28
+ run_command = _cli.run_command
16
29
 
17
30
 
18
31
  def git(
@@ -22,23 +35,27 @@ def git(
22
35
  ["git", *arguments], cwd=cwd, capture_output=True, text=True, check=False
23
36
  )
24
37
  if check and result.returncode != 0:
25
- raise RuntimeError(result.stderr.strip() or f"git {' '.join(arguments)} failed")
38
+ raise RuntimeError(
39
+ result.stderr.strip() or f"The git {' '.join(arguments)} command failed."
40
+ )
26
41
  return result
27
42
 
28
43
 
29
44
  def reject_symlinks_below(trust_root: Path, target: Path) -> None:
30
- """Reject symlinks in the caller-controlled path below a trusted root."""
45
+ """Reject symbolic links in a caller-controlled path below a trusted root."""
31
46
  lexical_root = trust_root.absolute()
32
47
  lexical_target = target.absolute()
33
48
  try:
34
49
  lexical_target.relative_to(lexical_root)
35
50
  except ValueError as error:
36
51
  raise RuntimeError(
37
- f"worktree path escapes trusted root {lexical_root}"
52
+ f"The worktree path is outside the trusted root: '{lexical_root}'."
38
53
  ) from error
39
54
  for component in (*reversed(lexical_target.parents), lexical_target):
40
55
  if component.is_symlink():
41
- raise RuntimeError(f"worktree path component is a symlink: {component}")
56
+ raise RuntimeError(
57
+ f"A component of the worktree path is a symbolic link: '{component}'."
58
+ )
42
59
 
43
60
 
44
61
  def select_path(
@@ -66,7 +83,8 @@ def select_path(
66
83
  if directory.is_dir():
67
84
  if directory.is_symlink():
68
85
  raise RuntimeError(
69
- f"project-local worktree directory is a symlink: {directory}"
86
+ "The project-local worktree directory is a symbolic link: "
87
+ f"'{directory}'."
70
88
  )
71
89
  return (directory / branch).resolve(), True
72
90
  project = root.name
@@ -82,7 +100,8 @@ def verify_ignored(root: Path, path: Path) -> None:
82
100
  result = git(root, "check-ignore", "-q", "--", str(probe), check=False)
83
101
  if result.returncode != 0:
84
102
  raise RuntimeError(
85
- f"project-local worktree directory {relative.parent} is not ignored"
103
+ "Git did not confirm that it ignores the project-local worktree directory: "
104
+ f"'{relative.parent}'."
86
105
  )
87
106
 
88
107
 
@@ -102,9 +121,9 @@ def main() -> int:
102
121
  root, "check-ref-format", "--branch", arguments.branch, check=False
103
122
  )
104
123
  if branch_check.returncode != 0:
105
- raise RuntimeError(f"invalid branch name: {arguments.branch}")
124
+ raise RuntimeError(f"The branch name is not valid: '{arguments.branch}'.")
106
125
  if (arguments.path is None) != (arguments.path_root is None):
107
- raise RuntimeError("--path and --path-root must be provided together")
126
+ raise RuntimeError("Specify '--path' and '--path-root' together.")
108
127
  path, project_local = select_path(
109
128
  root,
110
129
  arguments.branch,
@@ -121,7 +140,7 @@ def main() -> int:
121
140
  if project_local:
122
141
  verify_ignored(root, path)
123
142
  if path.exists():
124
- raise RuntimeError(f"worktree path already exists: {path}")
143
+ raise RuntimeError(f"The worktree path already exists: '{path}'.")
125
144
  if not arguments.dry_run:
126
145
  git(
127
146
  root,
@@ -1,106 +1,163 @@
1
1
  ---
2
2
  name: issue-review
3
3
  license: BSD-3-Clause
4
- description: Review a GitHub or GitLab issue and its current plan-issue artifact for architecture alignment, scope, risks, and behavior-first verification. Use before implementation; `--report-only` is read-only.
4
+ description: Use before implementation to review a GitHub or GitLab issue and its current `plan-issue` artifact. Check architecture, scope, risk, and behavior-first verification. Use `--report-only` for read-only work.
5
5
  argument-hint: "[--report-only] ISSUE_NUMBER_OR_URL"
6
6
  allowed-tools: [Read, Bash, Grep, Glob, Agent, WebFetch]
7
7
  ---
8
8
 
9
9
  # Review an issue and plan
10
10
 
11
- Why: find architecture, scope, and verification gaps while changing the plan is
12
- still cheaper than changing code.
11
+ Purpose: Review the plan before implementation. Early review helps you find architecture, scope,
12
+ and verification gaps before code changes start.
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 all
15
+ 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
- review decisions:
23
-
24
- - [P010 Scope Fidelity](../../docs/principles/README.md#p010) keeps the current issue and canonical
25
- plan as the complete review target, while
26
- [P066 Preserve Existing Work](../../docs/principles/README.md#p066) prevents the review from
27
- rewriting foreign or historical artifacts.
28
- - [P012 Evidence Before Modification](../../docs/principles/README.md#p012),
29
- [P063 Requirement-to-Code Traceability](../../docs/principles/README.md#p063), and
30
- [P072 Technical Evidence Over Preference](../../docs/principles/README.md#p072) require every gap
31
- to be grounded in current requirements, repository evidence, and an affected contract.
32
- - [P015 Architecture Conformance](../../docs/principles/README.md#p015) makes unexplained boundary
33
- violations blocking;
34
- [P071 Consistency Over Personal Preference](../../docs/principles/README.md#p071) preserves
35
- repository conventions unless contrary technical evidence exists; and
36
- [P008 Understand Before Subtracting](../../docs/principles/README.md#p008) requires evidence about
37
- consumers and purpose before approving deletion or consolidation.
24
+ Use the canonical [engineering-principles catalog](../_support/docs/principles/README.md) for these review
25
+ decisions:
26
+
27
+ - [P010 Scope Fidelity](../_support/docs/principles/README.md#p010): Use the current issue and canonical
28
+ plan as the full review target.
29
+ - [P066 Preserve Existing Work](../_support/docs/principles/README.md#p066): Do not rewrite historical
30
+ artifacts or artifacts that a different actor owns.
31
+ - [P012 Evidence Before Modification](../_support/docs/principles/README.md#p012): Before you accept a
32
+ plan, examine current requirements and repository evidence.
33
+ - [P063 Requirement-to-Code Traceability](../_support/docs/principles/README.md#p063): For each gap,
34
+ find the related requirement or contract.
35
+ - [P072 Technical Evidence Over Preference](../_support/docs/principles/README.md#p072): Give technical
36
+ evidence for each gap. Do not use personal preference as evidence.
37
+ - [P015 Architecture Conformance](../_support/docs/principles/README.md#p015): If a boundary violation has
38
+ no explanation, do not accept the plan.
39
+ - [P071 Consistency Over Personal Preference](../_support/docs/principles/README.md#p071): If technical
40
+ evidence does not show a necessary change, obey repository conventions.
41
+ - [P008 Understand Before Subtracting](../_support/docs/principles/README.md#p008): Before you accept
42
+ deletion or consolidation, examine the consumers and purpose.
38
43
 
39
44
  ## Scope and delivery
40
45
 
41
- The issue is the requirements source; review only its current canonical plan.
42
- Resolve plan ownership, marker, absence, and identity under the issue-planning
43
- contract. Historical plans and reviews are bounded context, not the artifact
44
- under review.
46
+ Use the issue as the requirements source. Review only its current canonical plan. Use the
47
+ issue-planning contract to identify the plan owner, marker, presence or absence, and identity. Use
48
+ historical plans and reviews only as background information.
49
+
50
+ If the request includes `--report-only`, this skill is read-only. Do not publish a comment. If the
51
+ request does not include this option, first compare the required identities. Then, confirm a safe
52
+ forge capability. You can then publish exactly one actor-owned structured review comment. Do not
53
+ expand the scope to these items:
45
54
 
46
- `--report-only` is read-only. A requested review without it may publish exactly
47
- one actor-owned structured review comment after the required identity comparison
48
- and forge-capability check. It does not expand scope to labels, assignment,
49
- implementation, commit, push, pull request, merge, or issue closure.
55
+ - labels;
56
+ - assignment;
57
+ - implementation;
58
+ - commit;
59
+ - push;
60
+ - pull request;
61
+ - merge; or
62
+ - issue closure.
50
63
 
51
64
  ## Review
52
65
 
53
- 1. Read the issue, linked work, canonical plan, repository guidance, ADRs,
54
- relevant code, tests, and public contracts.
55
- 2. Decide architecture first under
56
- [P015 Architecture Conformance](../../docs/principles/README.md#p015): aligned, intentional and
57
- justified change, or an unexplained violation. A material violation blocks a positive assessment.
58
- 3. Map every acceptance criterion under
59
- [P063 Requirement-to-Code Traceability](../../docs/principles/README.md#p063) to a concrete plan
60
- step, affected boundary, and behavior-first validation step. For a material architecture change,
61
- verify that the plan includes or cites a
62
- [design record](../../docs/review/design-docs.md).
63
- 4. Verify cited paths, symbols, commands, dependencies, assumptions, risks,
64
- migration, and rollback claims against current repository evidence as required by
65
- [P012 Evidence Before Modification](../../docs/principles/README.md#p012).
66
- 5. Apply only activated language and change-surface checks, recording N/A
67
- sections and reasons. Activate
68
- [P001 KISS Keep It Simple, Stupid](../../docs/principles/README.md#p001) for added
69
- complexity, [P022 Test Behavior, Not Implementation](../../docs/principles/README.md#p022) for
70
- testable behavior,
71
- [P029 Generalize Error Policy; Preserve Specific Cause](../../docs/principles/README.md#p029) for
72
- error paths, and [P048 Secure by Design](../../docs/principles/README.md#p048) for security or new
73
- trust boundaries. Confirm that relevant prior findings are resolved, rather than merely
74
- acknowledged.
75
-
76
- Prioritize architecture violations, missing requirements, unsafe scope,
77
- unresolved dependencies, untestable outcomes, invalid references,
78
- non-deterministic tests, empty selections, and unsupported claims.
79
-
80
- When reviewing after a finalized epoch, do not reinterpret generated plan text
81
- or sealed provenance as new requirements. Review only a later material issue
82
- change and its current canonical plan; an unchanged finalized epoch is not a
83
- new review target.
84
-
85
- Immediately before a requested publication, re-resolve the canonical planning
86
- identity. On drift, foreign or multiple markers, verified absence changes, or
87
- missing safe forge capability, withhold the comment and return the review as
88
- stale. Otherwise publish exactly one actor-owned structured comment, including
89
- a clean result or verified absent-plan coverage gap.
66
+ 1. Read the issue, linked work, canonical plan, repository guidance, architecture decision records
67
+ (ADRs), applicable code, tests, and public contracts.
68
+ 2. Under [P015 Architecture Conformance](../_support/docs/principles/README.md#p015), select one architecture
69
+ result:
70
+
71
+ - aligned;
72
+ - intentional and justified change; or
73
+ - unexplained violation.
74
+
75
+ A material violation prevents a positive assessment.
76
+ 3. Under [P063 Requirement-to-Code Traceability](../_support/docs/principles/README.md#p063), map each
77
+ acceptance criterion to a concrete plan step, affected boundary, and behavior-first validation
78
+ step.
79
+ 4. If the plan contains a material architecture change, verify that it includes or cites a
80
+ [design record](../_support/docs/review/design-docs.md).
81
+ 5. Under [P012 Evidence Before Modification](../_support/docs/principles/README.md#p012), verify these claims
82
+ against current repository evidence:
83
+
84
+ - paths;
85
+ - symbols;
86
+ - commands;
87
+ - dependencies;
88
+ - assumptions;
89
+ - risks;
90
+ - migration; and
91
+ - rollback.
92
+
93
+ 6. Apply only the language and change-surface checks that the review scope activates.
94
+ 7. Record each not applicable (`N/A`) section and its reason.
95
+ 8. Activate these principle checks only for their specified surfaces:
96
+
97
+ - Use [P001 KISS — Keep It Simple, Stupid](../_support/docs/principles/README.md#p001) for added
98
+ complexity.
99
+ - Use [P022 Test Behavior, Not Implementation](../_support/docs/principles/README.md#p022) for testable
100
+ behavior.
101
+ - Use
102
+ [P029 Generalize Error Policy; Preserve Specific Cause](../_support/docs/principles/README.md#p029) for
103
+ error paths.
104
+ - Use [P048 Secure by Design](../_support/docs/principles/README.md#p048) for security or new trust
105
+ boundaries.
106
+
107
+ 9. Confirm that each applicable prior finding is resolved. Acknowledgment alone does not resolve a
108
+ finding.
109
+
110
+ Give priority to these findings:
111
+
112
+ - architecture violations;
113
+ - missing requirements;
114
+ - unsafe scope;
115
+ - unresolved dependencies;
116
+ - outcomes that cannot be tested;
117
+ - invalid references;
118
+ - nondeterministic tests;
119
+ - empty selections; and
120
+ - unsupported claims.
121
+
122
+ After a finalized epoch, do not treat generated plan text or sealed provenance as new requirements.
123
+ Review only a later material issue change and its current canonical plan. An unchanged finalized
124
+ epoch is not a new review target.
125
+
126
+ Immediately before you publish the requested comment, resolve the canonical planning identity again.
127
+ If one of these conditions is true, withhold the comment:
128
+
129
+ - identity drift;
130
+ - a foreign marker;
131
+ - multiple markers;
132
+ - a change to verified absence; or
133
+ - no safe forge capability.
134
+
135
+ If you withhold the comment, report the `stale` status.
136
+
137
+ Otherwise, publish exactly one actor-owned structured comment. Include a clean result or verified
138
+ absent-plan coverage gap.
90
139
 
91
140
  ## Failed approaches
92
141
 
93
- - Reviewing issues or plans outside the requested scope set, or treating historical plans as the
142
+ - Do not review issues or plans outside the requested scope. Do not treat historical plans as the
94
143
  artifact under review.
95
- - Editing the issue, labels, or assignment instead of reporting findings through the review
96
- comment.
97
- - Inventing acceptance criteria the reporter did not state, or accepting acknowledged-but-unresolved
98
- prior findings as resolved.
99
- - Republishing after drift instead of withholding the comment as stale.
144
+ - Do not edit the issue, labels, or assignment. If publication is authorized, report findings only in
145
+ the structured review comment. For `--report-only`, return the findings without publication.
146
+ - Do not invent acceptance criteria that the reporter did not state. Do not accept an unresolved
147
+ prior finding only because someone acknowledged it.
148
+ - After drift, do not publish the comment again. Withhold it. Report `stale`.
100
149
 
101
150
  ## Result
102
151
 
103
- Return issue and plan identities, architecture decision first, requirement
104
- mapping, severity-ranked findings, test-quality coverage, N/A sections,
105
- residual risks, and whether the comment was published or withheld. A review
106
- never expands scope to implementation or merge.
152
+ Return these items:
153
+
154
+ - issue and plan identities;
155
+ - the architecture decision first;
156
+ - the requirement map;
157
+ - severity-ranked findings;
158
+ - test-quality coverage;
159
+ - `N/A` sections;
160
+ - residual risks; and
161
+ - whether you published or withheld the comment.
162
+
163
+ Do not expand the review scope to implementation or merge.