@mrciphersmith/keryx 0.2.98 → 0.2.100

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 (182) hide show
  1. package/dist/cli.js +4605 -2695
  2. package/dist/core.js +39 -1
  3. package/package.json +1 -1
  4. package/src/gdskills/bundled/rules/core/cli-interface-design.mdc +237 -0
  5. package/src/gdskills/bundled/rules/core/definition-of-done.mdc +116 -0
  6. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +101 -11
  7. package/src/gdskills/bundled/rules/core/subagent-status-protocol.md +9 -2
  8. package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +42 -5
  9. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.md +19 -3
  10. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +20 -4
  11. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +32 -9
  12. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +18 -4
  13. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +21 -5
  14. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.md +4 -4
  15. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +1 -1
  16. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +42 -2
  17. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +23 -9
  18. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +33 -31
  19. package/src/gdskills/bundled/skills/orchestration/task-implementer/output-contract.schema.json +32 -1
  20. package/src/gdskills/bundled/skills/planning/autodoc-analyst/SKILL.md +16 -0
  21. package/src/gdskills/bundled/skills/planning/autodoc-architect/SKILL.md +16 -0
  22. package/src/gdskills/bundled/skills/planning/autodoc-assembler/SKILL.md +16 -0
  23. package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +17 -0
  24. package/src/gdskills/bundled/skills/planning/autodoc-scanner/SKILL.md +16 -0
  25. package/src/gdskills/bundled/skills/planning/autodoc-writer/SKILL.md +16 -0
  26. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +28 -3
  27. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +17 -0
  28. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +17 -0
  29. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +17 -0
  30. package/src/gdskills/bundled/skills/planning/docpack-orchestrator/SKILL.md +32 -2
  31. package/src/gdskills/bundled/skills/planning/docpack-review/SKILL.md +14 -2
  32. package/src/gdskills/bundled/skills/planning/interview/SKILL.md +29 -7
  33. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +32 -6
  34. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +16 -0
  35. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +16 -0
  36. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +16 -0
  37. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +17 -0
  38. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +17 -0
  39. package/src/gdskills/bundled/skills/planning/planner/SKILL.md +17 -0
  40. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.md +20 -3
  41. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +16 -0
  42. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +16 -0
  43. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +16 -0
  44. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +16 -0
  45. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +16 -0
  46. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +16 -0
  47. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +4 -0
  48. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +4 -0
  49. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +4 -0
  50. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +4 -0
  51. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +4 -0
  52. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +4 -0
  53. package/src/gdskills/bundled/skills/platform/agent-entrypoint-distiller/SKILL.md +31 -4
  54. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.md +26 -2
  55. package/src/gdskills/bundled/skills/platform/hookify/SKILL.md +28 -3
  56. package/src/gdskills/bundled/skills/quality/api-truth/SKILL.md +226 -0
  57. package/src/gdskills/bundled/skills/quality/changelog/SKILL.md +24 -4
  58. package/src/gdskills/bundled/skills/quality/commit/SKILL.md +24 -3
  59. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.md +24 -3
  60. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.md +25 -4
  61. package/src/gdskills/bundled/skills/quality/deploy/SKILL.md +26 -3
  62. package/src/gdskills/bundled/skills/quality/deprecation-path/SKILL.md +268 -0
  63. package/src/gdskills/bundled/skills/quality/fresh-eyes/SKILL.md +190 -0
  64. package/src/gdskills/bundled/skills/quality/metaproject-security/SKILL.md +24 -3
  65. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.md +29 -8
  66. package/src/gdskills/bundled/skills/quality/pr/SKILL.md +24 -4
  67. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +25 -2
  68. package/src/gdskills/bundled/skills/quality/push/SKILL.md +24 -3
  69. package/src/gdskills/bundled/skills/quality/root-cause/SKILL.md +204 -0
  70. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.md +25 -4
  71. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.md +24 -3
  72. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +17 -2
  73. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +40 -5
  74. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +41 -1
  75. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +44 -2
  76. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +44 -4
  77. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +3 -3
  78. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +2 -3
  79. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +4 -4
  80. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +36 -2
  81. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +37 -3
  82. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +2 -4
  83. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +36 -2
  84. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +3 -5
  85. package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +23 -2
  86. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +3 -3
  87. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +9 -29
  88. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +9 -9
  89. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +3 -2
  90. package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +33 -2
  91. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +4 -2
  92. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +2 -2
  93. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +40 -2
  94. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +1 -1
  95. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +0 -330
  96. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +0 -330
  97. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +0 -330
  98. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +0 -330
  99. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +0 -655
  100. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +0 -655
  101. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +0 -655
  102. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +0 -655
  103. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +0 -424
  104. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +0 -424
  105. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +0 -424
  106. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +0 -424
  107. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +0 -163
  108. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +0 -163
  109. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +0 -373
  110. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +0 -373
  111. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +0 -373
  112. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +0 -373
  113. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +0 -374
  114. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +0 -374
  115. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +0 -374
  116. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +0 -374
  117. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +0 -2232
  118. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +0 -2232
  119. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +0 -2232
  120. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +0 -2232
  121. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +0 -668
  122. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +0 -668
  123. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +0 -668
  124. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +0 -668
  125. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +0 -90
  126. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +0 -90
  127. package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +0 -187
  128. package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +0 -187
  129. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +0 -105
  130. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +0 -105
  131. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +0 -193
  132. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +0 -193
  133. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +0 -193
  134. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +0 -193
  135. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +0 -87
  136. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +0 -87
  137. package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +0 -100
  138. package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +0 -100
  139. package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +0 -84
  140. package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +0 -84
  141. package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +0 -66
  142. package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +0 -66
  143. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +0 -66
  144. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +0 -66
  145. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +0 -81
  146. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +0 -81
  147. package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +0 -70
  148. package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +0 -70
  149. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +0 -83
  150. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +0 -83
  151. package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +0 -75
  152. package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +0 -75
  153. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +0 -378
  154. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +0 -378
  155. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +0 -378
  156. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +0 -378
  157. package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +0 -52
  158. package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +0 -52
  159. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +0 -108
  160. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +0 -108
  161. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +0 -80
  162. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +0 -80
  163. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +0 -345
  164. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +0 -345
  165. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +0 -345
  166. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +0 -345
  167. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +0 -203
  168. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +0 -203
  169. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +0 -203
  170. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +0 -203
  171. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.codex.md +0 -243
  172. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.cursor.md +0 -243
  173. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.opencode.md +0 -243
  174. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.zed.md +0 -243
  175. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +0 -259
  176. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +0 -259
  177. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +0 -259
  178. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +0 -259
  179. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +0 -168
  180. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +0 -168
  181. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +0 -168
  182. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +0 -168
