@mrciphersmith/keryx 0.4.27 → 0.4.29
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.
- package/README.md +2 -2
- package/dist/cli.js +105640 -105242
- package/dist/core.js +24 -200
- package/dist/keryx-general-worker-entry.js +355 -418
- package/package.json +3 -3
- package/src/gdskills/bundled/agents/work-planner.md +1 -1
- package/src/gdskills/bundled/install-manifest.json +4 -26
- package/src/gdskills/bundled/rules/core/clean-architecture.mdc +25 -153
- package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +1 -2
- package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +1 -0
- package/src/gdskills/bundled/rules/core/definition-of-done.mdc +0 -1
- package/src/gdskills/bundled/rules/core/error-handling.mdc +57 -108
- package/src/gdskills/bundled/rules/core/implementation-doc-mandate.mdc +4 -5
- package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +8 -8
- package/src/gdskills/bundled/rules/core/skill-authoring.mdc +190 -0
- package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +12 -10
- package/src/gdskills/bundled/rules/core/solid-principles.mdc +48 -123
- package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +12 -21
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +3 -3
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +1 -1
- package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/interview/SKILL.md +3 -4
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/git-publish/SKILL.md +60 -0
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +3 -3
- package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +6 -6
- package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +23 -25
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +100 -421
- package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +6 -6
- package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +36 -33
- package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +63 -134
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +4 -5
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +18 -20
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +12 -18
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +2 -2
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +2 -10
- package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +35 -35
- package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +4 -5
- package/src/gdskills/bundled/skills/review/review-premise/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +2 -4
- package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +13 -14
- package/src/gdskills/bundled/skills/review/review-style/SKILL.md +41 -44
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +10 -10
- package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +10 -11
- package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +5 -5
- package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/patterns.mdc +4 -3
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/coding-style.mdc +3 -3
- package/src/gdskills/bundled/stacks/mobx/agent-refs.json +1 -1
- package/src/gdskills/bundled/stacks/mobx/governance/scout.json +2 -2
- package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/SKILL.md +2 -2
- package/src/gdskills/bundled/stacks/ruby-rails/rules/coding-style.mdc +4 -4
- package/src/gdskills/bundled/stacks/vue/governance/scout.json +1 -1
- package/src/gdskills/contracts/review-finding.schema.json +2 -2
- package/src/gdskills/bundled/rules/core/code-review-ai-assistant.mdc +0 -49
- package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +0 -198
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +0 -177
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +0 -414
- package/src/gdskills/bundled/skills/orchestration/job-documenter/input-contract.schema.json +0 -55
- package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json +0 -58
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +0 -209
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +0 -209
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +0 -208
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +0 -255
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +0 -255
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +0 -254
- package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +0 -209
- package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +0 -209
- package/src/gdskills/bundled/skills/planning/planner/SKILL.md +0 -208
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +0 -171
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +0 -171
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +0 -170
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +0 -184
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +0 -184
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +0 -183
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +0 -249
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +0 -249
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +0 -248
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +0 -199
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +0 -199
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +0 -198
- package/src/gdskills/bundled/skills/quality/commit/SKILL.md +0 -87
- package/src/gdskills/bundled/skills/quality/pr/SKILL.md +0 -95
- package/src/gdskills/bundled/skills/quality/push/SKILL.md +0 -73
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +0 -238
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +0 -301
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +0 -208
|
@@ -1,414 +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/. NOT for: producing the analysis or report content itself — this skill persists what the orchestrator hands it (use job-orchestrator)."
|
|
5
|
-
triggers:
|
|
6
|
-
- "job docs"
|
|
7
|
-
- "document job"
|
|
8
|
-
- "persistent job documentation"
|
|
9
|
-
- "Initialize job folder"
|
|
10
|
-
- "Save job report"
|
|
11
|
-
- "Add job document"
|
|
12
|
-
metadata:
|
|
13
|
-
author: "MrCipherSmith"
|
|
14
|
-
version: "1.0.0"
|
|
15
|
-
category: "orchestration"
|
|
16
|
-
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
17
|
-
license: "MIT"
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
<SUBAGENT-STOP>
|
|
21
|
-
If you were dispatched as a subagent to execute a specific task, skip this skill entirely.
|
|
22
|
-
This skill is for orchestrators and interactive session-level routing only.
|
|
23
|
-
Proceed directly with your assigned task.
|
|
24
|
-
</SUBAGENT-STOP>
|
|
25
|
-
|
|
26
|
-
# Job Documenter
|
|
27
|
-
|
|
28
|
-
> **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.
|
|
29
|
-
|
|
30
|
-
## Purpose
|
|
31
|
-
|
|
32
|
-
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.
|
|
33
|
-
|
|
34
|
-
**This skill is NOT invoked directly by users.** It is a service skill dispatched by the orchestrator.
|
|
35
|
-
|
|
36
|
-
**Input:** Action type + job name + content payload (from orchestrator)
|
|
37
|
-
**Output:** Status report (success/error) + created file paths
|
|
38
|
-
|
|
39
|
-
## When to Use
|
|
40
|
-
|
|
41
|
-
- Called by `job-orchestrator` during pipeline execution
|
|
42
|
-
- When orchestrator needs to initialize a new job folder
|
|
43
|
-
- When orchestrator needs to save a sub-agent result as a document
|
|
44
|
-
- When orchestrator needs to update job README or finalize a job
|
|
45
|
-
|
|
46
|
-
## Reference Rule
|
|
47
|
-
|
|
48
|
-
All structural conventions are defined in `rules/core/jobs-documentation.mdc`. This skill MUST follow that rule exactly.
|
|
49
|
-
|
|
50
|
-
## Input Contract
|
|
51
|
-
|
|
52
|
-
The orchestrator provides a structured prompt with the following fields:
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
ACTION: init | add-document | update-readme | finalize
|
|
56
|
-
JOB_NAME: <kebab-case folder name>
|
|
57
|
-
JOBS_ROOT: <JOBS_ROOT>
|
|
58
|
-
DATA: <action-specific payload — see below>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Actions
|
|
64
|
-
|
|
65
|
-
### Action: `init`
|
|
66
|
-
|
|
67
|
-
Initialize a new job folder with required structure.
|
|
68
|
-
|
|
69
|
-
**Input DATA:**
|
|
70
|
-
```
|
|
71
|
-
TITLE: <Job title — human-readable>
|
|
72
|
-
DESCRIPTION: <1-3 sentences describing what this job does>
|
|
73
|
-
INTENT: <analyze | implement | review | custom>
|
|
74
|
-
SOURCE: <issue URL, PR URL, branch name, or free-text description>
|
|
75
|
-
PROJECT: <absolute path to project directory>
|
|
76
|
-
BRANCH: <feature branch name, if known — may be "TBD">
|
|
77
|
-
BASE_BRANCH: <base branch name>
|
|
78
|
-
PLAN: <ordered list of planned steps>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Procedure:**
|
|
82
|
-
|
|
83
|
-
1. **Create directory structure:**
|
|
84
|
-
```
|
|
85
|
-
.metaproject/jobs/<JOB_NAME>/
|
|
86
|
-
README.md
|
|
87
|
-
man/
|
|
88
|
-
ai/
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
2. **Write README.md** following the format from `jobs-documentation.mdc`:
|
|
92
|
-
- Status: `in-progress`
|
|
93
|
-
- Created/Updated: current ISO 8601 UTC timestamp
|
|
94
|
-
- Fill Context table from input DATA
|
|
95
|
-
- Plan section from input PLAN (all items unchecked)
|
|
96
|
-
- Empty Agents Used table
|
|
97
|
-
- Empty Documents tables
|
|
98
|
-
- Empty Problems & Notes
|
|
99
|
-
|
|
100
|
-
3. **Write `ai/plan.md`** — structured version of the plan:
|
|
101
|
-
```markdown
|
|
102
|
-
# Execution Plan
|
|
103
|
-
|
|
104
|
-
## Steps
|
|
105
|
-
| Step | Type | Agent | Dependencies | Status |
|
|
106
|
-
|------|------|-------|-------------|--------|
|
|
107
|
-
| 1 | analyze | issue-analyzer | none | pending |
|
|
108
|
-
| 2 | prepare | orchestrator | 1 | pending |
|
|
109
|
-
| ... | ... | ... | ... | ... |
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
<!-- Document Metadata -->
|
|
114
|
-
| Key | Value |
|
|
115
|
-
|-----|-------|
|
|
116
|
-
| Created | <timestamp> |
|
|
117
|
-
| Agent | job-orchestrator |
|
|
118
|
-
| Task | Initialize job plan |
|
|
119
|
-
| Job | <JOB_NAME> |
|
|
120
|
-
| Version | 1.0 |
|
|
121
|
-
| Status | final |
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
4. **Write `man/plan.md`** — human-readable version of the plan:
|
|
125
|
-
```markdown
|
|
126
|
-
# Execution Plan: <TITLE>
|
|
127
|
-
|
|
128
|
-
## Overview
|
|
129
|
-
<DESCRIPTION>
|
|
130
|
-
|
|
131
|
-
## Steps
|
|
132
|
-
|
|
133
|
-
1. **<Step name>** — <description>
|
|
134
|
-
- Agent: <agent name>
|
|
135
|
-
- Dependencies: <deps or "none">
|
|
136
|
-
|
|
137
|
-
2. ...
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
<!-- Document Metadata -->
|
|
142
|
-
| Key | Value |
|
|
143
|
-
|-----|-------|
|
|
144
|
-
| Created | <timestamp> |
|
|
145
|
-
| Agent | job-orchestrator |
|
|
146
|
-
| Task | Initialize job plan |
|
|
147
|
-
| Job | <JOB_NAME> |
|
|
148
|
-
| Version | 1.0 |
|
|
149
|
-
| Status | final |
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
5. **Update README.md** — add plan.md entries to Documents tables.
|
|
153
|
-
|
|
154
|
-
6. **Verify:**
|
|
155
|
-
- Read directory listing of `.metaproject/jobs/<JOB_NAME>/`
|
|
156
|
-
- Confirm: `README.md`, `man/`, `ai/`, `man/plan.md`, `ai/plan.md` all exist
|
|
157
|
-
- If any missing → report error
|
|
158
|
-
|
|
159
|
-
7. **Return result:**
|
|
160
|
-
```
|
|
161
|
-
DOCUMENTER_RESULT:
|
|
162
|
-
action: init
|
|
163
|
-
status: success | error
|
|
164
|
-
job_path: <JOBS_ROOT>/<JOB_NAME>
|
|
165
|
-
files_created: [README.md, man/plan.md, ai/plan.md]
|
|
166
|
-
error_details: <if status is error>
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
### Action: `add-document`
|
|
172
|
-
|
|
173
|
-
Add a new document to an existing job.
|
|
174
|
-
|
|
175
|
-
**Input DATA:**
|
|
176
|
-
```
|
|
177
|
-
DOC_TYPE: <analysis | report | review | context | implementation-report | final-report | improvements | requirements | error-log | tasks.feature | review-findings | custom>
|
|
178
|
-
DOC_NAME: <file name without extension, kebab-case — used if DOC_TYPE is "custom">
|
|
179
|
-
TARGET: man | ai | both
|
|
180
|
-
TITLE: <document title>
|
|
181
|
-
CONTENT: <full document content — markdown>
|
|
182
|
-
AGENT: <which agent produced this content>
|
|
183
|
-
TASK: <which task/phase this relates to>
|
|
184
|
-
VERSION: <document version, default "1.0">
|
|
185
|
-
DOC_STATUS: <draft | final>
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
**Procedure:**
|
|
189
|
-
|
|
190
|
-
1. **Determine file name:**
|
|
191
|
-
- If DOC_TYPE is a standard type → use standard name from `jobs-documentation.mdc` (e.g. `analysis.md`, `report.md`)
|
|
192
|
-
- If DOC_TYPE is `tasks.feature` → use `tasks.feature` (ai/ only)
|
|
193
|
-
- If DOC_TYPE is `custom` → use DOC_NAME + `.md`
|
|
194
|
-
|
|
195
|
-
2. **Determine target directories:**
|
|
196
|
-
- `TARGET=man` → write to `man/` only
|
|
197
|
-
- `TARGET=ai` → write to `ai/` only
|
|
198
|
-
- `TARGET=both` → write to both `man/` and `ai/`
|
|
199
|
-
|
|
200
|
-
3. **For each target directory, write the document:**
|
|
201
|
-
```markdown
|
|
202
|
-
# <TITLE>
|
|
203
|
-
|
|
204
|
-
<CONTENT>
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
<!-- Document Metadata -->
|
|
209
|
-
| Key | Value |
|
|
210
|
-
|-----|-------|
|
|
211
|
-
| Created | <current ISO 8601 UTC timestamp> |
|
|
212
|
-
| Agent | <AGENT> |
|
|
213
|
-
| Task | <TASK> |
|
|
214
|
-
| Job | <JOB_NAME> |
|
|
215
|
-
| Version | <VERSION> |
|
|
216
|
-
| Status | <DOC_STATUS> |
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
4. **Update README.md:**
|
|
220
|
-
- Add entry to the appropriate Documents table(s) (`man/` and/or `ai/`)
|
|
221
|
-
- Entry format: `| [<filename>](<target>/<filename>) | <TITLE> | <DOC_STATUS> |`
|
|
222
|
-
|
|
223
|
-
5. **Verify:**
|
|
224
|
-
- Confirm each written file exists by reading directory listing
|
|
225
|
-
- Confirm README.md was updated (contains the new file reference)
|
|
226
|
-
|
|
227
|
-
6. **Return result:**
|
|
228
|
-
```
|
|
229
|
-
DOCUMENTER_RESULT:
|
|
230
|
-
action: add-document
|
|
231
|
-
status: success | error
|
|
232
|
-
files_created: [<list of created file paths>]
|
|
233
|
-
readme_updated: true | false
|
|
234
|
-
error_details: <if status is error>
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
### Action: `update-readme`
|
|
240
|
-
|
|
241
|
-
Refresh the README to reflect current state.
|
|
242
|
-
|
|
243
|
-
**Input DATA:**
|
|
244
|
-
```
|
|
245
|
-
PLAN_UPDATES: <optional — list of step statuses to update: [{step: 1, status: "completed"}, ...]>
|
|
246
|
-
AGENTS_UPDATE: <optional — list of agent entries to add/update: [{agent, phase, status}, ...]>
|
|
247
|
-
PROBLEMS: <optional — list of problems/notes to add>
|
|
248
|
-
BRANCH_UPDATE: <optional — branch name if it was TBD during init>
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
**Procedure:**
|
|
252
|
-
|
|
253
|
-
1. **Read current README.md** from `.metaproject/jobs/<JOB_NAME>/README.md`
|
|
254
|
-
|
|
255
|
-
2. **Apply updates:**
|
|
256
|
-
- Update plan checkboxes based on PLAN_UPDATES (`[ ]` → `[x]` for completed steps)
|
|
257
|
-
- Add/update rows in Agents Used table
|
|
258
|
-
- Append to Problems & Notes section
|
|
259
|
-
- Update Branch in Context table if BRANCH_UPDATE provided
|
|
260
|
-
- Update `**Updated:**` timestamp
|
|
261
|
-
|
|
262
|
-
3. **Re-scan `man/` and `ai/` directories** to ensure Documents tables are complete:
|
|
263
|
-
- List all files in `man/` and `ai/`
|
|
264
|
-
- If any file exists that is NOT in the Documents table → add it with description "Auto-discovered"
|
|
265
|
-
- If any table entry references a file that doesn't exist → mark as "(missing)"
|
|
266
|
-
|
|
267
|
-
4. **Write updated README.md**
|
|
268
|
-
|
|
269
|
-
5. **Return result:**
|
|
270
|
-
```
|
|
271
|
-
DOCUMENTER_RESULT:
|
|
272
|
-
action: update-readme
|
|
273
|
-
status: success | error
|
|
274
|
-
updates_applied: [<list of what was updated>]
|
|
275
|
-
error_details: <if status is error>
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
---
|
|
279
|
-
|
|
280
|
-
### Action: `finalize`
|
|
281
|
-
|
|
282
|
-
Mark the job as completed.
|
|
283
|
-
|
|
284
|
-
**Input DATA:**
|
|
285
|
-
```
|
|
286
|
-
FINAL_CONTENT: <optional — final report content to save as final-report.md>
|
|
287
|
-
FINAL_STATUS: completed | aborted
|
|
288
|
-
SUMMARY: <1-3 sentence summary of what was accomplished>
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
**Procedure:**
|
|
292
|
-
|
|
293
|
-
1. **If FINAL_CONTENT is provided:**
|
|
294
|
-
- Write `man/final-report.md` and `ai/final-report.md` with metadata (same as `add-document` procedure)
|
|
295
|
-
- Update README Documents tables
|
|
296
|
-
|
|
297
|
-
2. **Update README.md:**
|
|
298
|
-
- Set Status to FINAL_STATUS
|
|
299
|
-
- Update `**Updated:**` timestamp
|
|
300
|
-
- Mark all plan steps as completed (or appropriate status)
|
|
301
|
-
- Add SUMMARY to Description section (or as a "## Outcome" section at the end)
|
|
302
|
-
|
|
303
|
-
3. **Full verification:**
|
|
304
|
-
- Read directory listing of `.metaproject/jobs/<JOB_NAME>/`, `man/`, `ai/`
|
|
305
|
-
- Cross-check every entry in README Documents tables against actual files
|
|
306
|
-
- Report any discrepancies
|
|
307
|
-
|
|
308
|
-
4. **Return result:**
|
|
309
|
-
```
|
|
310
|
-
DOCUMENTER_RESULT:
|
|
311
|
-
action: finalize
|
|
312
|
-
status: success | error
|
|
313
|
-
job_path: <JOBS_ROOT>/<JOB_NAME>
|
|
314
|
-
final_status: <FINAL_STATUS>
|
|
315
|
-
total_documents: <count of all files in man/ + ai/>
|
|
316
|
-
verification: passed | <list of discrepancies>
|
|
317
|
-
error_details: <if status is error>
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
## Error Handling
|
|
323
|
-
|
|
324
|
-
If any file operation fails during any action:
|
|
325
|
-
|
|
326
|
-
1. **Attempt to create error log:**
|
|
327
|
-
- Write `man/error-log.md` with error details, timestamp, which action was being performed
|
|
328
|
-
- If this also fails, report the raw error in the return result
|
|
329
|
-
|
|
330
|
-
2. **Return error status:**
|
|
331
|
-
```
|
|
332
|
-
DOCUMENTER_RESULT:
|
|
333
|
-
action: <action>
|
|
334
|
-
status: error
|
|
335
|
-
error_details: <what went wrong>
|
|
336
|
-
error_log_created: true | false
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
3. **Do NOT throw/crash** — always return a structured result so the orchestrator can decide how to proceed.
|
|
340
|
-
|
|
341
|
-
---
|
|
342
|
-
|
|
343
|
-
## Prompt Template for Orchestrator
|
|
344
|
-
|
|
345
|
-
When the orchestrator dispatches this skill as a sub-agent, it should use this prompt structure:
|
|
346
|
-
|
|
347
|
-
```
|
|
348
|
-
You are the job-documenter agent. Your task is to manage job documentation.
|
|
349
|
-
|
|
350
|
-
Load the skill from: .metaproject/skills/gdskills/orchestration/job-documenter/SKILL.md
|
|
351
|
-
Follow the rules from: rules/core/jobs-documentation.mdc
|
|
352
|
-
|
|
353
|
-
ACTION: <action>
|
|
354
|
-
JOB_NAME: <job-name>
|
|
355
|
-
JOBS_ROOT: <JOBS_ROOT>
|
|
356
|
-
|
|
357
|
-
DATA:
|
|
358
|
-
<action-specific data>
|
|
359
|
-
|
|
360
|
-
Execute the action and return a DOCUMENTER_RESULT block.
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
---
|
|
364
|
-
|
|
365
|
-
## Rules of Engagement
|
|
366
|
-
|
|
367
|
-
1. **DO** follow `jobs-documentation.mdc` for all structural decisions.
|
|
368
|
-
2. **DO** add metadata blocks to every document.
|
|
369
|
-
3. **DO** verify file existence after every write operation.
|
|
370
|
-
4. **DO** keep README.md in sync with actual directory contents.
|
|
371
|
-
5. **DO** use ISO 8601 UTC timestamps everywhere.
|
|
372
|
-
6. **DO** return structured DOCUMENTER_RESULT for every action.
|
|
373
|
-
7. **DO NOT** create files outside of `.metaproject/jobs/<JOB_NAME>/`.
|
|
374
|
-
8. **DO NOT** delete or overwrite existing documents without explicit instruction.
|
|
375
|
-
9. **DO NOT** modify files in other job folders.
|
|
376
|
-
10. **DO NOT** interact with the user directly — all communication goes through the orchestrator.
|
|
377
|
-
|
|
378
|
-
---
|
|
379
|
-
|
|
380
|
-
## Red Flags
|
|
381
|
-
|
|
382
|
-
Stop and re-read this skill if you are thinking:
|
|
383
|
-
|
|
384
|
-
| Rationalization | Rebuttal |
|
|
385
|
-
|---|---|
|
|
386
|
-
| "The write call raised no error, so the file is there." | Rule 3 requires verifying existence after every write. A missing parent directory, a `JOBS_ROOT` that does not exist, or a path assembled from a truncated job name all fail in ways that look like success until the orchestrator reads back nothing. |
|
|
387
|
-
| "`JOBS_ROOT` wasn't in the dispatch, so `.metaproject/jobs/` is the obvious default." | The JOBS_ROOT note forbids resolving it yourself, with no fallback. A missing `JOBS_ROOT` is a `status: error` result — writing to a guessed root scatters a job's documents where the orchestrator will never look for them. |
|
|
388
|
-
| "The README table already lists this document, so the directory must match it." | The README is what you wrote; the directory is what exists. `finalize` cross-checks every table entry against a real listing precisely because those two drift, and the drift is invisible from either side alone. |
|
|
389
|
-
| "A document with this name already exists, so the new content replaces it." | Rule 8: no overwrite without explicit instruction. The existing file is a previous phase's record; the orchestrator asked to ADD a document, not to erase the trail it is keeping. |
|
|
390
|
-
| "The file operation failed, so I should stop and surface the exception." | Rule: never throw. The orchestrator has a decision to make (retry, continue, abort) and can only make it from a structured `DOCUMENTER_RESULT` with `status: error` and `error_details`. A crash gives it nothing to route on. |
|
|
391
|
-
| "The payload the orchestrator sent is thin — I'll ask the user what to put in the report." | Rule 10: no direct user contact. Persist exactly what was handed over; an incomplete payload is reported as a discrepancy, not filled in from a conversation this skill is not part of. |
|
|
392
|
-
| "The job is basically finished, so I'll set the README status to completed." | Only the `finalize` action, with an explicit `FINAL_STATUS`, may set it. Marking a job complete from inside `add-document` reports an outcome the orchestrator has not reached. |
|
|
393
|
-
|
|
394
|
-
---
|
|
395
|
-
|
|
396
|
-
## Verification
|
|
397
|
-
|
|
398
|
-
Report `STATUS: <TOKEN>` as the first line of the response, followed by the `DOCUMENTER_RESULT` block:
|
|
399
|
-
|
|
400
|
-
```
|
|
401
|
-
STATUS: DONE — the action completed and every written path was verified to exist
|
|
402
|
-
STATUS: DONE_WITH_CONCERNS — the action completed, but the README/directory cross-check found discrepancies
|
|
403
|
-
STATUS: BLOCKED — cannot proceed: JOBS_ROOT missing from the dispatch, job folder absent for a non-init action
|
|
404
|
-
STATUS: FAILED — a file operation failed and could not be recovered; error_details says what
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
Before reporting `DONE`, all of these must hold:
|
|
408
|
-
|
|
409
|
-
- Every path named in `DOCUMENTER_RESULT` was listed or read back after writing, not inferred from the write succeeding.
|
|
410
|
-
- Every document written carries its metadata block and an ISO 8601 UTC timestamp.
|
|
411
|
-
- `README.md`'s Documents tables and the real contents of `man/` and `ai/` agree entry for entry; any mismatch is reported in `verification`, never quietly corrected in only one of the two.
|
|
412
|
-
- No file was created, modified or deleted outside `<JOBS_ROOT>/<JOB_NAME>/`.
|
|
413
|
-
- The `DOCUMENTER_RESULT` block names the action actually performed and has every field that action's contract defines; `status: error` always carries `error_details`.
|
|
414
|
-
- For `finalize`: README Status equals the given `FINAL_STATUS`, `total_documents` matches the real file count, and the summary is present.
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://keryx.local/schemas/job-documenter/input-contract.schema.json",
|
|
4
|
-
"title": "Job Documenter Input Contract",
|
|
5
|
-
"description": "Input for job-documenter actions. Called exclusively by job-orchestrator.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"required": ["ACTION", "JOB_NAME", "JOBS_ROOT"],
|
|
9
|
-
"properties": {
|
|
10
|
-
"ACTION": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"enum": ["init", "add-document", "update-readme", "finalize"],
|
|
13
|
-
"description": "Which documenter action to perform"
|
|
14
|
-
},
|
|
15
|
-
"JOB_NAME": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"pattern": "^[a-z0-9-]+$",
|
|
18
|
-
"description": "Kebab-case job folder name"
|
|
19
|
-
},
|
|
20
|
-
"JOBS_ROOT": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"description": "Absolute path to jobs root directory"
|
|
23
|
-
},
|
|
24
|
-
"DATA": {
|
|
25
|
-
"type": "object",
|
|
26
|
-
"description": "Action-specific payload",
|
|
27
|
-
"additionalProperties": true,
|
|
28
|
-
"properties": {
|
|
29
|
-
"TITLE": { "type": "string" },
|
|
30
|
-
"DESCRIPTION": { "type": "string" },
|
|
31
|
-
"INTENT": { "type": "string", "enum": ["analyze", "implement", "review", "custom"] },
|
|
32
|
-
"SOURCE": { "type": "string" },
|
|
33
|
-
"PROJECT": { "type": "string" },
|
|
34
|
-
"BRANCH": { "type": "string" },
|
|
35
|
-
"BASE_BRANCH": { "type": "string" },
|
|
36
|
-
"PLAN": { "type": "array", "items": { "type": "object" } },
|
|
37
|
-
"DOC_TYPE": { "type": "string" },
|
|
38
|
-
"DOC_NAME": { "type": "string" },
|
|
39
|
-
"TARGET": { "type": "string", "enum": ["man", "ai", "both"] },
|
|
40
|
-
"CONTENT": { "type": "string" },
|
|
41
|
-
"AGENT": { "type": "string" },
|
|
42
|
-
"TASK": { "type": "string" },
|
|
43
|
-
"VERSION": { "type": "string" },
|
|
44
|
-
"DOC_STATUS": { "type": "string", "enum": ["draft", "final"] },
|
|
45
|
-
"PLAN_UPDATES": { "type": "array" },
|
|
46
|
-
"AGENTS_UPDATE": { "type": "array" },
|
|
47
|
-
"PROBLEMS": { "type": "array" },
|
|
48
|
-
"BRANCH_UPDATE": { "type": "string" },
|
|
49
|
-
"FINAL_CONTENT": { "type": "string" },
|
|
50
|
-
"FINAL_STATUS": { "type": "string", "enum": ["completed", "aborted"] },
|
|
51
|
-
"SUMMARY": { "type": "string" }
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://keryx.local/schemas/job-documenter/output-contract.schema.json",
|
|
4
|
-
"title": "Job Documenter Output Contract",
|
|
5
|
-
"description": "DOCUMENTER_RESULT returned by job-documenter for every action.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"required": ["action", "status"],
|
|
9
|
-
"properties": {
|
|
10
|
-
"action": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"enum": ["init", "add-document", "update-readme", "finalize"]
|
|
13
|
-
},
|
|
14
|
-
"status": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"enum": ["success", "error"]
|
|
17
|
-
},
|
|
18
|
-
"job_path": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"description": "Absolute path to job folder (for init and finalize)"
|
|
21
|
-
},
|
|
22
|
-
"files_created": {
|
|
23
|
-
"type": "array",
|
|
24
|
-
"items": { "type": "string" },
|
|
25
|
-
"description": "List of file paths created"
|
|
26
|
-
},
|
|
27
|
-
"readme_updated": {
|
|
28
|
-
"type": "boolean",
|
|
29
|
-
"description": "Whether README.md was updated (for add-document)"
|
|
30
|
-
},
|
|
31
|
-
"updates_applied": {
|
|
32
|
-
"type": "array",
|
|
33
|
-
"items": { "type": "string" },
|
|
34
|
-
"description": "List of updates applied (for update-readme)"
|
|
35
|
-
},
|
|
36
|
-
"final_status": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"enum": ["completed", "aborted"],
|
|
39
|
-
"description": "Final job status (for finalize)"
|
|
40
|
-
},
|
|
41
|
-
"total_documents": {
|
|
42
|
-
"type": "integer",
|
|
43
|
-
"description": "Total documents in job folder (for finalize)"
|
|
44
|
-
},
|
|
45
|
-
"verification": {
|
|
46
|
-
"type": "string",
|
|
47
|
-
"description": "passed or list of discrepancies (for finalize)"
|
|
48
|
-
},
|
|
49
|
-
"error_details": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"description": "Error description when status=error"
|
|
52
|
-
},
|
|
53
|
-
"error_log_created": {
|
|
54
|
-
"type": "boolean",
|
|
55
|
-
"description": "Whether error-log.md was created on failure"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|