@mrciphersmith/keryx 0.4.27 → 0.4.28
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 +105165 -104989
- package/dist/core.js +21 -197
- package/dist/keryx-general-worker-entry.js +22 -201
- package/package.json +3 -3
- package/src/gdskills/bundled/agents/work-planner.md +1 -1
- package/src/gdskills/bundled/install-manifest.json +3 -26
- package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +1 -2
- package/src/gdskills/bundled/rules/core/definition-of-done.mdc +0 -1
- 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/skills-storage-workflow.mdc +7 -10
- 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/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/review/code-learned-review/SKILL.md +3 -3
- package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +7 -7
- package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +22 -22
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +15 -15
- package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +7 -7
- package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +34 -30
- package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +64 -135
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +4 -4
- 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 +3 -5
- package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +14 -15
- package/src/gdskills/bundled/skills/review/review-style/SKILL.md +14 -13
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +11 -11
- 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/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/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,177 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: feature-dev
|
|
3
|
-
description: "Use when taking a feature from idea or GitHub issue all the way to a merge-ready PR in one guided workflow. NOT for: splitting an issue into tasks run by parallel sub-agents (use job-orchestrator)."
|
|
4
|
-
triggers:
|
|
5
|
-
- "feature dev"
|
|
6
|
-
- "develop feature"
|
|
7
|
-
- "guided feature workflow"
|
|
8
|
-
- "Build feature"
|
|
9
|
-
- "Implement feature"
|
|
10
|
-
- "Feature from scratch"
|
|
11
|
-
metadata:
|
|
12
|
-
author: "MrCipherSmith"
|
|
13
|
-
version: "2.0.0"
|
|
14
|
-
category: "orchestration"
|
|
15
|
-
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
16
|
-
license: "MIT"
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
<SUBAGENT-STOP>
|
|
20
|
-
If you were dispatched as a subagent to execute a specific task, skip this skill entirely.
|
|
21
|
-
This skill is for interactive feature development sessions only.
|
|
22
|
-
Proceed directly with your assigned task.
|
|
23
|
-
</SUBAGENT-STOP>
|
|
24
|
-
|
|
25
|
-
# Feature Development (7-Phase)
|
|
26
|
-
|
|
27
|
-
End-to-end feature development workflow from idea to merge-ready PR.
|
|
28
|
-
|
|
29
|
-
## Arguments
|
|
30
|
-
|
|
31
|
-
- `/feature-dev <description>` — start from a text description. Plan bridge: publish `phase-1`…`phase-8` with `plan_set`/`plan_update`; while a confirmation question is open the items are `proposed` — see the `session-plan-bridge` rule.
|
|
32
|
-
- `/feature-dev #<issue>` — start from a GitHub issue
|
|
33
|
-
- `/feature-dev --resume` — resume interrupted feature-dev (checks for existing worktree/branch)
|
|
34
|
-
|
|
35
|
-
## 8-Phase Architecture
|
|
36
|
-
|
|
37
|
-
> **Rules always loaded:** `tdd-workflow.mdc`, `implementation-doc-mandate.mdc`, `error-handling.mdc`
|
|
38
|
-
> **Sub-agents used:** `tests-creator` (before implement), `code-verifier` (after implement)
|
|
39
|
-
|
|
40
|
-
### Phase 1: REQUIREMENTS + SPEC
|
|
41
|
-
|
|
42
|
-
1. Parse input (description or GitHub issue via `gh issue view`). An issue filed from a review finding, or an external review comment, is a premise to check: dispatch `review-premise` on it first, shaped and recorded as `flow-orchestrator` Phase 1 says ("A flow sourced from a finding": no `decide-premise`; claims in `<flow-dir>/premise/<n>.json` if a flow exists; with none, its claims object goes into the Implementation Spec under **Premise**), and on `challenged` or `owner-decision` ask the operator its question with its options and journal their answer before writing the spec
|
|
43
|
-
2. Clarify ambiguities — ask the user up to 3 questions max
|
|
44
|
-
3. Produce the **Implementation Spec** (per `implementation-doc-mandate.mdc`):
|
|
45
|
-
- **What**: feature description in 2-3 sentences
|
|
46
|
-
- **Why**: user value / business reason
|
|
47
|
-
- **Scope**: what's in, what's explicitly out
|
|
48
|
-
- **Acceptance criteria**: testable bullet points
|
|
49
|
-
- **Approach**: which files will change, key design decisions
|
|
50
|
-
- **Test strategy**: framework, which scenarios will be covered
|
|
51
|
-
- **Premise** (only for an input sourced from a finding, with no flow): the review-premise claims object and the operator's answer, in their words
|
|
52
|
-
4. **Save spec** to `.feature-spec.md` in project root (add to .gitignore if not already), then **get user confirmation before proceeding**
|
|
53
|
-
|
|
54
|
-
### Phase 2: DESIGN
|
|
55
|
-
|
|
56
|
-
1. Research the codebase:
|
|
57
|
-
- Find related modules via search tools
|
|
58
|
-
- Read neighboring implementations for patterns
|
|
59
|
-
- **Detect test framework** (package.json, existing test files) — needed for tests-creator
|
|
60
|
-
2. Produce implementation plan:
|
|
61
|
-
- Files to create/modify (with brief description of changes)
|
|
62
|
-
- Dependencies or packages needed
|
|
63
|
-
- Data model changes if any
|
|
64
|
-
- Estimated complexity: S / M / L
|
|
65
|
-
3. Load relevant rules from `.metaproject/rules/core/` based on what will be built:
|
|
66
|
-
- Always: `tdd-workflow.mdc`, `error-handling.mdc`, `solid-principles.mdc`
|
|
67
|
-
- API/service code: `api-contracts.mdc`, `clean-architecture.mdc`
|
|
68
|
-
- Database: `database-patterns.mdc`
|
|
69
|
-
- Async: `async-patterns.mdc`
|
|
70
|
-
- Security-sensitive: `security-baseline.mdc`
|
|
71
|
-
4. **Get user confirmation on the plan**
|
|
72
|
-
|
|
73
|
-
### Phase 3: PREPARE
|
|
74
|
-
|
|
75
|
-
1. Create a feature branch: `wt switch -c feat/<name>`
|
|
76
|
-
2. Install any new dependencies
|
|
77
|
-
|
|
78
|
-
### Phase 4: TESTS-CREATOR (TDD — RED phase)
|
|
79
|
-
|
|
80
|
-
**Run before writing any implementation code.**
|
|
81
|
-
|
|
82
|
-
1. For each group of acceptance criteria, invoke `tests-creator`:
|
|
83
|
-
- Input: acceptance criteria from Phase 1 spec + target files from Phase 2 plan
|
|
84
|
-
- tests-creator detects framework and generates failing test stubs
|
|
85
|
-
- tests-creator commits the stubs and verifies RED state
|
|
86
|
-
2. Confirm test stubs are in place and failing before proceeding to Phase 5
|
|
87
|
-
|
|
88
|
-
### Phase 5: IMPLEMENT (TDD — GREEN phase)
|
|
89
|
-
|
|
90
|
-
1. Implement changes file by file, following the plan from Phase 2
|
|
91
|
-
2. Goal: make the failing tests from Phase 4 GREEN
|
|
92
|
-
3. Follow existing code patterns and loaded rules
|
|
93
|
-
4. After each file group, run a quick inline check: `keryx health run --changed --source typescript` (type errors only, over the changed files — `src/health/sources/typescript.ts` resolves the real invocation, so this is never a hardcoded `npx tsc`; on a project with no keryx health config, fall back to its own configured type-check command)
|
|
94
|
-
5. Commit with conventional message after each logical chunk
|
|
95
|
-
|
|
96
|
-
### Phase 6: VERIFY (code-verifier gate)
|
|
97
|
-
|
|
98
|
-
Run `code-verifier` on the full diff:
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
Invoke: .metaproject/skills/gdskills/orchestration/code-verifier/SKILL.md
|
|
102
|
-
Input: codebase_path=<project_root>, scope=changed, base_branch=<base>
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
- `gate: PASS` → proceed to Phase 7
|
|
106
|
-
- `gate: FAIL` → fix findings, re-run code-verifier (max 2 cycles)
|
|
107
|
-
- Still FAIL after 2 cycles → report blocker to user, stop
|
|
108
|
-
|
|
109
|
-
### Phase 7: REVIEW (Self)
|
|
110
|
-
|
|
111
|
-
1. Launch the `review-orchestrator` skill on own changes
|
|
112
|
-
2. Or run a focused self-review:
|
|
113
|
-
- `git diff main...HEAD` — review the full diff
|
|
114
|
-
- Check for: TODOs left behind, console.logs, hardcoded values
|
|
115
|
-
- Verify all acceptance criteria from Phase 1 spec
|
|
116
|
-
3. Fix any findings (max 2 review-fix cycles), never one `review-premise` holds: a held finding is neither fixable nor clean and blocks the cycle until answered; ask the operator about it as `review-orchestrator` "Wave D" says, and only an upheld one is fixed, carrying `premise_verdict` and `premise_answer` as task-implementer's `FIX_CONTEXT` defines them (unattended: stop and report the held list). Each next round is `keryx review start` or `keryx review plan` on the new head: the round comes from `round.json`; no own range, no whole-branch re-review (the `git diff main...HEAD` above is round 1 only).
|
|
117
|
-
4. Re-run `code-verifier` after any fixes
|
|
118
|
-
|
|
119
|
-
### Phase 8: DELIVER + CHANGE REPORT
|
|
120
|
-
|
|
121
|
-
1. Push branch
|
|
122
|
-
2. Create PR:
|
|
123
|
-
- Link to issue if applicable
|
|
124
|
-
- Include acceptance criteria checklist
|
|
125
|
-
- Add test plan and code-verifier results
|
|
126
|
-
3. **Produce Change Report** (per `implementation-doc-mandate.mdc`):
|
|
127
|
-
- Files created/modified with descriptions
|
|
128
|
-
- Test count and results
|
|
129
|
-
- code-verifier gate result
|
|
130
|
-
- Acceptance criteria checklist (checked off)
|
|
131
|
-
- Commits list
|
|
132
|
-
4. Print Change Report to user
|
|
133
|
-
5. Report PR URL to user
|
|
134
|
-
|
|
135
|
-
## Status Updates
|
|
136
|
-
|
|
137
|
-
At each phase transition, report progress:
|
|
138
|
-
```
|
|
139
|
-
✅ Phase 1: Requirements confirmed
|
|
140
|
-
🔄 Phase 2: Designing implementation...
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## Rules
|
|
144
|
-
|
|
145
|
-
- ALWAYS get user confirmation after Phase 1 (requirements + spec) and Phase 2 (design)
|
|
146
|
-
- Phases 4-7 are autonomous — no user interaction needed
|
|
147
|
-
- If stuck for >3 attempts on any step, report the blocker and ask user
|
|
148
|
-
- NEVER skip Phase 4 (tests-creator) even if user says "skip tests" — this is TDD, not optional testing
|
|
149
|
-
- NEVER skip Phase 6 (code-verifier) — it is the quality gate, not a suggestion
|
|
150
|
-
- NEVER commit broken code (code-verifier gate must pass before PR)
|
|
151
|
-
- Keep commits atomic: one commit per logical chunk, not one giant commit
|
|
152
|
-
- ALWAYS produce the Change Report in Phase 8 — even if the PR was not created
|
|
153
|
-
|
|
154
|
-
## Red Flags — Stop and re-read this skill if you are thinking:
|
|
155
|
-
|
|
156
|
-
| Rationalization | Why it's wrong |
|
|
157
|
-
|---|---|
|
|
158
|
-
| "Requirements are clear enough, I'll skip the design phase" | Skipping design means discovering mismatches after code is written, not before |
|
|
159
|
-
| "The user already approved this approach verbally, no need to document" | Undocumented approval is invisible to reviewers and future agents; it doesn't exist |
|
|
160
|
-
| "Tests can be written after — implementation first to check if the approach works" | Writing tests after implementation makes you test what you built, not what was required |
|
|
161
|
-
| "This phase isn't needed for such a straightforward feature" | Every skipped phase is a deferred bug report |
|
|
162
|
-
| "I understand the requirements, confirmation is just a formality" | The confirmation step exists to catch the gap between what you understood and what was meant |
|
|
163
|
-
|
|
164
|
-
**The three constraints that hold the pipeline together:** no implementation before the spec is written and confirmed; no implementation code before tests-creator has generated failing stubs; no delivery without a passing code-verifier gate and a Change Report.
|
|
165
|
-
|
|
166
|
-
## Verification
|
|
167
|
-
|
|
168
|
-
Do not report the feature as delivered until all of these hold:
|
|
169
|
-
|
|
170
|
-
- The user explicitly confirmed the Phase 1 spec and the Phase 2 design — a confirmation you can quote, not one you inferred from silence.
|
|
171
|
-
- Phase 4's test stubs were observed FAILING before any implementation code was written, and the same tests pass now. Tests that were green the moment they were written tested nothing.
|
|
172
|
-
- Every acceptance criterion in the Phase 1 spec maps to at least one test, and each is checked off in the Change Report.
|
|
173
|
-
- `code-verifier` was re-run after the last fix and its final result is `gate: PASS` (or `PASS_WITH_WARNINGS` with the warnings named in the Change Report). A gate result from before the last edit does not count.
|
|
174
|
-
- `git diff <base>...HEAD` shows no TODOs, debug logging, or hardcoded values introduced by this work.
|
|
175
|
-
- Commits are atomic — one logical chunk each — and the branch is pushed.
|
|
176
|
-
- The PR exists with the issue link, acceptance-criteria checklist, test plan and gate result; if no PR was created, the Change Report says why.
|
|
177
|
-
- The Change Report was printed to the user and names files changed, test count and result, gate result, checked-off criteria, and the commit list.
|
|
@@ -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
|
-
}
|