@mrciphersmith/keryx 0.2.97 → 0.2.98

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 (165) hide show
  1. package/dist/cli.js +569 -235
  2. package/dist/core.js +1 -1
  3. package/package.json +1 -1
  4. package/src/gdskills/bundled/rules/core/api-contracts.mdc +1 -0
  5. package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +1 -0
  6. package/src/gdskills/bundled/rules/core/database-patterns.mdc +1 -0
  7. package/src/gdskills/bundled/rules/core/documentation-management.mdc +33 -38
  8. package/src/gdskills/bundled/rules/core/error-handling.mdc +1 -11
  9. package/src/gdskills/bundled/rules/core/execution-metrics.md +1 -2
  10. package/src/gdskills/bundled/rules/core/frontend-assistant.mdc +1 -0
  11. package/src/gdskills/bundled/rules/core/git-concurrency.mdc +101 -0
  12. package/src/gdskills/bundled/rules/core/implementation-plans.mdc +23 -11
  13. package/src/gdskills/bundled/rules/core/mobx-store-template.mdc +1 -0
  14. package/src/gdskills/bundled/rules/core/nestjs-dto.mdc +1 -0
  15. package/src/gdskills/bundled/rules/core/playwright-testing.mdc +1 -0
  16. package/src/gdskills/bundled/rules/core/requirements-management.mdc +15 -11
  17. package/src/gdskills/bundled/rules/core/rule-management-workflow.mdc +29 -14
  18. package/src/gdskills/bundled/rules/core/shared-definitions.mdc +1 -1
  19. package/src/gdskills/bundled/rules/core/skill-lifecycle.mdc +9 -5
  20. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +59 -16
  21. package/src/gdskills/bundled/rules/core/storybook-guidelines.mdc +1 -0
  22. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +48 -71
  23. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +48 -71
  24. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.md +48 -71
  25. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +48 -71
  26. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +48 -71
  27. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +4 -4
  28. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +4 -4
  29. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +4 -4
  30. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +4 -4
  31. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +4 -4
  32. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +2 -2
  33. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +12 -22
  34. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +12 -22
  35. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.detail.md +12 -22
  36. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +12 -22
  37. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +12 -22
  38. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +12 -22
  39. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/analysis-request.md +2 -2
  40. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/analysis-request.template.md +1 -1
  41. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/input-contract.schema.json +4 -4
  42. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +2 -2
  43. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +2 -2
  44. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +2 -2
  45. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +2 -2
  46. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +46 -4
  47. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +2 -2
  48. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +2 -2
  49. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.md +2 -2
  50. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +2 -2
  51. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +2 -2
  52. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +3 -3
  53. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +3 -3
  54. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +3 -3
  55. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +3 -3
  56. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +3 -3
  57. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +65 -23
  58. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +65 -23
  59. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +65 -23
  60. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +65 -23
  61. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +65 -23
  62. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +19 -10
  63. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +19 -10
  64. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +19 -10
  65. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +19 -10
  66. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +19 -10
  67. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +1 -1
  68. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +1 -1
  69. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +1 -1
  70. package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +1 -1
  71. package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +1 -1
  72. package/src/gdskills/bundled/skills/planning/interview/SKILL.md +1 -1
  73. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +1 -1
  74. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +1 -1
  75. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +1 -1
  76. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +7 -7
  77. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +7 -7
  78. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.md +7 -7
  79. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +7 -7
  80. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +7 -7
  81. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +1 -1
  82. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +1 -1
  83. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.md +1 -1
  84. package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +1 -1
  85. package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +1 -1
  86. package/src/gdskills/bundled/skills/platform/hookify/SKILL.md +1 -1
  87. package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +1 -1
  88. package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +1 -1
  89. package/src/gdskills/bundled/skills/quality/changelog/SKILL.md +1 -1
  90. package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +2 -2
  91. package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +2 -2
  92. package/src/gdskills/bundled/skills/quality/commit/SKILL.md +2 -2
  93. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +1 -1
  94. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +1 -1
  95. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.md +1 -1
  96. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +1 -1
  97. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +1 -1
  98. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.md +1 -1
  99. package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +1 -1
  100. package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +1 -1
  101. package/src/gdskills/bundled/skills/quality/deploy/SKILL.md +1 -1
  102. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +1 -1
  103. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +1 -1
  104. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.md +1 -1
  105. package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +1 -1
  106. package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +1 -1
  107. package/src/gdskills/bundled/skills/quality/pr/SKILL.md +1 -1
  108. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +2 -2
  109. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +2 -2
  110. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +2 -2
  111. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +2 -2
  112. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +2 -2
  113. package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +1 -1
  114. package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +1 -1
  115. package/src/gdskills/bundled/skills/quality/push/SKILL.md +1 -1
  116. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +7 -2
  117. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +7 -2
  118. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.md +7 -2
  119. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +15 -9
  120. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +15 -9
  121. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +15 -9
  122. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +15 -9
  123. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +15 -9
  124. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +2 -2
  125. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +2 -2
  126. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +2 -2
  127. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +2 -2
  128. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +2 -2
  129. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.codex.md +2 -2
  130. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.cursor.md +2 -2
  131. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +2 -2
  132. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.opencode.md +2 -2
  133. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.zed.md +2 -2
  134. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +2 -2
  135. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +2 -2
  136. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +2 -2
  137. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +2 -2
  138. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +2 -2
  139. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +2 -2
  140. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +2 -2
  141. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +2 -2
  142. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +2 -2
  143. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +2 -2
  144. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +2 -2
  145. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +3 -3
  146. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +2 -2
  147. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +1 -1
  148. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -1
  149. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +2 -2
  150. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +1 -1
  151. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +2 -2
  152. package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +1 -1
  153. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +2 -2
  154. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +40 -35
  155. package/src/gdskills/bundled/skills/review/review-orchestrator/input-contract.schema.json +1 -2
  156. package/src/gdskills/bundled/skills/review/review-orchestrator/review-context.schema.json +1 -5
  157. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +53 -9
  158. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +2 -2
  159. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +6 -6
  160. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +2 -2
  161. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +3 -3
  162. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +1 -1
  163. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +1 -1
  164. package/src/gdskills/bundled/rules/core/review-agent-profile.mdc +0 -49
  165. package/src/gdskills/bundled/rules/core/review-strict-profile.mdc +0 -48
