@groupby/ai-dev 0.5.1 → 0.5.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groupby/ai-dev",
3
- "version": "0.5.1",
3
+ "version": "0.5.4",
4
4
  "description": "Interactive installer for Rezolve Ai development content",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,19 @@
1
+ <!--
2
+ PR TITLE must follow: FHR-<number>: <description>
3
+ Example: FHR-7113: Add AI-first development workflow for FAS
4
+ The pull-request.yml CI check will fail if the format is wrong.
5
+ -->
6
+
7
+ ## Jira ticket
8
+
9
+ [FHR-XXXX](https://attraqt.atlassian.net/browse/FHR-XXXX)
10
+
11
+ ## AI Development Checklist
12
+
13
+ - [ ] Specification file present
14
+ - [ ] Unit tests present and passing
15
+ - [ ] Documentation file present
16
+ - [ ] AI tool used: _Claude Code / Copilot / Agent / Other_
17
+ - [ ] Tests generated/refined with AI (failing tests written before implementation)
18
+ - [ ] AI review pass completed (visible in PR comments)
19
+ - [ ] Repo context files (`CLAUDE.md`, `AGENTS.md`, `architecture.md`, `coding-guidelines.md`, `glossary.md`) still accurate
@@ -0,0 +1,22 @@
1
+ # FHR-XXXX TITLE
2
+
3
+ > Task description, including background context, user stories, and so on.
4
+
5
+ ## Acceptance Criteria
6
+
7
+ **Functional requirements**
8
+ > - criteria 1
9
+ > - criteria 2
10
+ > - ...
11
+
12
+ **Non-Functional requirements**
13
+ > - criteria 1
14
+ > - criteria 2
15
+
16
+
17
+ ## Design and Implementation Plan
18
+
19
+ > Fill with the design and implementation plan.
20
+ > List of user acceptance tests
21
+ > List of unit tests
22
+
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: jira-ticket
3
+ description: Fetch a Jira ticket by number using the Atlassian MCP and report a summary. Use when the user says "jira", "ticket", or provides a ticket number like FHR-1234 or FAS-5678.
4
+ tools: mcp__atlassian__getJiraIssue, mcp__atlassian__getAccessibleAtlassianResources
5
+ ---
6
+
7
+ # Jira Ticket Summary
8
+
9
+ Fetch a Jira ticket via the Atlassian MCP and return a structured summary.
10
+
11
+ ## Prerequisites
12
+
13
+ The `atlassian` MCP server must be connected and authenticated. If the MCP tools are unavailable, tell the user:
14
+ > The Atlassian MCP isn't connected. Run `/mcp` to connect and authenticate, then try again.
15
+
16
+ ## Steps
17
+
18
+ 1. **Validate input**: the ticket number comes from `$ARGUMENTS` (e.g. `FHR-6921`). If empty, ask the user for one.
19
+
20
+ 2. **Fetch the ticket** with the `mcp__atlassian__getJiraIssue` tool:
21
+ - `cloudId`: `attraqt.atlassian.net`
22
+ - `issueIdOrKey`: the ticket number from `$ARGUMENTS`
23
+ - `responseContentFormat`: `markdown` (so the description comes back as plain text, not ADF JSON)
24
+ - `fields`: `["summary", "status", "assignee", "reporter", "description", "labels", "components", "issuetype", "priority", "issuelinks", "fixVersions"]`
25
+
26
+ If the call fails with a cloudId/site error, call `mcp__atlassian__getAccessibleAtlassianResources` to find the correct cloudId, then retry with that value.
27
+
28
+ 3. **Check for errors**: if the tool returns an error (e.g. issue not found, no access), report it clearly and stop.
29
+
30
+ 4. **Report** a structured summary using these fields from the response:
31
+
32
+ - **Ticket**: `key` — `fields.summary`
33
+ - **Type / Priority**: `fields.issuetype.name` / `fields.priority.name`
34
+ - **Status**: `fields.status.name`
35
+ - **Assignee**: `fields.assignee.displayName` (or "Unassigned")
36
+ - **Reporter**: `fields.reporter.displayName`
37
+ - **Labels**: `fields.labels[]` joined, or "none"
38
+ - **Components**: `fields.components[].name` joined, or "none"
39
+ - **Fix Version**: `fields.fixVersions[].name`, or "none"
40
+ - **Description**: synthesise `fields.description` into 3–6 readable sentences
41
+ - **Linked tickets**: for each entry in `fields.issuelinks[]`, show the link type and the linked issue key + summary
42
+
43
+ ## Notes
44
+
45
+ - Authentication is handled by the MCP's OAuth session — no API tokens or `CONFLUENCE_USER`/`CONFLUENCE_PASS` env vars are needed.
46
+ - Never print the raw JSON. Synthesise a clean human-readable summary from the parsed fields.
47
+ - If the description is empty or null, say "No description provided."
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: plan-spec
3
+ description: Read a spec file and produce a detailed design and implementation plan — with BDD acceptance tests and TDD test cases per task — written into the spec's "Design and Implementation Plan" section, then committed. Use when user references a spec file and wants a plan, implementation design, or test specifications derived from requirements.
4
+ arguments: spec-file
5
+ ---
6
+
7
+ # Plan Spec
8
+
9
+ Turns a refined spec into a concrete design and implementation plan with tests, committed to git.
10
+
11
+ ## Quick start
12
+
13
+ ```
14
+ /plan-spec suggest-docs/src/main/docs/plans/FHR-XXXX-feature-name.md
15
+ ```
16
+
17
+ ## Workflow
18
+
19
+ 1. **Enter Plan mode** — call `EnterPlanMode` immediately; stay in it while producing the plan
20
+
21
+ 2. **Load context**
22
+ - Read the spec file passed as argument
23
+ - Read `glossary.md` from the project root for ubiquitous language
24
+ - Read `architecture.md` from the project root for architecture guidelines
25
+
26
+ 3. **Produce the plan**
27
+ - Break the feature into discrete implementation tasks
28
+ - For each task, use this format:
29
+ ```
30
+ ### Task: <name>
31
+ - [ ] Acceptance tests
32
+ - [ ] Unit tests
33
+ - [ ] Production code
34
+
35
+ **Acceptance tests (BDD)**
36
+ - Given ... When ... Then ...
37
+
38
+ **Unit tests (TDD)**
39
+ - should ... when ...
40
+ ```
41
+ - Respect module boundaries and patterns from `architecture.md`
42
+ - Use only domain terms from `glossary.md`
43
+
44
+ 4. **Exit Plan mode and write into spec** — call `ExitPlanMode`, then update the spec file
45
+ - Write the full plan under the `## Design and Implementation Plan` section
46
+ - Create the section if it does not already exist
47
+
48
+ 5. **Commit**
49
+ - Stage the spec file
50
+ - Commit with message (replace XXXX with the actual ticket number from the spec file): `FHR-XXXX: add design and implementation plan`
51
+
52
+ ## Constraints
53
+
54
+ - Do NOT touch any source code
55
+ - Do NOT implement anything — plan only
56
+ - Use only ubiquitous language from the glossary
57
+ - Follow architecture patterns (module boundaries, event bus, DI, interfaces) from `architecture.md`
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: refine-spec
3
+ description: Conduct a structured requirements-refinement interview against a spec file, using the project's ubiquitous language from glossary.md, until scope and acceptance criteria are clear, then update the spec file in place. Use when user references a spec file and wants to clarify requirements, define scope, or sharpen acceptance criteria — but not write code or tests.
4
+ arguments: spec-file
5
+ ---
6
+
7
+ # Refine Spec
8
+
9
+ Requirements-refinement session: interview the user until scope and acceptance criteria are clear, then rewrite the spec in place.
10
+
11
+ ## Quick start
12
+
13
+ ```
14
+ /refine-spec suggest-docs/src/main/docs/plans/FHR-XXXX-feature-name.md
15
+ ```
16
+
17
+ ## Workflow
18
+
19
+ 1. **Enter Plan mode** — call `EnterPlanMode` immediately; stay in it through the entire interview
20
+
21
+ 2. **Load context**
22
+ - Read the spec file passed as argument
23
+ - Read `glossary.md` from the project root for ubiquitous language
24
+
25
+ 3. **Assess current state**
26
+ - Identify what is clear, what is vague, and what is missing
27
+ - Flag any terminology that drifts from the glossary
28
+
29
+ 4. **Interview loop**
30
+ - Ask focused, one-topic-at-a-time questions (scope, edge cases, acceptance criteria)
31
+ - Use only domain terms from the glossary — never invent synonyms
32
+ - Continue until scope is unambiguous, acceptance criteria are testable, no open questions remain
33
+
34
+ 5. **Exit Plan mode and update spec** — call `ExitPlanMode`, then rewrite the spec file in place
35
+ - Preserve original structure; add/update sections as needed
36
+ - Use only ubiquitous language from the glossary
37
+
38
+ 6. **Commit**
39
+ - Stage the spec file
40
+ - Commit with message (replace XXXX with the actual ticket number from the spec file): `FHR-XXXX: refine the requirements`
41
+
42
+ ## Constraints
43
+
44
+ - Do NOT touch any source code
45
+ - Do NOT discuss unit tests or implementation details
46
+ - Do NOT propose solutions — only clarify requirements
47
+ - Stop interviewing once all sections are clear
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: tdd-green
3
+ description: Implement production code (green phase) for the next incomplete task in a spec file's Design and Implementation Plan, writing only enough code to make the failing tests pass, then refactor while keeping tests green, mark the Production code sub-task done, and commit the green and refactor work separately. Use when user references a spec file and wants to implement a feature, or says "green phase", "make tests pass", "tdd green", or "green and refactor".
4
+ arguments: spec-file
5
+ ---
6
+
7
+ # TDD Green
8
+
9
+ Implements the production code to make the failing tests pass. Run after `/tdd-red`.
10
+
11
+ ## Quick start
12
+
13
+ ```
14
+ /tdd-green suggest-docs/src/main/docs/plans/FHR-XXXX-feature-name.md
15
+ ```
16
+
17
+ ## Workflow
18
+
19
+ 1. **Load context**
20
+ - Read the spec file passed as argument
21
+ - Read `glossary.md` from the project root for ubiquitous language
22
+ - Read `coding-guidelines.md` from the project root for coding conventions
23
+ - Read `architecture.md` from the project root for module boundaries and patterns
24
+
25
+ 2. **Find the next incomplete task**
26
+ - Scan the `## Design and Implementation Plan` section for the first task whose `- [ ] Production code` checkbox is unchecked
27
+ - Work on that task only — do not advance to subsequent tasks
28
+
29
+ 3. **Implement production code**
30
+ - Write only enough production code to make the failing tests pass
31
+ - Follow all conventions in `coding-guidelines.md`
32
+ - Respect module boundaries from `architecture.md`
33
+ - Use only domain terms from `glossary.md`
34
+ - This is the **green phase**: no refactoring, no gold-plating — just passing tests
35
+
36
+ 4. **Run the tests**
37
+ - Unit tests
38
+ - Acceptance tests (JGiven)
39
+ - All tests must pass before proceeding
40
+
41
+ 5. **Commit (green)**
42
+ - Stage all changed production files
43
+ - Commit with message (replace XXXX with the actual ticket number from the spec file): `FHR-XXXX: implement <task name> (green)`
44
+
45
+ 6. **Refactor**
46
+ - Remove duplication, clarify intent, simplify structure
47
+ - Do NOT change behaviour; no new logic, no new tests
48
+ - Do NOT modify test code
49
+ - Run all tests; they must remain green. In case of any failure, stop immediately and ask the user what to do next (rollback; make the test pass; ...)
50
+
51
+ 7. **Mark task done**
52
+ - In the spec file, check off `- [x] Production code` for the completed task
53
+
54
+ 8. **Commit (refactor)**
55
+ - Stage all changed production files and the updated spec file
56
+ - Commit with message (replace XXXX with the actual ticket number from the spec file): `FHR-XXXX: refactor <task name> (refactor)`
57
+ ## Constraints
58
+
59
+ - Do NOT modify test code
60
+ - Do NOT advance past the first incomplete task
61
+ - Write the minimum code needed to make tests pass
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: tdd-red
3
+ description: Write failing tests (red phase) for the next incomplete task in a spec file's Design and Implementation Plan — acceptance tests (JGiven BDD) and unit tests (JUnit Jupiter) — then mark the Acceptance tests and Unit tests sub-tasks done and commit. Use when user references a spec file and wants to write the failing tests before implementing a feature, or says "red phase", "write tests", or "tdd red".
4
+ arguments: spec-file
5
+ ---
6
+
7
+ # TDD Red
8
+
9
+ Writes the failing tests for the next incomplete task in the plan. Run after `/plan-spec`.
10
+
11
+ ## Quick start
12
+
13
+ ```
14
+ /tdd-red suggest-docs/src/main/docs/plans/FHR-XXXX-feature-name.md
15
+ ```
16
+
17
+ ## Workflow
18
+
19
+ 1. **Load context**
20
+ - Read the spec file passed as argument
21
+ - Read `glossary.md` from the project root for ubiquitous language
22
+ - Read `coding-guidelines.md` from the project root for test conventions
23
+
24
+ 2. **Find the next incomplete task**
25
+ - Scan the `## Design and Implementation Plan` section for the first task whose `- [ ] Acceptance tests` or `- [ ] Unit tests` checkbox is unchecked
26
+ - Work on that task only — do not advance to subsequent tasks
27
+
28
+ 3. **Write the tests**
29
+ - Write acceptance tests (JGiven BDD style) and unit tests (JUnit Jupiter) as described for that task in the plan
30
+ - Follow all conventions in `coding-guidelines.md`: EasyMock for mocking, stage classes named `Given*`/`When*`/`Then*`, test methods named as scenario descriptions
31
+ - Use only domain terms from `glossary.md`
32
+ - This is the **red phase**: write only tests, no production code
33
+
34
+ 4. **Run the tests**
35
+ - Run unit tests
36
+ - Run acceptance tests (JGiven)
37
+ - Confirm the suite is red (fails) before proceeding
38
+
39
+ 5. **Mark task done**
40
+ - In the spec file, check off `- [x] Acceptance tests` and `- [x] Unit tests` for the completed task
41
+
42
+ 6. **Commit**
43
+ - Stage all new test files and the updated spec file
44
+ - Commit with message (replace XXXX with the actual ticket number from the spec file): `FHR-XXXX: add failing tests for <task name> (red)`
45
+
46
+ ## Constraints
47
+
48
+ - Do NOT write any production code
49
+ - Do NOT advance past the first incomplete task
50
+ - Use only ubiquitous language from the glossary
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: tdd-workflow
3
+ description: Drive the full red-green-refactor TDD cycle across every task in a spec file's Design and Implementation Plan — picking the next incomplete task, then running the red, green, and refactor phases for it, then looping to the next task until the plan is complete. Use when user references a spec file and wants to implement the whole plan end to end, or says "run the tdd workflow", "implement the plan", or "tdd workflow".
4
+ arguments: spec-file
5
+ ---
6
+
7
+ # TDD Workflow
8
+
9
+ Automates the per-task red → green → refactor cycle for an entire plan by orchestrating the
10
+ `tdd-red` and `tdd-green` skills. Run after `/plan-spec`.
11
+
12
+ ## Quick start
13
+
14
+ ```
15
+ /tdd-workflow suggest-docs/src/main/docs/plans/FHR-XXXX-feature-name.md
16
+ ```
17
+
18
+ ## Workflow
19
+
20
+ 1. **Load context**
21
+ - Read the spec file passed as argument
22
+ - Locate the `## Design and Implementation Plan` section and its list of `### Task:` blocks
23
+
24
+ 2. **Pick the next task**
25
+ - Find the first `### Task:` whose checkboxes are not all checked
26
+ (`- [ ] Acceptance tests`, `- [ ] Unit tests`, `- [ ] Production code`)
27
+ - This task is the current task. If every task is fully checked, stop; the plan is complete
28
+
29
+ 3. **Red phase (if needed)**
30
+ - If `Acceptance tests` or `Unit tests` is unchecked for the current task, invoke `tdd-red` with the spec file
31
+ - Wait for it to finish before continuing
32
+
33
+ 4. **Green/Refactor phase (if needed)**
34
+ - If `Production code` is unchecked for the current task, invoke `tdd-green` with the spec file
35
+ - Wait for it to finish before continuing
36
+
37
+ 5. **Loop to the next task**
38
+ - Re-read the spec file and return to step 2
39
+ - Continue until no incomplete task remains
40
+
41
+ 6. **Report**
42
+ - Summarise which tasks were implemented and confirm the plan is fully checked off
43
+
44
+ ## Constraints
45
+
46
+ - Always run the phases in order (red before green/refactor) for a given task
47
+ - Do NOT start the next task until the current one is fully complete
48
+ - If a phase’s checkbox is already checked for the current task, treat that phase as already complete (do not re-run it)
49
+ - Let each sub-skill enforce its own rules (tests-only in red, minimal code + refactor in green); this skill only sequences them
50
+ - Each invoked sub-skill commits its own work; do not add extra commits between skill invocations
51
+ - Stop and surface the problem if any phase fails (e.g. tests will not pass) rather than advancing
@@ -0,0 +1,306 @@
1
+ # SNPD Team — SDLC Skills
2
+
3
+ A set of explicitly-invoked skills that walk a code change through the full
4
+ software-development lifecycle — from a Jira ticket to a draft pull request —
5
+ with a clean, auditable artifact at every step.
6
+
7
+ Each skill does **one** job, hands off a file, and **stops**. Nothing runs
8
+ automatically; every command must be explicitly invoked (`/jira-spec`,
9
+ `/draft-plan`, etc.). The human stays in control of every transition, and each
10
+ stage leaves a durable artifact the next stage reads.
11
+
12
+ ---
13
+
14
+ ## The Pipeline
15
+
16
+ ```
17
+ Jira ticket
18
+
19
+
20
+ ┌──────────────┐ writes .claude/artifacts/{KEY}_{slug}-spec.md
21
+ │ jira-spec │ ──────────▶ (verbatim ticket + AI repo context)
22
+ └──────────────┘
23
+
24
+
25
+ ┌──────────────┐ reads spec, discusses, writes on approval
26
+ │ draft-plan │ ──────────▶ .claude/artifacts/{KEY}_{slug}-plan.md
27
+ └──────────────┘ (high-level plan, no code)
28
+
29
+
30
+ ┌──────────────────┐ reads plan, branch + strict TDD, local commits
31
+ │ tdd-implement │ ─────▶ feature branch {KEY}-{slug}
32
+ └──────────────────┘ + appends Impl Details / Post-Mortem to plan
33
+
34
+
35
+ ┌──────────────────┐ 3 LLM models review the diff, vote on findings
36
+ │ council-review │ ─────▶ consensus-ranked review (in chat)
37
+ └──────────────────┘
38
+
39
+
40
+ ┌──────────────┐ pushes branch, opens DRAFT PR on GitHub
41
+ │ draft-pr │ ─────▶ draft pull request
42
+ └──────────────┘
43
+
44
+ ┌─────────────┐
45
+ │ docs-init │ (independent — runs on any repo at any time)
46
+ └─────────────┘
47
+ ```
48
+
49
+ The first five skills form a **linear pipeline** where each stage's output
50
+ becomes the next stage's input. `docs-init` is **independent** and can be run
51
+ on any repo to initialize or refresh project documentation.
52
+
53
+ ---
54
+
55
+ ## Skills
56
+
57
+ ### 1. `jira-spec` — Capture the ticket
58
+
59
+ | | |
60
+ |---|---|
61
+ | **Trigger** | `/jira-spec S4R-1234` or a Jira URL |
62
+ | **Reads** | Jira ticket (via Atlassian MCP, go-jira CLI, or curl) |
63
+ | **Produces** | `.claude/artifacts/{KEY}_{slug}-spec.md` |
64
+ | **Stops before** | Planning |
65
+
66
+ Fetches a Jira ticket and writes a development spec. The spec preserves the
67
+ original ticket description **verbatim** (for audit) and adds AI-gathered
68
+ repo context (touch points, patterns, test surface) from a **medium-depth**
69
+ repo scan. If Jira is unreachable, the skill refuses to proceed — it never
70
+ fabricates ticket content.
71
+
72
+ **Key rules:**
73
+ - Verbatim means verbatim — no paraphrasing the Jira description
74
+ - One spec file per ticket
75
+ - No invented metadata or acceptance criteria
76
+ - Does not start coding or planning
77
+
78
+ ---
79
+
80
+ ### 2. `draft-plan` — Decide the approach
81
+
82
+ | | |
83
+ |---|---|
84
+ | **Trigger** | `/draft-plan S4R-1234` or path to spec file |
85
+ | **Reads** | `…-spec.md` from `.claude/artifacts/` |
86
+ | **Produces** | `.claude/artifacts/{KEY}_{slug}-plan.md` |
87
+ | **Stops before** | Implementation |
88
+
89
+ Turns a spec into a discussed, approved, high-level implementation plan.
90
+ Performs a **deep** codebase review (deeper than jira-spec) — reads relevant
91
+ files end-to-end, traces data flow across layers, checks architecture and
92
+ conventions docs. Presents the plan in chat (Goal, Approach, Affected areas,
93
+ Sequencing, Test strategy, Risks, Out of scope) and **discusses it with the
94
+ user** before writing.
95
+
96
+ **Key rules:**
97
+ - High-level by default — no line numbers, no code snippets
98
+ - Every cited file path is verified to exist in the repo
99
+ - The plan must trace back to the spec's acceptance criteria
100
+ - Only writes the plan file on explicit user approval
101
+ - Never starts implementation
102
+
103
+ ---
104
+
105
+ ### 3. `tdd-implement` — Build with strict TDD
106
+
107
+ | | |
108
+ |---|---|
109
+ | **Trigger** | `/tdd-implement S4R-1234` or path to plan file |
110
+ | **Reads** | `…-plan.md` from `.claude/artifacts/` + `docs/conventions.md`, `docs/architecture.md` |
111
+ | **Produces** | Feature branch `{KEY}-{slug}` with squashed commit; plan file updated with Implementation Details + Post-Mortem |
112
+ | **Stops before** | Push / PR |
113
+
114
+ Implements an approved plan using strict, phase-bound TDD on a feature
115
+ branch. For each phase: writes failing tests → commits → implements until
116
+ green → commits. Supports resuming interrupted sessions. Runs the project's
117
+ full verification gate before declaring completion.
118
+
119
+ **Key rules:**
120
+ - Never assumes the default branch is `main` — detects dynamically
121
+ - Strict TDD per phase (never batch tests up-front)
122
+ - Every commit message starts with `{KEY}:`
123
+ - Discoveries classified as trivial/plan-affecting/spec-affecting with
124
+ appropriate handling
125
+ - Never pushes, never opens a PR
126
+ - Squash via `git reset --soft`, not interactive rebase
127
+
128
+ ---
129
+
130
+ ### 4. `council-review` — Multi-model review before the PR
131
+
132
+ | | |
133
+ |---|---|
134
+ | **Trigger** | `/council-review`, "council review my changes", "multi-model review" |
135
+ | **Reads** | The diff (local changes, staged, branch, last N commits, or a PR) + repo config/conventions |
136
+ | **Produces** | A single consensus-ranked review **in chat** (no file artifact) |
137
+ | **Stops before** | Pushing / opening a PR |
138
+
139
+ Runs a high-signal, consensus-driven code review by spawning **three
140
+ independent `code-review` sub-agents on different LLM models**
141
+ (`claude-opus-4.8`, `gpt-5.3-codex`, `gpt-5.5`) — inspired by
142
+ [Karpathy's LLM Council](https://github.com/karpathy/llm-council). All three
143
+ get the **identical** prompt and diff, then their findings are deduplicated,
144
+ scored by agreement (🟢 unanimous / 🟡 majority / 🔵 solo), and ranked by
145
+ agreement then severity. Different models catch different things, so requiring
146
+ consensus drops noise and raises signal.
147
+
148
+ This is the **quality gate between `tdd-implement` and `draft-pr`**: review the
149
+ implemented diff, address the findings, then open the draft PR with confidence.
150
+
151
+ **Key rules:**
152
+ - Identical prompts for all reviewers — fair comparison is the whole point
153
+ - No model bias — agreement count is the only ranking signal
154
+ - Always launches all 3 agents in parallel, never sequentially
155
+ - Always shows which models agreed on each finding (transparency)
156
+ - Never generates hallucinated replacement code during synthesis
157
+ - On severity disagreement, uses the highest severity any reviewer assigned
158
+
159
+ ---
160
+
161
+ ### 5. `draft-pr` — Open the draft PR
162
+
163
+ | | |
164
+ |---|---|
165
+ | **Trigger** | `/draft-pr` |
166
+ | **Reads** | Plan file (preferred), spec file (for AC), or commit history (fallback) |
167
+ | **Produces** | Draft pull request on GitHub |
168
+ | **Stops before** | Marking ready / assigning reviewers |
169
+
170
+ Pushes the current branch and opens a **draft** pull request on GitHub.
171
+ Resolves the PR template (`.github/PULL_REQUEST_TEMPLATE.md`), derives
172
+ content from the plan and spec files, shows a full preview for confirmation,
173
+ then pushes (fast-forward only) and creates the draft PR.
174
+
175
+ **Key rules:**
176
+ - Always `--draft` — never marks the PR ready
177
+ - Shows a full preview before any push or PR creation
178
+ - Leaves all template `- [ ]` checkboxes unchecked
179
+ - Never assigns reviewers, labels, or milestones
180
+ - Never force-pushes
181
+ - Never invents acceptance criteria or test results
182
+
183
+ ---
184
+
185
+ ### 6. `docs-init` — Initialize or refresh project docs
186
+
187
+ | | |
188
+ |---|---|
189
+ | **Trigger** | `/docs-init` or "update the docs", "refresh project documentation" |
190
+ | **Reads** | The entire repo (build files, source, CI, deploy configs, etc.) |
191
+ | **Produces** | `README.md`, `CLAUDE.md`, and `docs/` folder (architecture, local-setup, conventions, operations, decisions) |
192
+ | **Stops before** | Writing anything — presents an audit report first |
193
+
194
+ Initializes or refreshes the canonical documentation structure. Works in
195
+ two modes:
196
+
197
+ - **Init mode** — `docs/` is missing or incomplete. Drafts all seven
198
+ canonical files from a fresh repo scan.
199
+ - **Refresh mode** — `docs/` exists. Audits each file for outdated content,
200
+ drift, and new opportunities.
201
+
202
+ Includes a **verification checklist** — every command, config key, directory
203
+ description, and workflow trigger is confirmed against actual source files
204
+ before inclusion. Presents a human-readable audit report and applies changes
205
+ only after explicit user approval.
206
+
207
+ **Key rules:**
208
+ - Never writes files before user approval
209
+ - `decisions.md` is append-only
210
+ - Preserves `> **Scope:**` blocks on every edit
211
+ - Verifies every factual claim against source
212
+ - `CLAUDE.md` ≤ 40 lines, `README.md` ≤ 30 lines
213
+
214
+ ---
215
+
216
+ ## How the Skills Connect
217
+
218
+ ### Artifact Flow
219
+
220
+ ```
221
+ Jira Ticket
222
+
223
+ │ /jira-spec
224
+
225
+ {KEY}_{slug}-spec.md ◄── verbatim ticket + shallow repo context
226
+
227
+ │ /draft-plan
228
+
229
+ {KEY}_{slug}-plan.md ◄── approved high-level plan
230
+
231
+ │ /tdd-implement
232
+ ├──▶ feature branch ◄── squashed commit with code changes
233
+
234
+ {KEY}_{slug}-plan.md ◄── updated with Implementation Details + Post-Mortem
235
+
236
+ │ /council-review
237
+
238
+ Consensus review (in chat) ◄── 3 models vote; address findings before the PR
239
+
240
+ │ /draft-pr
241
+
242
+ Draft Pull Request ◄── body sourced from plan + spec
243
+ ```
244
+
245
+ All spec and plan artifacts live in `.claude/artifacts/` within the repo,
246
+ using a consistent naming convention: `{KEY}_{slug}-spec.md` →
247
+ `{KEY}_{slug}-plan.md`. The `-spec` and `-plan` suffixes are mandatory.
248
+
249
+ ### Separation of Concerns
250
+
251
+ | Boundary | Meaning |
252
+ |---|---|
253
+ | Spec ≠ Plan | The spec records *what the ticket asks*; the plan decides *how to build it* |
254
+ | Plan ≠ Code | The plan describes the approach at the level of files and phases — no code |
255
+ | Build ≠ Ship | Implementation produces a local branch only — no push, no PR |
256
+ | Code ≠ Review | The council reviews the diff and surfaces findings — it never edits code or ships |
257
+ | PR ≠ Merge | The PR is always a *draft* — marking ready is the human's call |
258
+
259
+ Each boundary is a **human checkpoint**. No skill silently rolls into the
260
+ next. Approval at one stage authorizes *only* that stage's output.
261
+
262
+ ### docs-init Integration
263
+
264
+ `docs-init` is not part of the linear pipeline but supports it:
265
+
266
+ - **draft-plan** reads `docs/architecture.md`, `docs/conventions.md`, and
267
+ `docs/decisions.md` during its deep codebase review.
268
+ - **tdd-implement** loads `docs/conventions.md` and `docs/architecture.md`
269
+ before writing any code, and references them for style and patterns.
270
+ - **tdd-implement** may suggest entries for `docs/decisions.md` in its
271
+ Post-Mortem section (but never writes them directly).
272
+
273
+ Running `/docs-init` on a repo before starting the pipeline ensures the
274
+ plan and implementation stages have reliable documentation to reference.
275
+
276
+ ---
277
+
278
+ ## Typical End-to-End Run
279
+
280
+ ```bash
281
+ /jira-spec S4R-10453 # → S4R-10453_mongo-cluster-routing-spec.md
282
+ /draft-plan S4R-10453 # discuss → approve → …-plan.md
283
+ /tdd-implement S4R-10453 # branch + TDD + squash; plan updated
284
+ /council-review # 3-model review of the diff; address findings
285
+ /draft-pr # confirm → draft PR on GitHub
286
+ ```
287
+
288
+ ---
289
+
290
+ ## Conventions Shared Across All Skills
291
+
292
+ - **Explicit invocation only.** None auto-trigger on keywords.
293
+ - **Artifacts live in the repo.** All specs and plans go to
294
+ `.claude/artifacts/`, never `~/.claude/`.
295
+ - **Each stage stops at a human checkpoint.** No skill silently continues
296
+ into the next.
297
+ - **No fabrication.** Ticket text, acceptance criteria, file paths, and test
298
+ results are verified or quoted — never invented.
299
+ - **Source control hygiene.** Commits start with the Jira key (`{KEY}: …`).
300
+
301
+ ---
302
+
303
+ ## Also in This Folder
304
+
305
+ - `../github/PULL_REQUEST_TEMPLATE.md` — the SNPD team's PR template,
306
+ used by `draft-pr` when resolving templates.