@@ -1,374 +0,0 @@
1
- ---
2
- name: job-documenter
3
- model_tier: light
4
- description: "Use when a job folder needs to be initialized, or analysis/report/review documents need to be created or updated in jobs/."
5
- triggers:
6
- - "Document job"
7
- - "Initialize job folder"
8
- - "Save job report"
9
- - "Add job document"
10
- metadata:
11
- author: "MrCipherSmith"
12
- version: "1.0.0"
13
- category: "orchestration"
14
- compatible_harnesses: "cursor,codex,zed,opencode,claude"
15
- license: "MIT"
16
- ---
17
-
18
- <SUBAGENT-STOP>
19
- If you were dispatched as a subagent to execute a specific task, skip this skill entirely.
20
- This skill is for orchestrators and interactive session-level routing only.
21
- Proceed directly with your assigned task.
22
- </SUBAGENT-STOP>
23
-
24
- # Job Documenter
25
-
26
- > **JOBS_ROOT Note:** `JOBS_ROOT` is always passed explicitly by the orchestrator in the dispatch prompt. Never resolve it yourself — do not fall back to any hardcoded path.
27
-
28
- ## Purpose
29
-
30
- Sub-agent responsible for creating and maintaining structured job documentation in `<JOBS_ROOT>/`. Called exclusively by `job-orchestrator` to persist the lifecycle of orchestrated tasks — from initial plan through analysis, implementation, review, and final report.
31
-
32
- **This skill is NOT invoked directly by users.** It is a service skill dispatched by the orchestrator.
33
-
34
- **Input:** Action type + job name + content payload (from orchestrator)
35
- **Output:** Status report (success/error) + created file paths
36
-
37
- ## When to Use
38
-
39
- - Called by `job-orchestrator` during pipeline execution
40
- - When orchestrator needs to initialize a new job folder
41
- - When orchestrator needs to save a sub-agent result as a document
42
- - When orchestrator needs to update job README or finalize a job
43
-
44
- ## Reference Rule
45
-
46
- All structural conventions are defined in `rules/core/jobs-documentation.mdc`. This skill MUST follow that rule exactly.
47
-
48
- ## Input Contract
49
-
50
- The orchestrator provides a structured prompt with the following fields:
51
-
52
- ```
53
- ACTION: init | add-document | update-readme | finalize
54
- JOB_NAME: <kebab-case folder name>
55
- JOBS_ROOT: <JOBS_ROOT>
56
- DATA: <action-specific payload — see below>
57
- ```
58
-
59
- ---
60
-
61
- ## Actions
62
-
63
- ### Action: `init`
64
-
65
- Initialize a new job folder with required structure.
66
-
67
- **Input DATA:**
68
- ```
69
- TITLE: <Job title — human-readable>
70
- DESCRIPTION: <1-3 sentences describing what this job does>
71
- INTENT: <analyze | implement | review | custom>
72
- SOURCE: <issue URL, PR URL, branch name, or free-text description>
73
- PROJECT: <absolute path to project directory>
74
- BRANCH: <feature branch name, if known — may be "TBD">
75
- BASE_BRANCH: <base branch name>
76
- PLAN: <ordered list of planned steps>
77
- ```
78
-
79
- **Procedure:**
80
-
81
- 1. **Create directory structure:**
82
- ```
83
- .metaproject/jobs/<JOB_NAME>/
84
- README.md
85
- man/
86
- ai/
87
- ```
88
-
89
- 2. **Write README.md** following the format from `jobs-documentation.mdc`:
90
- - Status: `in-progress`
91
- - Created/Updated: current ISO 8601 UTC timestamp
92
- - Fill Context table from input DATA
93
- - Plan section from input PLAN (all items unchecked)
94
- - Empty Agents Used table
95
- - Empty Documents tables
96
- - Empty Problems & Notes
97
-
98
- 3. **Write `ai/plan.md`** — structured version of the plan:
99
- ```markdown
100
- # Execution Plan
101
-
102
- ## Steps
103
- | Step | Type | Agent | Dependencies | Status |
104
- |------|------|-------|-------------|--------|
105
- | 1 | analyze | issue-analyzer | none | pending |
106
- | 2 | prepare | orchestrator | 1 | pending |
107
- | ... | ... | ... | ... | ... |
108
-
109
- ---
110
-
111
- <!-- Document Metadata -->
112
- | Key | Value |
113
- |-----|-------|
114
- | Created | <timestamp> |
115
- | Agent | job-orchestrator |
116
- | Task | Initialize job plan |
117
- | Job | <JOB_NAME> |
118
- | Version | 1.0 |
119
- | Status | final |
120
- ```
121
-
122
- 4. **Write `man/plan.md`** — human-readable version of the plan:
123
- ```markdown
124
- # Execution Plan: <TITLE>
125
-
126
- ## Overview
127
- <DESCRIPTION>
128
-
129
- ## Steps
130
-
131
- 1. **<Step name>** — <description>
132
- - Agent: <agent name>
133
- - Dependencies: <deps or "none">
134
-
135
- 2. ...
136
-
137
- ---
138
-
139
- <!-- Document Metadata -->
140
- | Key | Value |
141
- |-----|-------|
142
- | Created | <timestamp> |
143
- | Agent | job-orchestrator |
144
- | Task | Initialize job plan |
145
- | Job | <JOB_NAME> |
146
- | Version | 1.0 |
147
- | Status | final |
148
- ```
149
-
150
- 5. **Update README.md** — add plan.md entries to Documents tables.
151
-
152
- 6. **Verify:**
153
- - Read directory listing of `.metaproject/jobs/<JOB_NAME>/`
154
- - Confirm: `README.md`, `man/`, `ai/`, `man/plan.md`, `ai/plan.md` all exist
155
- - If any missing → report error
156
-
157
- 7. **Return result:**
158
- ```
159
- DOCUMENTER_RESULT:
160
- action: init
161
- status: success | error
162
- job_path: <JOBS_ROOT>/<JOB_NAME>
163
- files_created: [README.md, man/plan.md, ai/plan.md]
164
- error_details: <if status is error>
165
- ```
166
-
167
- ---
168
-
169
- ### Action: `add-document`
170
-
171
- Add a new document to an existing job.
172
-
173
- **Input DATA:**
174
- ```
175
- DOC_TYPE: <analysis | report | review | context | implementation-report | final-report | improvements | requirements | error-log | tasks.feature | review-findings | custom>
176
- DOC_NAME: <file name without extension, kebab-case — used if DOC_TYPE is "custom">
177
- TARGET: man | ai | both
178
- TITLE: <document title>
179
- CONTENT: <full document content — markdown>
180
- AGENT: <which agent produced this content>
181
- TASK: <which task/phase this relates to>
182
- VERSION: <document version, default "1.0">
183
- DOC_STATUS: <draft | final>
184
- ```
185
-
186
- **Procedure:**
187
-
188
- 1. **Determine file name:**
189
- - If DOC_TYPE is a standard type → use standard name from `jobs-documentation.mdc` (e.g. `analysis.md`, `report.md`)
190
- - If DOC_TYPE is `tasks.feature` → use `tasks.feature` (ai/ only)
191
- - If DOC_TYPE is `custom` → use DOC_NAME + `.md`
192
-
193
- 2. **Determine target directories:**
194
- - `TARGET=man` → write to `man/` only
195
- - `TARGET=ai` → write to `ai/` only
196
- - `TARGET=both` → write to both `man/` and `ai/`
197
-
198
- 3. **For each target directory, write the document:**
199
- ```markdown
200
- # <TITLE>
201
-
202
- <CONTENT>
203
-
204
- ---
205
-
206
- <!-- Document Metadata -->
207
- | Key | Value |
208
- |-----|-------|
209
- | Created | <current ISO 8601 UTC timestamp> |
210
- | Agent | <AGENT> |
211
- | Task | <TASK> |
212
- | Job | <JOB_NAME> |
213
- | Version | <VERSION> |
214
- | Status | <DOC_STATUS> |
215
- ```
216
-
217
- 4. **Update README.md:**
218
- - Add entry to the appropriate Documents table(s) (`man/` and/or `ai/`)
219
- - Entry format: `| [<filename>](<target>/<filename>) | <TITLE> | <DOC_STATUS> |`
220
-
221
- 5. **Verify:**
222
- - Confirm each written file exists by reading directory listing
223
- - Confirm README.md was updated (contains the new file reference)
224
-
225
- 6. **Return result:**
226
- ```
227
- DOCUMENTER_RESULT:
228
- action: add-document
229
- status: success | error
230
- files_created: [<list of created file paths>]
231
- readme_updated: true | false
232
- error_details: <if status is error>
233
- ```
234
-
235
- ---
236
-
237
- ### Action: `update-readme`
238
-
239
- Refresh the README to reflect current state.
240
-
241
- **Input DATA:**
242
- ```
243
- PLAN_UPDATES: <optional — list of step statuses to update: [{step: 1, status: "completed"}, ...]>
244
- AGENTS_UPDATE: <optional — list of agent entries to add/update: [{agent, phase, status}, ...]>
245
- PROBLEMS: <optional — list of problems/notes to add>
246
- BRANCH_UPDATE: <optional — branch name if it was TBD during init>
247
- ```
248
-
249
- **Procedure:**
250
-
251
- 1. **Read current README.md** from `.metaproject/jobs/<JOB_NAME>/README.md`
252
-
253
- 2. **Apply updates:**
254
- - Update plan checkboxes based on PLAN_UPDATES (`[ ]` → `[x]` for completed steps)
255
- - Add/update rows in Agents Used table
256
- - Append to Problems & Notes section
257
- - Update Branch in Context table if BRANCH_UPDATE provided
258
- - Update `**Updated:**` timestamp
259
-
260
- 3. **Re-scan `man/` and `ai/` directories** to ensure Documents tables are complete:
261
- - List all files in `man/` and `ai/`
262
- - If any file exists that is NOT in the Documents table → add it with description "Auto-discovered"
263
- - If any table entry references a file that doesn't exist → mark as "(missing)"
264
-
265
- 4. **Write updated README.md**
266
-
267
- 5. **Return result:**
268
- ```
269
- DOCUMENTER_RESULT:
270
- action: update-readme
271
- status: success | error
272
- updates_applied: [<list of what was updated>]
273
- error_details: <if status is error>
274
- ```
275
-
276
- ---
277
-
278
- ### Action: `finalize`
279
-
280
- Mark the job as completed.
281
-
282
- **Input DATA:**
283
- ```
284
- FINAL_CONTENT: <optional — final report content to save as final-report.md>
285
- FINAL_STATUS: completed | aborted
286
- SUMMARY: <1-3 sentence summary of what was accomplished>
287
- ```
288
-
289
- **Procedure:**
290
-
291
- 1. **If FINAL_CONTENT is provided:**
292
- - Write `man/final-report.md` and `ai/final-report.md` with metadata (same as `add-document` procedure)
293
- - Update README Documents tables
294
-
295
- 2. **Update README.md:**
296
- - Set Status to FINAL_STATUS
297
- - Update `**Updated:**` timestamp
298
- - Mark all plan steps as completed (or appropriate status)
299
- - Add SUMMARY to Description section (or as a "## Outcome" section at the end)
300
-
301
- 3. **Full verification:**
302
- - Read directory listing of `.metaproject/jobs/<JOB_NAME>/`, `man/`, `ai/`
303
- - Cross-check every entry in README Documents tables against actual files
304
- - Report any discrepancies
305
-
306
- 4. **Return result:**
307
- ```
308
- DOCUMENTER_RESULT:
309
- action: finalize
310
- status: success | error
311
- job_path: <JOBS_ROOT>/<JOB_NAME>
312
- final_status: <FINAL_STATUS>
313
- total_documents: <count of all files in man/ + ai/>
314
- verification: passed | <list of discrepancies>
315
- error_details: <if status is error>
316
- ```
317
-
318
- ---
319
-
320
- ## Error Handling
321
-
322
- If any file operation fails during any action:
323
-
324
- 1. **Attempt to create error log:**
325
- - Write `man/error-log.md` with error details, timestamp, which action was being performed
326
- - If this also fails, report the raw error in the return result
327
-
328
- 2. **Return error status:**
329
- ```
330
- DOCUMENTER_RESULT:
331
- action: <action>
332
- status: error
333
- error_details: <what went wrong>
334
- error_log_created: true | false
335
- ```
336
-
337
- 3. **Do NOT throw/crash** — always return a structured result so the orchestrator can decide how to proceed.
338
-
339
- ---
340
-
341
- ## Prompt Template for Orchestrator
342
-
343
- When the orchestrator dispatches this skill as a sub-agent, it should use this prompt structure:
344
-
345
- ```
346
- You are the job-documenter agent. Your task is to manage job documentation.
347
-
348
- Load the skill from: .metaproject/skills/gdskills/orchestration/job-documenter/SKILL.md
349
- Follow the rules from: rules/core/jobs-documentation.mdc
350
-
351
- ACTION: <action>
352
- JOB_NAME: <job-name>
353
- JOBS_ROOT: <JOBS_ROOT>
354
-
355
- DATA:
356
- <action-specific data>
357
-
358
- Execute the action and return a DOCUMENTER_RESULT block.
359
- ```
360
-
361
- ---
362
-
363
- ## Rules of Engagement
364
-
365
- 1. **DO** follow `jobs-documentation.mdc` for all structural decisions.
366
- 2. **DO** add metadata blocks to every document.
367
- 3. **DO** verify file existence after every write operation.
368
- 4. **DO** keep README.md in sync with actual directory contents.
369
- 5. **DO** use ISO 8601 UTC timestamps everywhere.
370
- 6. **DO** return structured DOCUMENTER_RESULT for every action.
371
- 7. **DO NOT** create files outside of `.metaproject/jobs/<JOB_NAME>/`.
372
- 8. **DO NOT** delete or overwrite existing documents without explicit instruction.
373
- 9. **DO NOT** modify files in other job folders.
374
- 10. **DO NOT** interact with the user directly — all communication goes through the orchestrator.