@@ -610,19 +610,14 @@ CONTEXT_RESULT:
610
610
  into every subsequent dispatch prompt:
611
611
 
612
612
  ```
613
- CONTEXT_LOCATION: <JOBS_ROOT>/<job-name>/context_v<N>.md
613
+ CONTEXT_LOCATION: <JOBS_ROOT>/<job-name>/ai/context.md
614
614
  ```
615
615
 
616
- **Context versioning:** never overwrite an existing context file — write snapshots as
617
- `context_v1.md`, `context_v2.md`, and so on. Version 1 comes from the first collect in
618
- 2.3; each update writes the next number.
619
-
620
- The current version is the highest-numbered file in the package, which is a fact on
621
- disk that any session can read:
622
-
623
- ```bash
624
- ls .metaproject/jobs/<job-name>/context_v*.md
625
- ```
616
+ **Context versioning:** the file lives at this one fixed path and is overwritten in
617
+ place on every update — never written to a new, version-numbered filename. Each
618
+ collect/update instead increments the `Version` field in the document's own
619
+ "Document Metadata" table and appends a line to its `Update Log` section (see
620
+ context-collector SKILL.md §4.1, §4.3); that table on disk is the current version.
626
621
 
627
622
  `state.json` does not carry a context pointer and nothing writes one — do not tell a
