@groupby/ai-dev 0.5.10 → 0.5.11
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 +1 -1
- package/teams/fhr-neowise/commands/address-pr.md +120 -0
- package/teams/fhr-neowise/commands/ready-pr.md +70 -0
- package/teams/fhr-neowise/commands/review-pr.md +111 -0
- package/teams/fhr-neowise/commands/tdd-implementation.md +86 -0
- package/teams/fhr-neowise/commands/write-plan.md +23 -0
- package/teams/fhr-neowise/commands/write-pr.md +21 -0
- package/teams/fhr-neowise/commands/write-spec.md +25 -0
- package/teams/fhr-neowise/skills/agent-routing/SKILL.md +72 -0
- package/teams/fhr-neowise/skills/code-review/SKILL.md +83 -0
- package/teams/fhr-neowise/skills/code-review/review-template.md +90 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/SKILL.md +94 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/BEST_PRACTICES.md +96 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/architecture.md +434 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/block.md +753 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/c4.md +619 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/classDiagram.md +1186 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/config-configuration.md +72 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/config-directives.md +342 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/config-layouts.md +40 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/config-math.md +96 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/config-theming.md +246 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/config-tidy-tree.md +89 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/cynefin.md +279 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/entityRelationshipDiagram.md +670 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/eventmodeling.md +475 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/examples.md +301 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/flowchart.md +2116 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/gantt.md +725 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/gitgraph.md +2138 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/ishikawa.md +66 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/kanban.md +161 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/mindmap.md +335 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/packet.md +153 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/pie.md +93 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/quadrantChart.md +267 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/radar.md +269 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/railroad.md +337 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/requirementDiagram.md +495 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/sankey.md +415 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/sequenceDiagram.md +1195 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/stateDiagram.md +670 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/timeline.md +571 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/treeView.md +321 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/treemap.md +353 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/userJourney.md +42 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/venn.md +134 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/wardley.md +732 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/xyChart.md +312 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/references/zenuml.md +474 -0
- package/teams/fhr-neowise/skills/mermaid-diagram/scripts/sync_docs.py +138 -0
- package/teams/fhr-neowise/skills/pull-request-authoring/COMPLEX.template.md +52 -0
- package/teams/fhr-neowise/skills/pull-request-authoring/NON-CODE.template.md +15 -0
- package/teams/fhr-neowise/skills/pull-request-authoring/SIMPLE.template.md +20 -0
- package/teams/fhr-neowise/skills/pull-request-authoring/SKILL.md +102 -0
- package/teams/fhr-neowise/skills/spec-investigation/SKILL.md +139 -0
- package/teams/fhr-neowise/skills/spec-investigation/TEMPLATE.spec.md +74 -0
- package/teams/fhr-neowise/skills/tdd-workflow/SKILL.md +137 -0
- package/teams/fhr-neowise/skills/write-plan/SKILL.md +285 -0
- package/teams/fhr-neowise/skills/write-plan/assets/TEMPLATE.checklist.json +79 -0
- package/teams/fhr-neowise/skills/write-plan/assets/TEMPLATE.plan.md +158 -0
package/package.json
CHANGED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Fetch open review threads from the current branch's PR, evaluate each comment's validity, apply fixes for valid findings, and reply to invalid ones."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Address PR
|
|
6
|
+
|
|
7
|
+
Argument: `$ARGUMENTS` — optional. Pass `pr=<number>` to target a specific PR number; omit to auto-detect from the current branch.
|
|
8
|
+
|
|
9
|
+
Works through unresolved GitHub PR review threads: fixes valid ones in the code, and replies to invalid ones with a clear explanation.
|
|
10
|
+
|
|
11
|
+
## Step 1: Find the PR
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
gh pr view --json number,url,title,headRefName
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Extract the PR number and branch name. If no open PR exists, stop and report.
|
|
18
|
+
|
|
19
|
+
Get owner and repo:
|
|
20
|
+
```bash
|
|
21
|
+
gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Step 2: Fetch unresolved review threads
|
|
25
|
+
|
|
26
|
+
Use the GitHub GraphQL API to list all review threads and their resolved status:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
gh api graphql -f query='
|
|
30
|
+
query($owner: String!, $repo: String!, $number: Int!) {
|
|
31
|
+
repository(owner: $owner, name: $repo) {
|
|
32
|
+
pullRequest(number: $number) {
|
|
33
|
+
reviewThreads(first: 100) {
|
|
34
|
+
nodes {
|
|
35
|
+
id
|
|
36
|
+
isResolved
|
|
37
|
+
isOutdated
|
|
38
|
+
comments(first: 10) {
|
|
39
|
+
nodes {
|
|
40
|
+
id
|
|
41
|
+
databaseId
|
|
42
|
+
body
|
|
43
|
+
path
|
|
44
|
+
line
|
|
45
|
+
author { login }
|
|
46
|
+
createdAt
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
' -f owner=<OWNER> -f repo=<REPO> -F number=<PR_NUMBER>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Filter to threads where `isResolved` is `false`. Skip threads where `isOutdated` is `true` — outdated threads reference lines that have since changed and no longer block review.
|
|
58
|
+
|
|
59
|
+
If there are no unresolved threads, report "No open review threads" and stop.
|
|
60
|
+
|
|
61
|
+
## Step 3: Evaluate each unresolved thread
|
|
62
|
+
|
|
63
|
+
For each unresolved thread, read the full comment text. Load the referenced file at the path/line to understand the context.
|
|
64
|
+
|
|
65
|
+
Decide for each thread:
|
|
66
|
+
- **Valid** — the comment identifies a real problem or improvement that is technically correct and appropriate for this codebase.
|
|
67
|
+
- **Invalid** — the comment is based on a misunderstanding of the code, the suggested change would be incorrect, or the concern does not apply.
|
|
68
|
+
|
|
69
|
+
## Step 4: Apply fixes for valid findings
|
|
70
|
+
|
|
71
|
+
For each valid thread, apply the fix using the appropriate dev agent (follow the module→agent mapping in `.claude/rules/workflow.md`). Collect all code changes before committing.
|
|
72
|
+
|
|
73
|
+
After all fixes are applied, run tests for each affected module:
|
|
74
|
+
- Java/Groovy: `./gradlew :<module>:test`
|
|
75
|
+
- Scala: `./gradlew :<module>:test`
|
|
76
|
+
- Angular: `cd <module> && npm test`
|
|
77
|
+
- Python: `cd statistical-analysis && PYTHONPATH=main pytest test/ -v`
|
|
78
|
+
|
|
79
|
+
Run `./gradlew spotlessApply` if any Java or Groovy files were modified.
|
|
80
|
+
|
|
81
|
+
If tests fail, fix the failure before proceeding.
|
|
82
|
+
|
|
83
|
+
## Step 5: Commit and push (only if code changed)
|
|
84
|
+
|
|
85
|
+
Stage and commit all code changes:
|
|
86
|
+
```bash
|
|
87
|
+
git add <changed files>
|
|
88
|
+
git commit -m "FHR-<number>: address review feedback"
|
|
89
|
+
git push
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Confirm with the user before pushing.
|
|
93
|
+
|
|
94
|
+
## Step 6: Reply to all threads
|
|
95
|
+
|
|
96
|
+
For each **valid** thread that was fixed, post a reply confirming the change:
|
|
97
|
+
```bash
|
|
98
|
+
gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/comments \
|
|
99
|
+
--method POST \
|
|
100
|
+
--field body="Fixed — <one-sentence summary of the change made>." \
|
|
101
|
+
--field in_reply_to=<FIRST_COMMENT_DATABASE_ID>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
For each **invalid** thread, post a reply explaining why the current code is correct:
|
|
105
|
+
```bash
|
|
106
|
+
gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/comments \
|
|
107
|
+
--method POST \
|
|
108
|
+
--field body="<Clear, professional explanation of why no change is needed.>" \
|
|
109
|
+
--field in_reply_to=<FIRST_COMMENT_DATABASE_ID>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Use the `databaseId` of the first comment in each thread as `in_reply_to`.
|
|
113
|
+
|
|
114
|
+
## Step 7: Report
|
|
115
|
+
|
|
116
|
+
Summarise:
|
|
117
|
+
- How many threads were fixed (with code changes)
|
|
118
|
+
- How many threads received a reply (no code change)
|
|
119
|
+
- Any threads that could not be automatically resolved and need manual attention
|
|
120
|
+
- The commit SHA if code was pushed
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Check that all PR review threads are resolved, then promote the PR from draft to ready for review. Stops with a clear message if any unresolved threads remain."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Ready PR
|
|
6
|
+
|
|
7
|
+
Argument: `$ARGUMENTS` — optional. Pass `pr=<number>` to target a specific PR number; omit to auto-detect from the current branch.
|
|
8
|
+
|
|
9
|
+
Checks GitHub PR review threads via the GraphQL API. If all threads are resolved, marks the PR ready for review. If any are still open, stops and tells you what to do.
|
|
10
|
+
|
|
11
|
+
## Step 1: Find the PR
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
gh pr view --json number,url,title,isDraft,state
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
If no open PR exists, stop and report. Note whether it is currently a draft.
|
|
18
|
+
|
|
19
|
+
Get owner and repo:
|
|
20
|
+
```bash
|
|
21
|
+
gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Step 2: Check for unresolved review threads
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
gh api graphql -f query='
|
|
28
|
+
query($owner: String!, $repo: String!, $number: Int!) {
|
|
29
|
+
repository(owner: $owner, name: $repo) {
|
|
30
|
+
pullRequest(number: $number) {
|
|
31
|
+
reviewThreads(first: 100) {
|
|
32
|
+
nodes {
|
|
33
|
+
isResolved
|
|
34
|
+
isOutdated
|
|
35
|
+
comments(first: 1) {
|
|
36
|
+
nodes {
|
|
37
|
+
body
|
|
38
|
+
path
|
|
39
|
+
line
|
|
40
|
+
author { login }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
' -f owner=<OWNER> -f repo=<REPO> -F number=<PR_NUMBER>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Filter to threads where `isResolved` is `false` AND `isOutdated` is `false`. Outdated threads reference lines that have since changed — they do not block readiness.
|
|
52
|
+
|
|
53
|
+
## Step 3: If unresolved threads exist — STOP
|
|
54
|
+
|
|
55
|
+
Report and do nothing further:
|
|
56
|
+
|
|
57
|
+
> **Not ready:** N unresolved review thread(s) remain:
|
|
58
|
+
>
|
|
59
|
+
> - `path:line` — "comment text" (by @reviewer)
|
|
60
|
+
> - …
|
|
61
|
+
>
|
|
62
|
+
> Run `/address-pr` to fix or reply to each thread, or resolve them manually on GitHub, then run `/ready-pr` again.
|
|
63
|
+
|
|
64
|
+
## Step 4: If all threads are resolved — mark ready
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
gh pr ready <PR_NUMBER>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Report the PR URL and confirm it is now ready for review.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Review the current branch's GitHub PR: fetch its description and diff, compare against spec/plan if available, and submit a GitHub PR review with inline comments for every finding."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Review PR
|
|
6
|
+
|
|
7
|
+
Argument: `$ARGUMENTS` — optional. Pass `pr=<number>` to review a specific PR number; omit to auto-detect from the current branch.
|
|
8
|
+
|
|
9
|
+
Reviews the open GitHub PR for this branch by acting as a code reviewer. Output is a submitted GitHub PR review with inline comments — not a local file.
|
|
10
|
+
|
|
11
|
+
## Step 1: Find the PR
|
|
12
|
+
|
|
13
|
+
Locate the open PR for the current branch:
|
|
14
|
+
```bash
|
|
15
|
+
gh pr view --json number,url,title,state,body,headRefName,baseRefName
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Extract the PR number, title, description, and base branch. If no open PR exists, stop and ask the user to run `/write-pr` first.
|
|
19
|
+
|
|
20
|
+
Get the latest commit SHA (required for inline comment anchoring):
|
|
21
|
+
```bash
|
|
22
|
+
gh pr view <PR_NUMBER> --json commits --jq '.commits[-1].oid'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Step 2: Fetch the diff
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
gh pr diff <PR_NUMBER>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Also list changed files:
|
|
32
|
+
```bash
|
|
33
|
+
gh pr view <PR_NUMBER> --json files --jq '[.files[].path]'
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Step 3: Load spec and plan (if available)
|
|
37
|
+
|
|
38
|
+
Detect the ticket number from the branch name (pattern `FHR-\d+`).
|
|
39
|
+
|
|
40
|
+
Search for and read if they exist:
|
|
41
|
+
- `.sprints/*/<ticket>/SPEC.md` — focus on the objective, functional requirements, and acceptance criteria
|
|
42
|
+
- `.sprints/*/<ticket>/PLAN.md` — focus on the planned implementation steps
|
|
43
|
+
|
|
44
|
+
If neither exists, proceed without them and review code quality only.
|
|
45
|
+
|
|
46
|
+
## Step 4: Review the PR
|
|
47
|
+
|
|
48
|
+
Apply the **`code-review`** skill's quality gates and severity classifications (`.claude/skills/code-review/SKILL.md`) to the diff and PR description.
|
|
49
|
+
|
|
50
|
+
**What to check:**
|
|
51
|
+
|
|
52
|
+
1. **PR description accuracy** — does the body accurately describe what changed? Are diagrams present and correct for complex changes?
|
|
53
|
+
2. **Spec compliance** (if SPEC.md found) — does the implementation satisfy each acceptance criterion? Are there missing tests for any plan step?
|
|
54
|
+
3. **Code quality** across all eight quality gates:
|
|
55
|
+
- Correctness and edge cases (nulls, boundary values, empty inputs)
|
|
56
|
+
- Error handling and resilience (no swallowed exceptions)
|
|
57
|
+
- Security and input validation (no injection, no hardcoded secrets)
|
|
58
|
+
- Data handling and transaction safety (ACID guarantees, no duplicate writes)
|
|
59
|
+
- Test coverage (every new/changed conditional branch has a dedicated test)
|
|
60
|
+
- Readability, naming, complexity, duplication
|
|
61
|
+
- Architecture and boundary consistency (layers respected, dependencies flow correctly)
|
|
62
|
+
- Logging and observability (no secrets or PII in logs)
|
|
63
|
+
|
|
64
|
+
**For each finding, record:**
|
|
65
|
+
- `path` — relative file path in the repo
|
|
66
|
+
- `line` — absolute line number in the new version of the file
|
|
67
|
+
- `side` — always `"RIGHT"` for lines added or unchanged in this PR
|
|
68
|
+
- `severity` — `BLOCKER` | `MAJOR` | `MINOR` | `NIT`
|
|
69
|
+
- `body` — comment text prefixed with the severity tag, e.g. `BLOCKER: Missing null check. Add a guard before line 42.`
|
|
70
|
+
|
|
71
|
+
Only raise a finding if the evidence is clear from the diff. Do not speculate about code you cannot see.
|
|
72
|
+
|
|
73
|
+
## Step 5: Submit the GitHub PR review
|
|
74
|
+
|
|
75
|
+
Get the repository owner and name:
|
|
76
|
+
```bash
|
|
77
|
+
gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"'
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Build the `comments` JSON array from your findings. Submit the full review in a single API call:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/reviews \
|
|
84
|
+
--method POST \
|
|
85
|
+
--field commit_id=<LATEST_COMMIT_SHA> \
|
|
86
|
+
--field body="Review: <N> finding(s) — <X> blocker(s), <Y> major, <Z> minor, <W> nit(s)." \
|
|
87
|
+
--field event="REQUEST_CHANGES" \
|
|
88
|
+
--raw-field comments='[
|
|
89
|
+
{"path":"src/Foo.java","line":42,"side":"RIGHT","body":"BLOCKER: …"},
|
|
90
|
+
{"path":"src/Bar.java","line":17,"side":"RIGHT","body":"MINOR: …"}
|
|
91
|
+
]'
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If a finding cannot be anchored to a specific file line (e.g. a description-level issue), include it in the `body` field of the review instead of as an inline comment.
|
|
95
|
+
|
|
96
|
+
If there are **no findings**, submit an approval:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/reviews \
|
|
100
|
+
--method POST \
|
|
101
|
+
--field body="LGTM — all quality gates pass." \
|
|
102
|
+
--field event="APPROVE"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Step 6: Report
|
|
106
|
+
|
|
107
|
+
Output:
|
|
108
|
+
- PR URL
|
|
109
|
+
- Review decision (`REQUEST_CHANGES` or `APPROVE`)
|
|
110
|
+
- Finding counts by severity
|
|
111
|
+
- Any findings included in the review body rather than as inline comments
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Implement a specification section by section using double-loop TDD. Orchestrates the tdd-workflow, agent-routing, and integration-boundaries skills."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# TDD Implementation
|
|
6
|
+
|
|
7
|
+
Argument: `$ARGUMENTS` — `ticket=<folder-path>` (e.g. `ticket=.sprints/26-21/FHR-7106`).
|
|
8
|
+
|
|
9
|
+
Parse the `ticket=` value. If missing, stop and ask the user to supply one.
|
|
10
|
+
|
|
11
|
+
## Step 1: Validate the Spec
|
|
12
|
+
|
|
13
|
+
Read `SPEC.md` from the ticket folder. Verify:
|
|
14
|
+
- [ ] Folder exists and contains `SPEC.md`
|
|
15
|
+
- [ ] Section 1 (Objective) has a concrete goal — not placeholder text
|
|
16
|
+
- [ ] Section 2 (Out of Scope) is filled in
|
|
17
|
+
- [ ] Section 3 (Context) lists specific file paths
|
|
18
|
+
- [ ] Section 4 (Functional Requirements) has at least one given/when/then requirement
|
|
19
|
+
- [ ] Section 6 (Assumptions & Open Questions) has no unresolved questions
|
|
20
|
+
- [ ] Section 7 (Acceptance Criteria) has at least one checkable criterion
|
|
21
|
+
- [ ] Target module is identified in the spec header
|
|
22
|
+
|
|
23
|
+
If any item fails, stop and report it before proceeding.
|
|
24
|
+
|
|
25
|
+
Extract the `Ticket` field (e.g. `FHR-7106`) — use only the primary ticket ID. Store it as `<TICKET>` for all commit messages.
|
|
26
|
+
|
|
27
|
+
## Step 2: Detect Language and Agents
|
|
28
|
+
|
|
29
|
+
**Apply the `agent-routing` skill** (`.claude/skills/agent-routing/SKILL.md`) — map the spec's `Module` field to the correct dev agent and test writer agent.
|
|
30
|
+
|
|
31
|
+
## Step 3: Parse the Plan and Build Todo List
|
|
32
|
+
|
|
33
|
+
Read `PLAN.md`. Using the routing rules from the `agent-routing` skill, classify each section as outer loop (integration boundary) or inner loop (unit work).
|
|
34
|
+
|
|
35
|
+
**Resume detection:** read `CHECKLIST.json` and identify steps with `"completed": true`. If any, display a resume notice (with log summaries from `PLAN.log.md`) and wait for confirmation before continuing.
|
|
36
|
+
|
|
37
|
+
Create todo items in double-loop order:
|
|
38
|
+
1. `[Outer RED] <section>` for each incomplete outer loop section
|
|
39
|
+
2. Inner loop sections in plan order
|
|
40
|
+
3. `[Outer GREEN] <section>` for each incomplete outer loop section
|
|
41
|
+
4. `Final Validation`
|
|
42
|
+
|
|
43
|
+
Display the full list and wait for user confirmation before starting.
|
|
44
|
+
|
|
45
|
+
## Step 4: Execute — Double-Loop TDD
|
|
46
|
+
|
|
47
|
+
**Apply the `tdd-workflow` skill** (`.claude/skills/tdd-workflow/SKILL.md`) throughout execution.
|
|
48
|
+
|
|
49
|
+
### Phase A — Outer RED
|
|
50
|
+
|
|
51
|
+
For each `[Outer RED]` item: confirm Docker is running, then invoke the tester agent (via Agent tool with correct `subagent_type`). Run the scoped integration test and confirm it **fails** for the right reason (assertion failure, not compile error).
|
|
52
|
+
|
|
53
|
+
If Docker unavailable: mark as skipped, log it, block the matching `[Outer GREEN]`, continue to Phase B.
|
|
54
|
+
|
|
55
|
+
### Phase B — Inner Loop (per section)
|
|
56
|
+
|
|
57
|
+
**Apply `superpowers:dispatching-parallel-agents`** when a section has independent tester + dev invocations that can run concurrently. Send both in a single message.
|
|
58
|
+
|
|
59
|
+
**B-i Write failing unit tests:** invoke the tester agent → run unit tests → confirm **fails**.
|
|
60
|
+
|
|
61
|
+
**B-ii Implement:** invoke the dev agent with the failing test output → run full unit test suite → **invoke `superpowers:verification-before-completion`** before claiming GREEN (run the test command fresh and show the output as evidence; never assert "all pass" without fresh output in the same message) → confirm **all pass, no regressions**. On persistent failure: attempt twice, then stop and report.
|
|
62
|
+
|
|
63
|
+
**B-iii Validate and record:**
|
|
64
|
+
- Confirm no TODO/FIXME/placeholder remains
|
|
65
|
+
- Mark CHECKLIST.json step `"completed": true` (run `node checklist.mjs --complete-step <step-id>` or Edit the JSON directly)
|
|
66
|
+
- Append entry to `PLAN.log.md`
|
|
67
|
+
- Ask user to review and commit: `<TICKET>: implement step <N> — <step title>`
|
|
68
|
+
- Ask whether to push
|
|
69
|
+
|
|
70
|
+
### Phase C — Outer GREEN
|
|
71
|
+
|
|
72
|
+
Run the full integration test suite. **Invoke `superpowers:verification-before-completion`** before declaring outer loop GREEN — fresh integration test output is required as evidence. Confirm all outer loop tests pass, no regressions. On persistent failure: attempt twice with dev agent, then stop and report.
|
|
73
|
+
|
|
74
|
+
Mark CHECKLIST.json step `"completed": true`, log it, commit: `<TICKET>: <feature title> — outer loop green`.
|
|
75
|
+
|
|
76
|
+
## Step 5: Final Validation
|
|
77
|
+
|
|
78
|
+
1. Run the full test suite for the module. **Invoke `superpowers:verification-before-completion`** before reporting the outcome — show fresh command output as evidence.
|
|
79
|
+
2. Check spec Sections 4 and 7 for any requirement or criterion with no corresponding test.
|
|
80
|
+
3. Fill gaps: invoke tester then dev agent.
|
|
81
|
+
4. Fix any regressions with the dev agent.
|
|
82
|
+
5. Mark all Final Validation items `"completed": true` in CHECKLIST.json.
|
|
83
|
+
6. Log, commit: `<TICKET>: complete TDD implementation — all sections validated`.
|
|
84
|
+
7. Report: sections completed, tests added, any open blockers.
|
|
85
|
+
8. **Apply `superpowers:requesting-code-review`** to verify the implementation is ready to merge.
|
|
86
|
+
9. Prompt: "Would you like to add integration tests for the boundaries this feature touches? Run: `/integration-tests ticket=<folder-path>`"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Read a completed SPEC.md and produce PLAN.md and CHECKLIST.json. Triggers the write-plan skill."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Write Plan
|
|
6
|
+
|
|
7
|
+
Argument: `$ARGUMENTS` — path to a `SPEC.md` file (e.g. `.sprints/26-21/FHR-7106/SPEC.md`).
|
|
8
|
+
|
|
9
|
+
If no spec path is provided, ask for it immediately. Do not search the workspace for spec files.
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
|
|
13
|
+
1. **Read the spec** — confirm the file exists and has no unresolved open questions that would change the plan structure. If open questions remain, stop and ask the user to resolve them first.
|
|
14
|
+
|
|
15
|
+
2. **Apply the `write-plan` skill** — follow the full planning process defined in `.claude/skills/write-plan/SKILL.md`.
|
|
16
|
+
|
|
17
|
+
3. **Write the files** — save `PLAN.md`, `CHECKLIST.json`, and `checklist.mjs` next to the `SPEC.md` in the same directory.
|
|
18
|
+
|
|
19
|
+
4. **Request approval** — ask the user to approve the generated files or request corrections before committing (handled by the skill's Step 9).
|
|
20
|
+
|
|
21
|
+
5. **Offer to commit** — after approval, ask the user whether to commit the generated files or skip.
|
|
22
|
+
- If confirmed: stage only `PLAN.md`, `CHECKLIST.json`, and `checklist.mjs` and commit with message `<ticket-number>: add PLAN.md, CHECKLIST.json, and checklist.mjs for <feature>`.
|
|
23
|
+
- Only push if the user explicitly requests it.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Classify the current branch's changes, render the matching PR template (with Mermaid diagrams for complex changes), and create a draft GitHub PR titled FHR-XXXX: <Ticket Title>. Triggers the pull-request-authoring skill."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Write PR
|
|
6
|
+
|
|
7
|
+
Argument: `$ARGUMENTS` — optional. Pass `type=complex|simple|non-code` to force a PR type, or leave empty to auto-detect. Any other text is treated as extra context for the description.
|
|
8
|
+
|
|
9
|
+
Run this on the branch you want to open (or update) a PR for. PRs are always created as **drafts** — use `/ready-pr` once review is complete to promote them.
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
|
|
13
|
+
1. **Apply the `pull-request-authoring` skill** — follow the full process in `.claude/skills/pull-request-authoring/SKILL.md`, using the templates in that folder.
|
|
14
|
+
|
|
15
|
+
2. **Classify and render** — detect the change type (complex / simple / non-code) from the diff vs `master`, confirm it with the user, then render the matching template. For complex PRs, generate the Mermaid diagram(s) via the `mermaid-diagram` skill.
|
|
16
|
+
|
|
17
|
+
3. **Title** — set the PR title to `FHR-<number>: <Ticket Title>`, using the exact Jira summary for the branch's ticket. If Jira is unavailable, confirm a branch-derived title with the user.
|
|
18
|
+
|
|
19
|
+
4. **Approve before publishing** — present the title and body and wait for explicit approval. Support correction cycles.
|
|
20
|
+
|
|
21
|
+
5. **Save and publish** — save `PR.md` next to the ticket's spec/plan, push the branch (only with confirmation), then `gh pr create --draft` (or `gh pr edit` if a PR already exists). Report the PR URL.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Investigate a feature or Jira ticket and produce a complete SPEC.md. Triggers the spec-investigation skill."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Write Spec
|
|
6
|
+
|
|
7
|
+
Argument: `$ARGUMENTS` — feature description or Jira ticket key (e.g. `FHR-7106`).
|
|
8
|
+
|
|
9
|
+
If the argument is missing or too vague to identify the affected area, ask the user for clarification before doing anything else.
|
|
10
|
+
|
|
11
|
+
## Explore First
|
|
12
|
+
|
|
13
|
+
If the argument is a **feature description** — not a Jira ticket key (pattern: `[A-Z]+-\d+`, e.g. `FHR-7106`) — **invoke `superpowers:brainstorming`** before starting the investigation. Brainstorming explores intent, surfaces unknowns, and confirms scope through collaborative dialogue. Proceed to the Workflow below only after the brainstorming design is approved by the user.
|
|
14
|
+
|
|
15
|
+
If a Jira ticket key is provided, skip brainstorming — the spec-investigation skill's Step 1 ticket clarity check handles collaborative dialogue directly.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. **Apply the `spec-investigation` skill** — follow the full investigation process defined in `.claude/skills/spec-investigation/SKILL.md`. Use the template at `.claude/skills/spec-investigation/TEMPLATE.spec.md`.
|
|
20
|
+
|
|
21
|
+
2. **Write the file** — save the completed spec to `.sprints/<sprint-name>/<ticket-number>/SPEC.md`.
|
|
22
|
+
|
|
23
|
+
3. **Offer to commit** — ask the user whether to commit the generated files or skip.
|
|
24
|
+
- If confirmed: stage only the generated spec files and commit with message `<ticket-number>: add SPEC.md for <feature>`.
|
|
25
|
+
- Only push if the user explicitly requests it.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-routing
|
|
3
|
+
description: "Apply when delegating implementation or testing work to a specialist agent: determines which dev agent and test writer agent to invoke based on the module name and the type of code being written (service layer vs. infrastructure/boundary layer)."
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill: Agent Routing
|
|
8
|
+
|
|
9
|
+
## When This Applies
|
|
10
|
+
|
|
11
|
+
Apply this skill whenever Claude needs to delegate work to a specialist dev or test agent — during TDD implementation, integration test writing, or code review orchestration.
|
|
12
|
+
|
|
13
|
+
## Module → Language → Agent Mapping
|
|
14
|
+
|
|
15
|
+
| Module | Language | Dev Agent | Test Writer Agent | Reviewer Agent |
|
|
16
|
+
|---|---|---|---|---|
|
|
17
|
+
| `insights-dashboard`, `insights-admin-console` | Angular/TypeScript | `Angular Dev` | `Angular Test Writer` | `Angular Code Reviewer` |
|
|
18
|
+
| `configuration-service`, `scheduler-application`, `scheduler-api`, `provisioner-service`, `activity-api-v2`, `activity-enrichments-api`, `reporting-api-v2`, `reporting-product-information`, `reports-summary`, `configuration-common-client`, `sql-writer`, `fas-data-model` | Java | `Java Dev` | `Java Test Writer` | `Java Code Reviewer` |
|
|
19
|
+
| `report-calculation-v3`, `reporting-fas-data`, `reporting-maintenance`, `reporting-cru-history` | Scala | `Scala Dev` | `Scala Test Writer` | `Scala Code Reviewer` |
|
|
20
|
+
| `statistical-analysis` | Python | `Python Dev` | `Python Test Writer` | `Python Code Reviewer` |
|
|
21
|
+
|
|
22
|
+
If the module is not in any list, stop and ask the developer to confirm the language before proceeding.
|
|
23
|
+
|
|
24
|
+
**Cross-module features** (changes spanning more than one module): use `Senior Dev` to orchestrate. Senior Dev delegates to the per-module agents per the table above. Do not attempt cross-module implementation with a single language-specific agent.
|
|
25
|
+
|
|
26
|
+
**Note on mixed-language Spark job modules** (`report-calculation-v3`, `reporting-fas-data`, `reporting-maintenance`, `reporting-cru-history`): these have a Java Spring Boot entry point and Scala Spark logic. Route ALL logic — including entry point wiring — to `Scala Dev`. The Java entry point follows a fixed convention that Scala Dev understands.
|
|
27
|
+
|
|
28
|
+
## Tester Routing Rules
|
|
29
|
+
|
|
30
|
+
Use the **section title and description keywords** to determine how many test passes are needed.
|
|
31
|
+
|
|
32
|
+
### Java
|
|
33
|
+
|
|
34
|
+
| Keywords in section | Agent | Passes |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| service, transformer, calculator, validator, handler, processor, mapper, converter, domain, utility, helper, factory, builder | `Java Test Writer` | Unit tests only |
|
|
37
|
+
| controller, endpoint, REST, HTTP, repository, database, JPA, Firehose, Kinesis, S3, outbound, `@RestController`, `@Repository` | `Java Test Writer` | Unit tests first → then integration tests |
|
|
38
|
+
| Ambiguous | `Java Test Writer` | Unit tests only + note assumption |
|
|
39
|
+
|
|
40
|
+
### Scala
|
|
41
|
+
|
|
42
|
+
| Keywords in section | Agent | Passes |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| transformation, case class, schema, column, filter, aggregation, DataFrame, Dataset, Window, join, map, flatMap, UDF, enrichment, linking, attribution | `Scala Test Writer` | Unit tests only |
|
|
45
|
+
| full pipeline, job, Delta Lake, Delta table, S3, read, write, end-to-end, runner, orchestration, sink, source | `Scala Test Writer` | Unit tests first → then integration tests |
|
|
46
|
+
| Ambiguous | `Scala Test Writer` | Unit tests only + note assumption |
|
|
47
|
+
|
|
48
|
+
### Python
|
|
49
|
+
|
|
50
|
+
| Keywords in section | Agent | Passes |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| statistical analysis, calculation, A/B test, metric, transformation, DataFrame, PySpark, UDF, aggregation, significance, p-value | `Python Test Writer` | Unit tests only |
|
|
53
|
+
| database, PostgreSQL, query, SQL, connection, GraphQL, client, psycopg, testcontainers, external | `Python Test Writer` | Unit tests first → then integration tests |
|
|
54
|
+
| Ambiguous | `Python Test Writer` | Unit tests only + note assumption |
|
|
55
|
+
|
|
56
|
+
### Angular
|
|
57
|
+
|
|
58
|
+
Always invoke `Angular Test Writer` — single pass, no integration split.
|
|
59
|
+
|
|
60
|
+
## What to Pass to Each Agent
|
|
61
|
+
|
|
62
|
+
When invoking a tester agent, always provide:
|
|
63
|
+
- Section title and full description from the plan
|
|
64
|
+
- Path to the ticket folder
|
|
65
|
+
- Relevant requirements from spec Section 4 and acceptance criteria from spec Section 7 that this section addresses
|
|
66
|
+
- Paths of any existing test files in the module (for convention context)
|
|
67
|
+
|
|
68
|
+
When invoking a dev agent, always provide:
|
|
69
|
+
- The exact failing test output from the tester
|
|
70
|
+
- Section title and full description from the plan
|
|
71
|
+
- Path to the ticket folder
|
|
72
|
+
- The tester's output summary (which test files were written and what each asserts)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: "Apply when reviewing code for spec compliance, plan compliance, and general quality: classifying findings by severity, building the requirement checklist, and writing a structured review.md using the review template."
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill: Code Review
|
|
8
|
+
|
|
9
|
+
## When This Applies
|
|
10
|
+
|
|
11
|
+
Apply this skill whenever performing a structured code review — whether triggered by `/review-pr`, by a Senior Code Reviewer agent, or when Claude is asked to audit code quality against a spec or plan.
|
|
12
|
+
|
|
13
|
+
## Review Template
|
|
14
|
+
|
|
15
|
+
The review template is at `review-template.md` in this skill folder. Read it before writing any review file.
|
|
16
|
+
|
|
17
|
+
## Requirement Checklist
|
|
18
|
+
|
|
19
|
+
Build a checklist table with these ID prefixes:
|
|
20
|
+
- `S-<n>` for spec requirements (from SPEC.md Section 4)
|
|
21
|
+
- `A-<n>` for acceptance criteria (from SPEC.md Section 7)
|
|
22
|
+
- `P-<n>` for plan steps (from PLAN.md, if available)
|
|
23
|
+
|
|
24
|
+
For each item, determine status:
|
|
25
|
+
- `PASS`: clearly implemented and verifiable
|
|
26
|
+
- `PARTIAL`: implemented but incomplete or ambiguous
|
|
27
|
+
- `FAIL`: missing, incorrect, or regressed
|
|
28
|
+
- `N/A`: not applicable to changed scope
|
|
29
|
+
|
|
30
|
+
## Quality Gates
|
|
31
|
+
|
|
32
|
+
Evaluate changed code against all eight gates:
|
|
33
|
+
|
|
34
|
+
1. **Correctness and edge cases** — logic handles nulls, empty inputs, and boundary values
|
|
35
|
+
2. **Error handling and resilience** — every try/catch handled explicitly; no swallowed exceptions
|
|
36
|
+
3. **Security and input validation** — no SQL injection, XSS, hardcoded secrets, or unvalidated input
|
|
37
|
+
4. **Data handling and transaction safety** — ACID guarantees, no duplicate writes
|
|
38
|
+
5. **Test coverage** — every new/changed conditional branch has a dedicated test
|
|
39
|
+
6. **Readability, naming, complexity, duplication**
|
|
40
|
+
7. **Architecture and boundary consistency** — layers respected, dependencies flow correctly
|
|
41
|
+
8. **Logging and observability** — no secrets or PII in logs
|
|
42
|
+
|
|
43
|
+
## Severity Classification
|
|
44
|
+
|
|
45
|
+
| Severity | Meaning |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `BLOCKER` | Must fix before merge: security flaw, data loss risk, missing required test, spec gap |
|
|
48
|
+
| `MAJOR` | Should fix before merge |
|
|
49
|
+
| `MINOR` | Lower-impact; still must be fixed before approval |
|
|
50
|
+
| `NIT` | Style/naming; still must be fixed before approval |
|
|
51
|
+
|
|
52
|
+
**All severities are blocking in this workflow.** A single NIT is sufficient to produce `REQUEST_CHANGES`.
|
|
53
|
+
|
|
54
|
+
## Decision Rules
|
|
55
|
+
|
|
56
|
+
- If implementation conflicts with spec, **spec wins** unless the reviewer explicitly confirms a spec change.
|
|
57
|
+
- If implementation matches spec but diverges from plan, flag as `PLAN DEVIATION` and request either plan update or code correction.
|
|
58
|
+
|
|
59
|
+
## Finding Format
|
|
60
|
+
|
|
61
|
+
Every finding must include:
|
|
62
|
+
- Short title
|
|
63
|
+
- Severity (`BLOCKER` | `MAJOR` | `MINOR` | `NIT`)
|
|
64
|
+
- Type (`SPEC_GAP` | `PLAN_DEVIATION` | `BUG` | `SECURITY` | `TEST_GAP` | `DESIGN` | `OTHER`)
|
|
65
|
+
- Affected files with line references in `path:line` format
|
|
66
|
+
- Evidence (what was observed, with line-level refs)
|
|
67
|
+
- Requested change (exact, actionable)
|
|
68
|
+
- Acceptance check (objective verification condition)
|
|
69
|
+
|
|
70
|
+
## Review Decision
|
|
71
|
+
|
|
72
|
+
Set one of:
|
|
73
|
+
- `APPROVE`: no findings at any severity
|
|
74
|
+
- `REQUEST_CHANGES`: at least one finding at any severity
|
|
75
|
+
- `COMMENT`: informational review with no blocking request
|
|
76
|
+
|
|
77
|
+
## Completion Checks
|
|
78
|
+
|
|
79
|
+
Before finalising the review file, verify:
|
|
80
|
+
- [ ] All findings are written with concrete requested changes and acceptance checks
|
|
81
|
+
- [ ] Every requirement checklist item is marked (PASS/PARTIAL/FAIL/N/A)
|
|
82
|
+
- [ ] No finding is missing line-level file evidence
|
|
83
|
+
- [ ] The summary decision matches the findings (any finding → `REQUEST_CHANGES`)
|