628
623
  sub-agent to look for one. The orchestrator passes the path (Constructing Subagent
@@ -645,7 +640,7 @@ Task({
645
640
  JOB_NAME: <job-name>
646
641
  JOBS_ROOT: <JOBS_ROOT>
647
642
  PROJECT_DIR: <project_dir>
648
- CONTEXT_VERSION: <current version + 1> ← write to context_v<N+1>.md
643
+ CONTEXT_VERSION: <current version + 1> ← written into ai/context.md's Version field; file overwritten in place
649
644
 
650
645
  DATA:
651
646
  TASK_DESCRIPTION: <original task description>
@@ -703,6 +698,8 @@ fi
703
698
 
704
699
  > **IMPORTANT**: After creating the worktree, ALL subsequent operations (implementation, review, lint, test, git) MUST run in the **worktree directory**, NOT in the original project directory.
705
700
 
701
+ > **Concurrency**: every subsequent git command MUST use `git -C <worktree_path>`, never a bare `git`, and MUST NOT `git stash` or `git add -A`/`--all`/`.` — see `rules/core/git-concurrency.mdc`. Pin each dispatch to `<worktree_path>` explicitly; a dispatched agent's first action is `cd <worktree_path> && pwd && git branch --show-current`, re-checked before its first write.
702
+
706
703
  **Record state:**
707
704
  ```
708
705
  BRANCH_STATE:
@@ -770,9 +767,15 @@ FOR wave_index, wave_tasks in enumerate(WAVES):
770
767
  Wait for ALL of them.
771
768
 
772
769
  Read each result's STATUS line:
773
- all DONE → continue to next wave
774
- any DONE_WITH_CONCERNS → record the concerns, continue
775
- any BLOCKED → STOP, read the result file, resolve or ask the user
770
+ DONE / DONE_WITH_CONCERNS → accept it (record every concern)
771
+ BLOCKED → do not accept it; read its result file
772
+
773
+ # Task boundary commit, for EVERY accepted result, before anything else,
774
+ # whatever auto_commit was (see "Task boundary commit" below):
775
+ FOR each accepted result: commit its still-changed reported paths, or skip
776
+
777
+ any BLOCKED → STOP, resolve or ask the user
778
+ otherwise → continue to next wave
776
779
  ```
777
780
 
778
781
  #### tests-creator dispatch (Step A)
@@ -792,7 +795,7 @@ Task({
792
795
  - branch: <branch name>
793
796
  - package_manager: <pm>
794
797
  - run_command: <runner>
795
- - context_path: <JOBS_ROOT>/<job-name>/context_v<N>.md
798
+ - context_path: <JOBS_ROOT>/<job-name>/ai/context.md
796
799
 
797
800
  ## Required response
798
801
  Begin with STATUS: <STATUS>. Return the test_case_specs for this task and
@@ -820,12 +823,15 @@ Task({
820
823
  - run_command: <runner>
821
824
  - issue_number: <N>
822
825
  - job_name: <job-name>
823
- - context_path: <JOBS_ROOT>/<job-name>/context_v<N>.md
826
+ - context_path: <JOBS_ROOT>/<job-name>/ai/context.md
827
+
828
+ ## Automation (task-implementer input `automation`)
829
+ - auto_commit: <implementer_settings.auto_commit> # false: do not commit; report exact paths
824
830
 
825
831
  ## Required response format (compact — no inline JSON)
826
832
  STATUS: DONE
827
833
  Task: <task_id>
828
- Commits: [abc1234 feat(x): ...]
834
+ Commits: [abc1234 feat(x): ...] # auto_commit=false: Commits: none (auto_commit=false)
829
835
  Tests: <N passed, M failed>
830
836
  Result file: <JOBS_ROOT>/<job-name>/results/<task_id>.json
831
837
 
@@ -833,6 +839,42 @@ Task({
833
839
  })
834
840
  ```
835
841
 
842
+ **Who commits is set by the dispatch, never by a default.** Step B always passes
843
+ `auto_commit` explicitly. The worker's own default is `true`, so a dispatch that
844
+ leaves it out gets a worker that commits even when `implementer_settings.auto_commit`
845
+ is `false`.
846
+
847
+ **Task boundary commit, for every accepted result, whatever `auto_commit` was:**
848
+ a task is not done until its diff is committed (`rules/core/git-concurrency.mdc`
849
+ rule 4, "Reporting Back"). As soon as a result is accepted (`STATUS: DONE` or
850
+ `DONE_WITH_CONCERNS`), take its reported `files_modified`/`files_created`/
851
+ `files_deleted` from the result file and commit the ones git still shows as
852
+ changed, never `-A`/`--all`/`.`:
853
+ ```bash
854
+ set -- <each files_modified/files_created/files_deleted path, single-quoted: 'src/a.ts' 'docs/b c.md'> # may be none; an unquoted path with a space splits and is skipped
855
+ PENDING=()
856
+ for p in "$@"; do
857
+ [ -n "$(git -C <worktree_path> status --porcelain -- "$p")" ] && PENDING+=("$p")
858
+ done
859
+ if [ ${#PENDING[@]} -eq 0 ]; then
860
+ echo "boundary commit: nothing left to commit, skipped"
861
+ else
862
+ git -C <worktree_path> add -- "${PENDING[@]}"
863
+ git -C <worktree_path> commit -m "<type>(<scope>): <task description>
864
+
865
+ task: <task_id>" -- "${PENDING[@]}"
866
+ fi
867
+ ```
868
+ With `auto_commit=false` this commits exactly the worker's paths. With
869
+ `auto_commit=true` the worker already committed, so nothing is left and the step
870
+ skips. That is the expected outcome, not an error. If paths remain after an
871
+ `auto_commit=true` worker, it left part of its diff uncommitted: the step
872
+ commits it, and you record that as a concern. Each path is checked on its own
873
+ because `git status --porcelain --` with no path lists the whole tree, `git add`
874
+ fails on a path that is neither on disk nor tracked, and `git commit` with
875
+ nothing staged exits 1. The trailing `-- "${PENDING[@]}"` commits only these
876
+ paths, so a file another lane staged is not swept into this commit.
877
+
836
878
  **Each wave runs in ONE worktree.** The worktree created in 2.4 is the whole job's
837
879
  workspace — waves are ordered, not isolated from each other, and a later wave sees
838
880
  what an earlier one committed. That is what makes the dependency order mean anything.
@@ -904,7 +946,7 @@ git log <merge_base>..HEAD --oneline
904
946
 
905
947
  | Check | Pass | Fail action |
906
948
  |-------|------|-------------|
907
- | At least 1 commit exists | ≥1 commit | `retryable` — re-dispatch the task-implementers for that wave with: "No commits were made. Implement the changes and commit them." |
949
+ | At least 1 commit exists | ≥1 commit | `implementer_settings.auto_commit=true`: `retryable` — re-dispatch the task-implementers for that wave with: "No commits were made. Implement the changes and commit them." `auto_commit=false`: the task-boundary commit (wave loop, after Step B) should already have committed each accepted result's files — if none exist, `retryable`: re-run that commit step for the wave's result files instead of re-dispatching workers. |
908
950
  | At least 1 file modified | ≥1 file changed | Same as above |
909
951
  | Claimed files actually modified | All files named in the result files appear in the diff | Log discrepancy as a concern, continue |
910
952
 
@@ -1095,7 +1137,7 @@ Task({
1095
1137
  flags: <selected flags, e.g. --backend --security --testing-practices>
1096
1138
  commit_range: <BASE_SHA>..HEAD
1097
1139
  issue_url: <issue URL, when the job has one — enables the Stage 1 spec gate>
1098
- context_doc: <JOBS_ROOT>/<job-name>/context_v<N>.md
1140
+ context_doc: <JOBS_ROOT>/<job-name>/ai/context.md
1099
1141
  verification_mode: annotate
1100
1142
  managed_review: { mode: "review-flow", target: "branch", target_ref: "<feature-branch>" }
1101
1143
  is_fix_round: <true on any round after the first>
@@ -1426,7 +1468,7 @@ IF no skill_drift and Skill Learning == none:
1426
1468
  ELSE for each flagged project-skill:
1427
1469
  1. Dispatch a subagent to build the learning proposal:
1428
1470
  - Model: COMPUTED, not chosen — run
1429
- keryx review tier --scope narrow --json
1471
+ keryx review tier --findings 1 --diff-lines 0 --json
1430
1472
  and paste the `model` block into the dispatch. The command names no model:
1431
1473
  it ranks what the provider reports at runtime, and when it cannot rank
1432
1474
  anything it prints `inherit: true`, which means the dispatch runs on the
@@ -1514,7 +1556,7 @@ JOB_NAME: <job-name>
1514
1556
  BRANCH: <feature_branch>
1515
1557
  BASE: <base_branch>
1516
1558
  ISSUE_NUMBER: <issue_number if available>
1517
- CONTEXT_PATH: <JOBS_ROOT>/<job-name>/context_v<N>.md
1559
+ CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md
1518
1560
  ```
1519
1561
 
1520
1562
  `pr-issue-documenter` will analyze the branch diff and produce a structured PR description (Summary + Changes by area + Key Files table). Use its output as the `body` for the PR.
@@ -1704,7 +1746,7 @@ the dispatch prompt, or it does not reach the sub-agent:
1704
1746
  ```
1705
1747
  branch: { name, worktree_path, merge_base, package_manager, run_command }
1706
1748
  analysis: { total_tasks, tasks, dependency_order }
1707
- context_doc: the path to the highest-numbered context_v<N>.md in the package
1749
+ context_doc: the path to the job's ai/context.md
1708
1750
  review: the current round's findings — the durable copy is the managed review
1709
1751
  package, not this
1710
1752
  ```
@@ -610,19 +610,14 @@ CONTEXT_RESULT:
610
610
  into every subsequent dispatch prompt:
611
611
 
612
612
  ```
613
- CONTEXT_LOCATION: <JOBS_ROOT>/<job-name>/context_v<N>.md
613
+ CONTEXT_LOCATION: <JOBS_ROOT>/<job-name>/ai/context.md
614
614
  ```
615
615
 
616
- **Context versioning:** never overwrite an existing context file — write snapshots as
617
- `context_v1.md`, `context_v2.md`, and so on. Version 1 comes from the first collect in
618
- 2.3; each update writes the next number.
619
-
620
- The current version is the highest-numbered file in the package, which is a fact on
621
- disk that any session can read:
622
-
623
- ```bash
624
- ls .metaproject/jobs/<job-name>/context_v*.md
625
- ```
616
+ **Context versioning:** the file lives at this one fixed path and is overwritten in
617
+ place on every update — never written to a new, version-numbered filename. Each
618
+ collect/update instead increments the `Version` field in the document's own
619
+ "Document Metadata" table and appends a line to its `Update Log` section (see
620
+ context-collector SKILL.md §4.1, §4.3); that table on disk is the current version.
626
621
 
627
622
  `state.json` does not carry a context pointer and nothing writes one — do not tell a
628
623
  sub-agent to look for one. The orchestrator passes the path (Constructing Subagent
@@ -645,7 +640,7 @@ Task({
645
640
  JOB_NAME: <job-name>
646
641
  JOBS_ROOT: <JOBS_ROOT>
647
642
  PROJECT_DIR: <project_dir>
648
- CONTEXT_VERSION: <current version + 1> ← write to context_v<N+1>.md
643
+ CONTEXT_VERSION: <current version + 1> ← written into ai/context.md's Version field; file overwritten in place
649
644
 
650
645
  DATA:
651
646
  TASK_DESCRIPTION: <original task description>
@@ -703,6 +698,8 @@ fi
703
698
 
704
699
  > **IMPORTANT**: After creating the worktree, ALL subsequent operations (implementation, review, lint, test, git) MUST run in the **worktree directory**, NOT in the original project directory.
705
700
 
701
+ > **Concurrency**: every subsequent git command MUST use `git -C <worktree_path>`, never a bare `git`, and MUST NOT `git stash` or `git add -A`/`--all`/`.` — see `rules/core/git-concurrency.mdc`. Pin each dispatch to `<worktree_path>` explicitly; a dispatched agent's first action is `cd <worktree_path> && pwd && git branch --show-current`, re-checked before its first write.
702
+
706
703
  **Record state:**
707
704
  ```
708
705
  BRANCH_STATE:
@@ -770,9 +767,15 @@ FOR wave_index, wave_tasks in enumerate(WAVES):
770
767
  Wait for ALL of them.
771
768
 
772
769
  Read each result's STATUS line:
773
- all DONE → continue to next wave
774
- any DONE_WITH_CONCERNS → record the concerns, continue
775
- any BLOCKED → STOP, read the result file, resolve or ask the user
770
+ DONE / DONE_WITH_CONCERNS → accept it (record every concern)
771
+ BLOCKED → do not accept it; read its result file
772
+
773
+ # Task boundary commit, for EVERY accepted result, before anything else,
774
+ # whatever auto_commit was (see "Task boundary commit" below):
775
+ FOR each accepted result: commit its still-changed reported paths, or skip
776
+
777
+ any BLOCKED → STOP, resolve or ask the user
778
+ otherwise → continue to next wave
776
779
  ```
777
780
 
778
781
  #### tests-creator dispatch (Step A)
@@ -792,7 +795,7 @@ Task({
792
795
  - branch: <branch name>
793
796
  - package_manager: <pm>
794
797
  - run_command: <runner>
795
- - context_path: <JOBS_ROOT>/<job-name>/context_v<N>.md
798
+ - context_path: <JOBS_ROOT>/<job-name>/ai/context.md
796
799
 
797
800
  ## Required response
798
801
  Begin with STATUS: <STATUS>. Return the test_case_specs for this task and
@@ -820,12 +823,15 @@ Task({
820
823
  - run_command: <runner>
821
824
  - issue_number: <N>
822
825
  - job_name: <job-name>
823
- - context_path: <JOBS_ROOT>/<job-name>/context_v<N>.md
826
+ - context_path: <JOBS_ROOT>/<job-name>/ai/context.md
827
+
828
+ ## Automation (task-implementer input `automation`)
829
+ - auto_commit: <implementer_settings.auto_commit> # false: do not commit; report exact paths
824
830
 
825
831
  ## Required response format (compact — no inline JSON)
826
832
  STATUS: DONE
827
833
  Task: <task_id>
828
- Commits: [abc1234 feat(x): ...]
834
+ Commits: [abc1234 feat(x): ...] # auto_commit=false: Commits: none (auto_commit=false)
829
835
  Tests: <N passed, M failed>
830
836
  Result file: <JOBS_ROOT>/<job-name>/results/<task_id>.json
831
837
 
@@ -833,6 +839,42 @@ Task({
833
839
  })
834
840
  ```
835
841
 
842
+ **Who commits is set by the dispatch, never by a default.** Step B always passes
843
+ `auto_commit` explicitly. The worker's own default is `true`, so a dispatch that
844
+ leaves it out gets a worker that commits even when `implementer_settings.auto_commit`
845
+ is `false`.
846
+
847
+ **Task boundary commit, for every accepted result, whatever `auto_commit` was:**
848
+ a task is not done until its diff is committed (`rules/core/git-concurrency.mdc`
849
+ rule 4, "Reporting Back"). As soon as a result is accepted (`STATUS: DONE` or
850
+ `DONE_WITH_CONCERNS`), take its reported `files_modified`/`files_created`/
851
+ `files_deleted` from the result file and commit the ones git still shows as
852
+ changed, never `-A`/`--all`/`.`:
853
+ ```bash
854
+ set -- <each files_modified/files_created/files_deleted path, single-quoted: 'src/a.ts' 'docs/b c.md'> # may be none; an unquoted path with a space splits and is skipped
855
+ PENDING=()
856
+ for p in "$@"; do
857
+ [ -n "$(git -C <worktree_path> status --porcelain -- "$p")" ] && PENDING+=("$p")
858
+ done
859
+ if [ ${#PENDING[@]} -eq 0 ]; then
860
+ echo "boundary commit: nothing left to commit, skipped"
861
+ else
862
+ git -C <worktree_path> add -- "${PENDING[@]}"
863
+ git -C <worktree_path> commit -m "<type>(<scope>): <task description>
864
+
865
+ task: <task_id>" -- "${PENDING[@]}"
866
+ fi
867
+ ```
868
+ With `auto_commit=false` this commits exactly the worker's paths. With
869
+ `auto_commit=true` the worker already committed, so nothing is left and the step
870
+ skips. That is the expected outcome, not an error. If paths remain after an
871
+ `auto_commit=true` worker, it left part of its diff uncommitted: the step
872
+ commits it, and you record that as a concern. Each path is checked on its own
873
+ because `git status --porcelain --` with no path lists the whole tree, `git add`
874
+ fails on a path that is neither on disk nor tracked, and `git commit` with
875
+ nothing staged exits 1. The trailing `-- "${PENDING[@]}"` commits only these
876
+ paths, so a file another lane staged is not swept into this commit.
877
+
836
878
  **Each wave runs in ONE worktree.** The worktree created in 2.4 is the whole job's
837
879
  workspace — waves are ordered, not isolated from each other, and a later wave sees
838
880
  what an earlier one committed. That is what makes the dependency order mean anything.
@@ -904,7 +946,7 @@ git log <merge_base>..HEAD --oneline
904
946
 
905
947
  | Check | Pass | Fail action |
906
948
  |-------|------|-------------|
907
- | At least 1 commit exists | ≥1 commit | `retryable` — re-dispatch the task-implementers for that wave with: "No commits were made. Implement the changes and commit them." |
949
+ | At least 1 commit exists | ≥1 commit | `implementer_settings.auto_commit=true`: `retryable` — re-dispatch the task-implementers for that wave with: "No commits were made. Implement the changes and commit them." `auto_commit=false`: the task-boundary commit (wave loop, after Step B) should already have committed each accepted result's files — if none exist, `retryable`: re-run that commit step for the wave's result files instead of re-dispatching workers. |
908
950
  | At least 1 file modified | ≥1 file changed | Same as above |
909
951
  | Claimed files actually modified | All files named in the result files appear in the diff | Log discrepancy as a concern, continue |
910
952
 
@@ -1095,7 +1137,7 @@ Task({
1095
1137
  flags: <selected flags, e.g. --backend --security --testing-practices>
1096
1138
  commit_range: <BASE_SHA>..HEAD
1097
1139
  issue_url: <issue URL, when the job has one — enables the Stage 1 spec gate>
1098
- context_doc: <JOBS_ROOT>/<job-name>/context_v<N>.md
1140
+ context_doc: <JOBS_ROOT>/<job-name>/ai/context.md
1099
1141
  verification_mode: annotate
1100
1142
  managed_review: { mode: "review-flow", target: "branch", target_ref: "<feature-branch>" }
1101
1143
  is_fix_round: <true on any round after the first>
@@ -1426,7 +1468,7 @@ IF no skill_drift and Skill Learning == none:
1426
1468
  ELSE for each flagged project-skill:
1427
1469
  1. Dispatch a subagent to build the learning proposal:
1428
1470
  - Model: COMPUTED, not chosen — run
1429
- keryx review tier --scope narrow --json
1471
+ keryx review tier --findings 1 --diff-lines 0 --json
1430
1472
  and paste the `model` block into the dispatch. The command names no model:
1431
1473
  it ranks what the provider reports at runtime, and when it cannot rank
1432
1474
  anything it prints `inherit: true`, which means the dispatch runs on the
@@ -1514,7 +1556,7 @@ JOB_NAME: <job-name>
1514
1556
  BRANCH: <feature_branch>
1515
1557
  BASE: <base_branch>
1516
1558
  ISSUE_NUMBER: <issue_number if available>
1517
- CONTEXT_PATH: <JOBS_ROOT>/<job-name>/context_v<N>.md
1559
+ CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md
1518
1560
  ```
1519
1561
 
1520
1562
  `pr-issue-documenter` will analyze the branch diff and produce a structured PR description (Summary + Changes by area + Key Files table). Use its output as the `body` for the PR.
@@ -1704,7 +1746,7 @@ the dispatch prompt, or it does not reach the sub-agent:
1704
1746
  ```
1705
1747
  branch: { name, worktree_path, merge_base, package_manager, run_command }
1706
1748
  analysis: { total_tasks, tasks, dependency_order }
1707
- context_doc: the path to the highest-numbered context_v<N>.md in the package
1749
+ context_doc: the path to the job's ai/context.md
1708
1750
  review: the current round's findings — the durable copy is the managed review
1709
1751
  package, not this
1710
1752
  ```
@@ -11,7 +11,7 @@ triggers:
11
11
  metadata:
12
12
  author: "MrCipherSmith"
13
13
  version: "1.3.1"
14
- category: "implementation"
14
+ category: "orchestration"
15
15
  agent_worthy: true
16
16
  compatible_harnesses: "claude,cursor,codex,zed,opencode"
17
17
  license: "MIT"
@@ -222,8 +222,6 @@ Based on what you're implementing, load and follow the relevant project rules.
222
222
 
223
223
  Rules live at `.metaproject/rules/core/<rule>.mdc` on every harness — that is the
224
224
  one tree `keryx init` installs and the one every build of this skill reads.
225
- Cursor additionally mirrors them under `.cursor/rules/core/<rule>.mdc`; when both
226
- are present they are copies of the same file, so read either.
227
225
 
228
226
  **Output of Phase 2:** Mental model of the implementation:
229
227
  ```
@@ -317,15 +315,21 @@ Execute the change plan. Write production-quality code.
317
315
 
318
316
  **4.5 Commit after implementation:**
319
317
 
320
- When auto-commit is enabled, create a conventional commit with the changes. Include the `refs #<issue_number>` line below only when a positive real issue number was supplied; otherwise omit that entire line:
318
+ When auto-commit is enabled, create a conventional commit with the changes. Stage explicit paths only — never `-A`/`--all`/`.` — and run every git command as `git -C "<codebase_path>"` (`rules/core/git-concurrency.mdc`). Include the `refs #<issue_number>` line below only when a positive real issue number was supplied; otherwise omit that entire line:
321
319
  ```bash
322
- git add <modified files>
323
- git commit -m "<type>(<scope>): <description>
320
+ git -C "<codebase_path>" add <modified files, explicit paths>
321
+ git -C "<codebase_path>" commit -m "<type>(<scope>): <description>
324
322
 
325
323
  refs #<issue_number>
326
324
  task: <task_id>"
327
325
  ```
328
326
 
327
+ When auto-commit is disabled, do not commit. Report the exact list of files you
328
+ changed — nothing inferred — in the Phase 6 STATUS response and the result
329
+ file's `files_modified`/`files_created`/`files_deleted`; the orchestrator stages
330
+ and commits those exact paths at the task boundary (`rules/core/git-concurrency.mdc`,
331
+ "Reporting Back").
332
+
329
333
  Commit type mapping:
330
334
  | Task Type | Commit Type |
331
335
  |-----------|-------------|
@@ -396,20 +400,25 @@ identical outputs cost the whole budget to learn what the second one already
396
400
  said. Report the block instead, naming what repeated.
397
401
 
398
402
 
399
- **ROLLBACK POLICY**: If implementation fatally fails (tests still failing after 3 attempts, or unresolvable compilation errors), restore ONLY the files this task changed — `git checkout -- <your files>` for tracked ones, delete the untracked ones you created — then report the failure in Phase 6.
403
+ **ROLLBACK POLICY**: If implementation fatally fails (tests still failing after 3 attempts, or unresolvable compilation errors), restore ONLY the files this task changed — `git -C "<codebase_path>" checkout -- <your files>` for tracked ones, delete the untracked ones you created — then report the failure in Phase 6.
400
404
 
401
405
  **Never run `git reset --hard`, `git clean`, or any unscoped revert.** You do not own the worktree. `job-orchestrator` dispatches implementers in PARALLEL WAVES sharing a single worktree, so an unscoped reset destroys a wave-mate's uncommitted work — work that is not yours, cannot be recovered, and whose loss is invisible to you because the other agent's failure surfaces somewhere else entirely. If you cannot identify which files are yours, leave the tree exactly as it is and say so in the report: a dirty tree is recoverable, a destroyed one is not.
402
406
 
407
+ **Same reasoning bans `git stash` and unscoped `git add`.** Never `git stash` — the stash stack is shared by every worktree, so even a scoped `push -- <file>` can be popped by another lane. Stage only the files this task changed (`git -C "<codebase_path>" add <path> <path>`), never `-A`/`--all`/`.`. Every git command runs as `git -C <this worktree's absolute path>`. See `rules/core/git-concurrency.mdc`.
408
+
403
409
  **5.5 Re-commit fixes if any:**
404
- When auto-commit is enabled, use the template below. Include `refs #<issue_number>` only for a supplied positive real issue number; otherwise omit that entire line.
410
+ When auto-commit is enabled, use the template below — explicit paths only, `git -C "<codebase_path>"` for every command (`rules/core/git-concurrency.mdc`). Include `refs #<issue_number>` only for a supplied positive real issue number; otherwise omit that entire line.
405
411
  ```bash
406
- git add <fixed files>
407
- git commit -m "fix(<scope>): resolve lint/type/test issues
412
+ git -C "<codebase_path>" add <fixed files, explicit paths>
413
+ git -C "<codebase_path>" commit -m "fix(<scope>): resolve lint/type/test issues
408
414
 
409
415
  refs #<issue_number>
410
416
  task: <task_id>"
411
417
  ```
412
418
 
419
+ When auto-commit is disabled, do not commit; report the exact fixed-file list in
420
+ Phase 6 as in 4.5 — the orchestrator commits it at the task boundary.
421
+
413
422
  ### Phase 6: REPORT
414
423
 
415
424
  Write the full result to a file, then emit a compact STATUS response to the orchestrator.
@@ -11,7 +11,7 @@ triggers:
11
11
  metadata:
12
12
  author: "MrCipherSmith"
13
13
  version: "1.3.1"
14
- category: "implementation"
14
+ category: "orchestration"
15
15
  agent_worthy: true
16
16
  compatible_harnesses: "claude,cursor,codex,zed,opencode"
17
17
  license: "MIT"
@@ -222,8 +222,6 @@ Based on what you're implementing, load and follow the relevant project rules.
222
222
 
223
223
  Rules live at `.metaproject/rules/core/<rule>.mdc` on every harness — that is the
224
224
  one tree `keryx init` installs and the one every build of this skill reads.
225
- Cursor additionally mirrors them under `.cursor/rules/core/<rule>.mdc`; when both
226
- are present they are copies of the same file, so read either.
227
225
 
228
226
  **Output of Phase 2:** Mental model of the implementation:
229
227
  ```
@@ -317,15 +315,21 @@ Execute the change plan. Write production-quality code.
317
315
 
318
316
  **4.5 Commit after implementation:**
319
317
 
320
- When auto-commit is enabled, create a conventional commit with the changes. Include the `refs #<issue_number>` line below only when a positive real issue number was supplied; otherwise omit that entire line:
318
+ When auto-commit is enabled, create a conventional commit with the changes. Stage explicit paths only — never `-A`/`--all`/`.` — and run every git command as `git -C "<codebase_path>"` (`rules/core/git-concurrency.mdc`). Include the `refs #<issue_number>` line below only when a positive real issue number was supplied; otherwise omit that entire line:
321
319
  ```bash
322
- git add <modified files>
323
- git commit -m "<type>(<scope>): <description>
320
+ git -C "<codebase_path>" add <modified files, explicit paths>
321
+ git -C "<codebase_path>" commit -m "<type>(<scope>): <description>
324
322
 
325
323
  refs #<issue_number>
326
324
  task: <task_id>"
327
325
  ```
328
326
 
327
+ When auto-commit is disabled, do not commit. Report the exact list of files you
328
+ changed — nothing inferred — in the Phase 6 STATUS response and the result
329
+ file's `files_modified`/`files_created`/`files_deleted`; the orchestrator stages
330
+ and commits those exact paths at the task boundary (`rules/core/git-concurrency.mdc`,
331
+ "Reporting Back").
332
+
329
333
  Commit type mapping:
330
334
  | Task Type | Commit Type |
331
335
  |-----------|-------------|
@@ -396,20 +400,25 @@ identical outputs cost the whole budget to learn what the second one already
396
400
  said. Report the block instead, naming what repeated.
397
401
 
398
402
 
399
- **ROLLBACK POLICY**: If implementation fatally fails (tests still failing after 3 attempts, or unresolvable compilation errors), restore ONLY the files this task changed — `git checkout -- <your files>` for tracked ones, delete the untracked ones you created — then report the failure in Phase 6.
403
+ **ROLLBACK POLICY**: If implementation fatally fails (tests still failing after 3 attempts, or unresolvable compilation errors), restore ONLY the files this task changed — `git -C "<codebase_path>" checkout -- <your files>` for tracked ones, delete the untracked ones you created — then report the failure in Phase 6.
400
404
 
401
405
  **Never run `git reset --hard`, `git clean`, or any unscoped revert.** You do not own the worktree. `job-orchestrator` dispatches implementers in PARALLEL WAVES sharing a single worktree, so an unscoped reset destroys a wave-mate's uncommitted work — work that is not yours, cannot be recovered, and whose loss is invisible to you because the other agent's failure surfaces somewhere else entirely. If you cannot identify which files are yours, leave the tree exactly as it is and say so in the report: a dirty tree is recoverable, a destroyed one is not.
402
406
 
407
+ **Same reasoning bans `git stash` and unscoped `git add`.** Never `git stash` — the stash stack is shared by every worktree, so even a scoped `push -- <file>` can be popped by another lane. Stage only the files this task changed (`git -C "<codebase_path>" add <path> <path>`), never `-A`/`--all`/`.`. Every git command runs as `git -C <this worktree's absolute path>`. See `rules/core/git-concurrency.mdc`.
408
+
403
409
  **5.5 Re-commit fixes if any:**
404
- When auto-commit is enabled, use the template below. Include `refs #<issue_number>` only for a supplied positive real issue number; otherwise omit that entire line.
410
+ When auto-commit is enabled, use the template below — explicit paths only, `git -C "<codebase_path>"` for every command (`rules/core/git-concurrency.mdc`). Include `refs #<issue_number>` only for a supplied positive real issue number; otherwise omit that entire line.
405
411
  ```bash
406
- git add <fixed files>
407
- git commit -m "fix(<scope>): resolve lint/type/test issues
412
+ git -C "<codebase_path>" add <fixed files, explicit paths>
413
+ git -C "<codebase_path>" commit -m "fix(<scope>): resolve lint/type/test issues
408
414
 
409
415
  refs #<issue_number>
410
416
  task: <task_id>"
411
417
  ```
412
418
 
419
+ When auto-commit is disabled, do not commit; report the exact fixed-file list in
420
+ Phase 6 as in 4.5 — the orchestrator commits it at the task boundary.
421
+
413
422
  ### Phase 6: REPORT
414
423
 
415
424
  Write the full result to a file, then emit a compact STATUS response to the orchestrator.
@@ -11,7 +11,7 @@ triggers:
11
11
  metadata:
12
12
  author: "MrCipherSmith"
13
13
  version: "1.3.1"
14
- category: "implementation"
14
+ category: "orchestration"
15
15
  agent_worthy: true
16
16
  compatible_harnesses: "claude,cursor,codex,zed,opencode"
17
17
  license: "MIT"
@@ -222,8 +222,6 @@ Based on what you're implementing, load and follow the relevant project rules.
222
222
 
223
223
  Rules live at `.metaproject/rules/core/<rule>.mdc` on every harness — that is the
224
224
  one tree `keryx init` installs and the one every build of this skill reads.
225
- Cursor additionally mirrors them under `.cursor/rules/core/<rule>.mdc`; when both
226
- are present they are copies of the same file, so read either.
227
225
 
228
226
  **Output of Phase 2:** Mental model of the implementation:
229
227
  ```
@@ -317,15 +315,21 @@ Execute the change plan. Write production-quality code.
317
315
 
318
316
  **4.5 Commit after implementation:**
319
317
 
320
- When auto-commit is enabled, create a conventional commit with the changes. Include the `refs #<issue_number>` line below only when a positive real issue number was supplied; otherwise omit that entire line:
318
+ When auto-commit is enabled, create a conventional commit with the changes. Stage explicit paths only — never `-A`/`--all`/`.` — and run every git command as `git -C "<codebase_path>"` (`rules/core/git-concurrency.mdc`). Include the `refs #<issue_number>` line below only when a positive real issue number was supplied; otherwise omit that entire line:
321
319
  ```bash
322
- git add <modified files>
323
- git commit -m "<type>(<scope>): <description>
320
+ git -C "<codebase_path>" add <modified files, explicit paths>
321
+ git -C "<codebase_path>" commit -m "<type>(<scope>): <description>
324
322
 
325
323
  refs #<issue_number>
326
324
  task: <task_id>"
327
325
  ```
328
326
 
327
+ When auto-commit is disabled, do not commit. Report the exact list of files you
328
+ changed — nothing inferred — in the Phase 6 STATUS response and the result
329
+ file's `files_modified`/`files_created`/`files_deleted`; the orchestrator stages
330
+ and commits those exact paths at the task boundary (`rules/core/git-concurrency.mdc`,
331
+ "Reporting Back").
332
+
329
333
  Commit type mapping:
330
334
  | Task Type | Commit Type |
331
335
  |-----------|-------------|
@@ -396,20 +400,25 @@ identical outputs cost the whole budget to learn what the second one already
396
400
  said. Report the block instead, naming what repeated.
397
401
 
398
402
 
399
- **ROLLBACK POLICY**: If implementation fatally fails (tests still failing after 3 attempts, or unresolvable compilation errors), restore ONLY the files this task changed — `git checkout -- <your files>` for tracked ones, delete the untracked ones you created — then report the failure in Phase 6.
403
+ **ROLLBACK POLICY**: If implementation fatally fails (tests still failing after 3 attempts, or unresolvable compilation errors), restore ONLY the files this task changed — `git -C "<codebase_path>" checkout -- <your files>` for tracked ones, delete the untracked ones you created — then report the failure in Phase 6.
400
404
 
401
405
  **Never run `git reset --hard`, `git clean`, or any unscoped revert.** You do not own the worktree. `job-orchestrator` dispatches implementers in PARALLEL WAVES sharing a single worktree, so an unscoped reset destroys a wave-mate's uncommitted work — work that is not yours, cannot be recovered, and whose loss is invisible to you because the other agent's failure surfaces somewhere else entirely. If you cannot identify which files are yours, leave the tree exactly as it is and say so in the report: a dirty tree is recoverable, a destroyed one is not.
402
406
 
407
+ **Same reasoning bans `git stash` and unscoped `git add`.** Never `git stash` — the stash stack is shared by every worktree, so even a scoped `push -- <file>` can be popped by another lane. Stage only the files this task changed (`git -C "<codebase_path>" add <path> <path>`), never `-A`/`--all`/`.`. Every git command runs as `git -C <this worktree's absolute path>`. See `rules/core/git-concurrency.mdc`.
408
+
403
409
  **5.5 Re-commit fixes if any:**
404
- When auto-commit is enabled, use the template below. Include `refs #<issue_number>` only for a supplied positive real issue number; otherwise omit that entire line.
410
+ When auto-commit is enabled, use the template below — explicit paths only, `git -C "<codebase_path>"` for every command (`rules/core/git-concurrency.mdc`). Include `refs #<issue_number>` only for a supplied positive real issue number; otherwise omit that entire line.
405
411
  ```bash
406
- git add <fixed files>
407
- git commit -m "fix(<scope>): resolve lint/type/test issues
412
+ git -C "<codebase_path>" add <fixed files, explicit paths>
413
+ git -C "<codebase_path>" commit -m "fix(<scope>): resolve lint/type/test issues
408
414
 
409
415
  refs #<issue_number>
410
416
  task: <task_id>"
411
417
  ```
412
418
 
419
+ When auto-commit is disabled, do not commit; report the exact fixed-file list in
420
+ Phase 6 as in 4.5 — the orchestrator commits it at the task boundary.
421
+
413
422
  ### Phase 6: REPORT
414
423
 
415
424
  Write the full result to a file, then emit a compact STATUS response to the orchestrator.