@fro.bot/systematic 2.2.1 → 2.3.0
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/agents/document-review/adversarial-document-reviewer.md +87 -0
- package/agents/review/adversarial-reviewer.md +107 -0
- package/agents/review/cli-agent-readiness-reviewer.md +443 -0
- package/agents/review/cli-readiness-reviewer.md +69 -0
- package/agents/review/previous-comments-reviewer.md +64 -0
- package/agents/review/project-standards-reviewer.md +80 -0
- package/package.json +1 -1
- package/skills/claude-permissions-optimizer/scripts/extract-commands.mjs +2 -2
- package/skills/claude-permissions-optimizer/scripts/normalize.mjs +8 -8
- package/skills/git-clean-gone-branches/SKILL.md +63 -0
- package/skills/git-clean-gone-branches/scripts/clean-gone +48 -0
- package/skills/git-commit/SKILL.md +103 -0
- package/skills/git-commit-push-pr/SKILL.md +419 -0
- package/skills/onboarding/SKILL.md +407 -0
- package/skills/onboarding/scripts/inventory.mjs +1043 -0
- package/skills/resolve-pr-feedback/SKILL.md +374 -0
- package/skills/resolve-pr-feedback/scripts/get-pr-comments +104 -0
- package/skills/resolve-pr-feedback/scripts/get-thread-for-comment +58 -0
- package/skills/resolve-pr-feedback/scripts/reply-to-pr-thread +33 -0
- package/skills/{resolve-pr-parallel → resolve-pr-feedback}/scripts/resolve-pr-thread +0 -0
- package/skills/todo-create/SKILL.md +109 -0
- package/skills/todo-resolve/SKILL.md +68 -0
- package/skills/todo-triage/SKILL.md +70 -0
- package/skills/ce-review-beta/SKILL.md +0 -506
- package/skills/ce-review-beta/references/diff-scope.md +0 -31
- package/skills/ce-review-beta/references/findings-schema.json +0 -128
- package/skills/ce-review-beta/references/persona-catalog.md +0 -50
- package/skills/ce-review-beta/references/review-output-template.md +0 -115
- package/skills/ce-review-beta/references/subagent-template.md +0 -56
- package/skills/file-todos/SKILL.md +0 -231
- package/skills/resolve-pr-parallel/SKILL.md +0 -96
- package/skills/resolve-pr-parallel/scripts/get-pr-comments +0 -68
- package/skills/resolve-todo-parallel/SKILL.md +0 -68
- package/skills/triage/SKILL.md +0 -312
- package/skills/workflows-brainstorm/SKILL.md +0 -11
- package/skills/workflows-compound/SKILL.md +0 -10
- package/skills/workflows-plan/SKILL.md +0 -10
- package/skills/workflows-review/SKILL.md +0 -10
- package/skills/workflows-work/SKILL.md +0 -10
- /package/skills/{file-todos → todo-create}/assets/todo-template.md +0 -0
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Diff Scope Rules
|
|
2
|
-
|
|
3
|
-
These rules apply to every reviewer. They define what is "your code to review" versus pre-existing context.
|
|
4
|
-
|
|
5
|
-
## Scope Discovery
|
|
6
|
-
|
|
7
|
-
Determine the diff to review using this priority order:
|
|
8
|
-
|
|
9
|
-
1. **User-specified scope.** If the caller passed `BASE:`, `FILES:`, or `DIFF:` markers, use that scope exactly.
|
|
10
|
-
2. **Working copy changes.** If there are unstaged or staged changes (`git diff HEAD` is non-empty), review those.
|
|
11
|
-
3. **Unpushed commits vs base branch.** If the working copy is clean, review `git diff $(git merge-base HEAD <base>)..HEAD` where `<base>` is the default branch (main or master).
|
|
12
|
-
|
|
13
|
-
The scope step in the SKILL.md handles discovery and passes you the resolved diff. You do not need to run git commands yourself.
|
|
14
|
-
|
|
15
|
-
## Finding Classification Tiers
|
|
16
|
-
|
|
17
|
-
Every finding you report falls into one of three tiers based on its relationship to the diff:
|
|
18
|
-
|
|
19
|
-
### Primary (directly changed code)
|
|
20
|
-
|
|
21
|
-
Lines added or modified in the diff. This is your main focus. Report findings against these lines at full confidence.
|
|
22
|
-
|
|
23
|
-
### Secondary (immediately surrounding code)
|
|
24
|
-
|
|
25
|
-
Unchanged code within the same function, method, or block as a changed line. If a change introduces a bug that's only visible by reading the surrounding context, report it -- but note that the issue exists in the interaction between new and existing code.
|
|
26
|
-
|
|
27
|
-
### Pre-existing (unrelated to this diff)
|
|
28
|
-
|
|
29
|
-
Issues in unchanged code that the diff didn't touch and doesn't interact with. Mark these as `"pre_existing": true` in your output. They're reported separately and don't count toward the review verdict.
|
|
30
|
-
|
|
31
|
-
**The rule:** If you'd flag the same issue on an identical diff that didn't include the surrounding file, it's pre-existing. If the diff makes the issue *newly relevant* (e.g., a new caller hits an existing buggy function), it's secondary.
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Code Review Findings",
|
|
4
|
-
"description": "Structured output schema for code review sub-agents",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": ["reviewer", "findings", "residual_risks", "testing_gaps"],
|
|
7
|
-
"properties": {
|
|
8
|
-
"reviewer": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"description": "Persona name that produced this output (e.g., 'correctness', 'security')"
|
|
11
|
-
},
|
|
12
|
-
"findings": {
|
|
13
|
-
"type": "array",
|
|
14
|
-
"description": "List of code review findings. Empty array if no issues found.",
|
|
15
|
-
"items": {
|
|
16
|
-
"type": "object",
|
|
17
|
-
"required": [
|
|
18
|
-
"title",
|
|
19
|
-
"severity",
|
|
20
|
-
"file",
|
|
21
|
-
"line",
|
|
22
|
-
"why_it_matters",
|
|
23
|
-
"autofix_class",
|
|
24
|
-
"owner",
|
|
25
|
-
"requires_verification",
|
|
26
|
-
"confidence",
|
|
27
|
-
"evidence",
|
|
28
|
-
"pre_existing"
|
|
29
|
-
],
|
|
30
|
-
"properties": {
|
|
31
|
-
"title": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"description": "Short, specific issue title. 10 words or fewer.",
|
|
34
|
-
"maxLength": 100
|
|
35
|
-
},
|
|
36
|
-
"severity": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"enum": ["P0", "P1", "P2", "P3"],
|
|
39
|
-
"description": "Issue severity level"
|
|
40
|
-
},
|
|
41
|
-
"file": {
|
|
42
|
-
"type": "string",
|
|
43
|
-
"description": "Relative file path from repository root"
|
|
44
|
-
},
|
|
45
|
-
"line": {
|
|
46
|
-
"type": "integer",
|
|
47
|
-
"description": "Primary line number of the issue",
|
|
48
|
-
"minimum": 1
|
|
49
|
-
},
|
|
50
|
-
"why_it_matters": {
|
|
51
|
-
"type": "string",
|
|
52
|
-
"description": "Impact and failure mode -- not 'what is wrong' but 'what breaks'"
|
|
53
|
-
},
|
|
54
|
-
"autofix_class": {
|
|
55
|
-
"type": "string",
|
|
56
|
-
"enum": ["safe_auto", "gated_auto", "manual", "advisory"],
|
|
57
|
-
"description": "Reviewer's conservative recommendation for how this issue should be handled after synthesis"
|
|
58
|
-
},
|
|
59
|
-
"owner": {
|
|
60
|
-
"type": "string",
|
|
61
|
-
"enum": ["review-fixer", "downstream-resolver", "human", "release"],
|
|
62
|
-
"description": "Who should own the next action for this finding after synthesis"
|
|
63
|
-
},
|
|
64
|
-
"requires_verification": {
|
|
65
|
-
"type": "boolean",
|
|
66
|
-
"description": "Whether any fix for this finding must be re-verified with targeted tests or a follow-up review pass"
|
|
67
|
-
},
|
|
68
|
-
"suggested_fix": {
|
|
69
|
-
"type": ["string", "null"],
|
|
70
|
-
"description": "Concrete minimal fix. Omit or null if no good fix is obvious -- a bad suggestion is worse than none."
|
|
71
|
-
},
|
|
72
|
-
"confidence": {
|
|
73
|
-
"type": "number",
|
|
74
|
-
"description": "Reviewer confidence in this finding, calibrated per persona",
|
|
75
|
-
"minimum": 0.0,
|
|
76
|
-
"maximum": 1.0
|
|
77
|
-
},
|
|
78
|
-
"evidence": {
|
|
79
|
-
"type": "array",
|
|
80
|
-
"description": "Code-grounded evidence: snippets, line references, or pattern descriptions. At least 1 item.",
|
|
81
|
-
"items": { "type": "string" },
|
|
82
|
-
"minItems": 1
|
|
83
|
-
},
|
|
84
|
-
"pre_existing": {
|
|
85
|
-
"type": "boolean",
|
|
86
|
-
"description": "True if this issue exists in unchanged code unrelated to the current diff"
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"residual_risks": {
|
|
92
|
-
"type": "array",
|
|
93
|
-
"description": "Risks the reviewer noticed but could not confirm as findings",
|
|
94
|
-
"items": { "type": "string" }
|
|
95
|
-
},
|
|
96
|
-
"testing_gaps": {
|
|
97
|
-
"type": "array",
|
|
98
|
-
"description": "Missing test coverage the reviewer identified",
|
|
99
|
-
"items": { "type": "string" }
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
"_meta": {
|
|
104
|
-
"confidence_thresholds": {
|
|
105
|
-
"suppress": "Below 0.60 -- do not report. Finding is speculative noise.",
|
|
106
|
-
"flag": "0.60-0.69 -- include only when the persona's calibration says the issue is actionable at that confidence.",
|
|
107
|
-
"report": "0.70+ -- report with full confidence."
|
|
108
|
-
},
|
|
109
|
-
"severity_definitions": {
|
|
110
|
-
"P0": "Critical breakage, exploitable vulnerability, data loss/corruption. Must fix before merge.",
|
|
111
|
-
"P1": "High-impact defect likely hit in normal usage, breaking contract. Should fix.",
|
|
112
|
-
"P2": "Moderate issue with meaningful downside (edge case, perf regression, maintainability trap). Fix if straightforward.",
|
|
113
|
-
"P3": "Low-impact, narrow scope, minor improvement. User's discretion."
|
|
114
|
-
},
|
|
115
|
-
"autofix_classes": {
|
|
116
|
-
"safe_auto": "Local, deterministic code or test fix suitable for the in-skill fixer in autonomous mode.",
|
|
117
|
-
"gated_auto": "Concrete fix exists, but it changes behavior, permissions, contracts, or other sensitive areas that deserve explicit approval.",
|
|
118
|
-
"manual": "Actionable issue that should become residual work rather than an in-skill autofix.",
|
|
119
|
-
"advisory": "Informational or operational item that should be surfaced in the report only."
|
|
120
|
-
},
|
|
121
|
-
"owners": {
|
|
122
|
-
"review-fixer": "The in-skill fixer can own this when policy allows.",
|
|
123
|
-
"downstream-resolver": "Turn this into residual work for later resolution.",
|
|
124
|
-
"human": "A person must make a judgment call before code changes should continue.",
|
|
125
|
-
"release": "Operational or rollout follow-up; do not convert into code-fix work automatically."
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# Persona Catalog
|
|
2
|
-
|
|
3
|
-
8 reviewer personas organized in two tiers, plus CE-specific agents. The orchestrator uses this catalog to select which reviewers to spawn for each review.
|
|
4
|
-
|
|
5
|
-
## Always-on (3 personas + 2 CE agents)
|
|
6
|
-
|
|
7
|
-
Spawned on every review regardless of diff content.
|
|
8
|
-
|
|
9
|
-
**Persona agents (structured JSON output):**
|
|
10
|
-
|
|
11
|
-
| Persona | Agent | Focus |
|
|
12
|
-
|---------|-------|-------|
|
|
13
|
-
| `correctness` | `systematic:review:correctness-reviewer` | Logic errors, edge cases, state bugs, error propagation, intent compliance |
|
|
14
|
-
| `testing` | `systematic:review:testing-reviewer` | Coverage gaps, weak assertions, brittle tests, missing edge case tests |
|
|
15
|
-
| `maintainability` | `systematic:review:maintainability-reviewer` | Coupling, complexity, naming, dead code, premature abstraction |
|
|
16
|
-
|
|
17
|
-
**CE agents (unstructured output, synthesized separately):**
|
|
18
|
-
|
|
19
|
-
| Agent | Focus |
|
|
20
|
-
|-------|-------|
|
|
21
|
-
| `systematic:review:agent-native-reviewer` | Verify new features are agent-accessible |
|
|
22
|
-
| `systematic:research:learnings-researcher` | Search docs/solutions/ for past issues related to this PR's modules and patterns |
|
|
23
|
-
|
|
24
|
-
## Conditional (5 personas)
|
|
25
|
-
|
|
26
|
-
Spawned when the orchestrator identifies relevant patterns in the diff. The orchestrator reads the full diff and reasons about selection -- this is agent judgment, not keyword matching.
|
|
27
|
-
|
|
28
|
-
| Persona | Agent | Select when diff touches... |
|
|
29
|
-
|---------|-------|---------------------------|
|
|
30
|
-
| `security` | `systematic:review:security-reviewer` | Auth middleware, public endpoints, user input handling, permission checks, secrets management |
|
|
31
|
-
| `performance` | `systematic:review:performance-reviewer` | Database queries, ORM calls, loop-heavy data transforms, caching layers, async/concurrent code |
|
|
32
|
-
| `api-contract` | `systematic:review:api-contract-reviewer` | Route definitions, serializer/interface changes, event schemas, exported type signatures, API versioning |
|
|
33
|
-
| `data-migrations` | `systematic:review:data-migrations-reviewer` | Migration files, schema changes, backfill scripts, data transformations |
|
|
34
|
-
| `reliability` | `systematic:review:reliability-reviewer` | Error handling, retry logic, circuit breakers, timeouts, background jobs, async handlers, health checks |
|
|
35
|
-
|
|
36
|
-
## CE Conditional Agents (migration-specific)
|
|
37
|
-
|
|
38
|
-
These CE-native agents provide specialized analysis beyond what the persona agents cover. Spawn them when the diff includes database migrations, schema.rb, or data backfills.
|
|
39
|
-
|
|
40
|
-
| Agent | Focus |
|
|
41
|
-
|-------|-------|
|
|
42
|
-
| `systematic:review:schema-drift-detector` | Cross-references schema.rb changes against included migrations to catch unrelated drift |
|
|
43
|
-
| `systematic:review:deployment-verification-agent` | Produces Go/No-Go deployment checklist with SQL verification queries and rollback procedures |
|
|
44
|
-
|
|
45
|
-
## Selection rules
|
|
46
|
-
|
|
47
|
-
1. **Always spawn all 3 always-on personas** plus the 2 CE always-on agents.
|
|
48
|
-
2. **For each conditional persona**, the orchestrator reads the diff and decides whether the persona's domain is relevant. This is a judgment call, not a keyword match.
|
|
49
|
-
3. **For CE conditional agents**, spawn when the diff includes migration files (`db/migrate/*.rb`, `db/schema.rb`) or data backfill scripts.
|
|
50
|
-
4. **Announce the team** before spawning with a one-line justification per conditional reviewer selected.
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# Code Review Output Template
|
|
2
|
-
|
|
3
|
-
Use this **exact format** when presenting synthesized review findings. Findings are grouped by severity, not by reviewer.
|
|
4
|
-
|
|
5
|
-
**IMPORTANT:** Use pipe-delimited markdown tables (`| col | col |`). Do NOT use ASCII box-drawing characters.
|
|
6
|
-
|
|
7
|
-
## Example
|
|
8
|
-
|
|
9
|
-
```markdown
|
|
10
|
-
## Code Review Results
|
|
11
|
-
|
|
12
|
-
**Scope:** merge-base with the review base branch -> working tree (14 files, 342 lines)
|
|
13
|
-
**Intent:** Add order export endpoint with CSV and JSON format support
|
|
14
|
-
**Mode:** autonomous
|
|
15
|
-
|
|
16
|
-
**Reviewers:** correctness, testing, maintainability, security, api-contract
|
|
17
|
-
- security -- new public endpoint accepts user-provided format parameter
|
|
18
|
-
- api-contract -- new /api/orders/export route with response schema
|
|
19
|
-
|
|
20
|
-
### P0 -- Critical
|
|
21
|
-
|
|
22
|
-
| # | File | Issue | Reviewer | Confidence | Route |
|
|
23
|
-
|---|------|-------|----------|------------|-------|
|
|
24
|
-
| 1 | `orders_controller.rb:42` | User-supplied ID in account lookup without ownership check | security | 0.92 | `gated_auto -> downstream-resolver` |
|
|
25
|
-
|
|
26
|
-
### P1 -- High
|
|
27
|
-
|
|
28
|
-
| # | File | Issue | Reviewer | Confidence | Route |
|
|
29
|
-
|---|------|-------|----------|------------|-------|
|
|
30
|
-
| 2 | `export_service.rb:87` | Loads all orders into memory -- unbounded for large accounts | performance | 0.85 | `safe_auto -> review-fixer` |
|
|
31
|
-
| 3 | `export_service.rb:91` | No pagination -- response size grows linearly with order count | api-contract, performance | 0.80 | `manual -> downstream-resolver` |
|
|
32
|
-
|
|
33
|
-
### P2 -- Moderate
|
|
34
|
-
|
|
35
|
-
| # | File | Issue | Reviewer | Confidence | Route |
|
|
36
|
-
|---|------|-------|----------|------------|-------|
|
|
37
|
-
| 4 | `export_service.rb:45` | Missing error handling for CSV serialization failure | correctness | 0.75 | `safe_auto -> review-fixer` |
|
|
38
|
-
|
|
39
|
-
### P3 -- Low
|
|
40
|
-
|
|
41
|
-
| # | File | Issue | Reviewer | Confidence | Route |
|
|
42
|
-
|---|------|-------|----------|------------|-------|
|
|
43
|
-
| 5 | `export_helper.rb:12` | Format detection could use early return instead of nested conditional | maintainability | 0.70 | `advisory -> human` |
|
|
44
|
-
|
|
45
|
-
### Applied Fixes
|
|
46
|
-
|
|
47
|
-
- `safe_auto`: Added bounded export pagination guard and CSV serialization failure test coverage in this run
|
|
48
|
-
|
|
49
|
-
### Residual Actionable Work
|
|
50
|
-
|
|
51
|
-
| # | File | Issue | Route | Next Step |
|
|
52
|
-
|---|------|-------|-------|-----------|
|
|
53
|
-
| 1 | `orders_controller.rb:42` | Ownership check missing on export lookup | `gated_auto -> downstream-resolver` | Create residual todo and require explicit approval before behavior change |
|
|
54
|
-
| 2 | `export_service.rb:91` | Pagination contract needs a broader API decision | `manual -> downstream-resolver` | Create residual todo with contract and client impact details |
|
|
55
|
-
|
|
56
|
-
### Pre-existing Issues
|
|
57
|
-
|
|
58
|
-
| # | File | Issue | Reviewer |
|
|
59
|
-
|---|------|-------|----------|
|
|
60
|
-
| 1 | `orders_controller.rb:12` | Broad rescue masking failed permission check | correctness |
|
|
61
|
-
|
|
62
|
-
### Learnings & Past Solutions
|
|
63
|
-
|
|
64
|
-
- [Known Pattern] `docs/solutions/export-pagination.md` -- previous export pagination fix applies to this endpoint
|
|
65
|
-
|
|
66
|
-
### Agent-Native Gaps
|
|
67
|
-
|
|
68
|
-
- New export endpoint has no CLI/agent equivalent -- agent users cannot trigger exports
|
|
69
|
-
|
|
70
|
-
### Schema Drift Check
|
|
71
|
-
|
|
72
|
-
- Clean: schema.rb changes match the migrations in scope
|
|
73
|
-
|
|
74
|
-
### Deployment Notes
|
|
75
|
-
|
|
76
|
-
- Pre-deploy: capture baseline row counts before enabling the export backfill
|
|
77
|
-
- Verify: `SELECT COUNT(*) FROM exports WHERE status IS NULL;` should stay at `0`
|
|
78
|
-
- Rollback: keep the old export path available until the backfill has been validated
|
|
79
|
-
|
|
80
|
-
### Coverage
|
|
81
|
-
|
|
82
|
-
- Suppressed: 2 findings below 0.60 confidence
|
|
83
|
-
- Residual risks: No rate limiting on export endpoint
|
|
84
|
-
- Testing gaps: No test for concurrent export requests
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
> **Verdict:** Ready with fixes
|
|
89
|
-
>
|
|
90
|
-
> **Reasoning:** 1 critical auth bypass must be fixed. The memory/pagination issues (P1) should be addressed for production safety.
|
|
91
|
-
>
|
|
92
|
-
> **Fix order:** P0 auth bypass -> P1 memory/pagination -> P2 error handling if straightforward
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Formatting Rules
|
|
96
|
-
|
|
97
|
-
- **Pipe-delimited markdown tables** -- never ASCII box-drawing characters
|
|
98
|
-
- **Severity-grouped sections** -- `### P0 -- Critical`, `### P1 -- High`, `### P2 -- Moderate`, `### P3 -- Low`. Omit empty severity levels.
|
|
99
|
-
- **Always include file:line location** for code review issues
|
|
100
|
-
- **Reviewer column** shows which persona(s) flagged the issue. Multiple reviewers = cross-reviewer agreement.
|
|
101
|
-
- **Confidence column** shows the finding's confidence score
|
|
102
|
-
- **Route column** shows the synthesized handling decision as ``<autofix_class> -> <owner>``.
|
|
103
|
-
- **Header includes** scope, intent, and reviewer team with per-conditional justifications
|
|
104
|
-
- **Mode line** -- include `interactive`, `autonomous`, or `report-only`
|
|
105
|
-
- **Applied Fixes section** -- include only when a fix phase ran in this review invocation
|
|
106
|
-
- **Residual Actionable Work section** -- include only when unresolved actionable findings were handed off for later work
|
|
107
|
-
- **Pre-existing section** -- separate table, no confidence column (these are informational)
|
|
108
|
-
- **Learnings & Past Solutions section** -- results from learnings-researcher, with links to docs/solutions/ files
|
|
109
|
-
- **Agent-Native Gaps section** -- results from agent-native-reviewer. Omit if no gaps found.
|
|
110
|
-
- **Schema Drift Check section** -- results from schema-drift-detector. Omit if the agent did not run.
|
|
111
|
-
- **Deployment Notes section** -- key checklist items from deployment-verification-agent. Omit if the agent did not run.
|
|
112
|
-
- **Coverage section** -- suppressed count, residual risks, testing gaps, failed reviewers
|
|
113
|
-
- **Summary uses blockquotes** for verdict, reasoning, and fix order
|
|
114
|
-
- **Horizontal rule** (`---`) separates findings from verdict
|
|
115
|
-
- **`###` headers** for each section -- never plain text headers
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Sub-agent Prompt Template
|
|
2
|
-
|
|
3
|
-
This template is used by the orchestrator to spawn each reviewer sub-agent. Variable substitution slots are filled at spawn time.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Template
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
You are a specialist code reviewer.
|
|
11
|
-
|
|
12
|
-
<persona>
|
|
13
|
-
{persona_file}
|
|
14
|
-
</persona>
|
|
15
|
-
|
|
16
|
-
<scope-rules>
|
|
17
|
-
{diff_scope_rules}
|
|
18
|
-
</scope-rules>
|
|
19
|
-
|
|
20
|
-
<output-contract>
|
|
21
|
-
Return ONLY valid JSON matching the findings schema below. No prose, no markdown, no explanation outside the JSON object.
|
|
22
|
-
|
|
23
|
-
{schema}
|
|
24
|
-
|
|
25
|
-
Rules:
|
|
26
|
-
- Suppress any finding below your stated confidence floor (see your Confidence calibration section).
|
|
27
|
-
- Every finding MUST include at least one evidence item grounded in the actual code.
|
|
28
|
-
- Set pre_existing to true ONLY for issues in unchanged code that are unrelated to this diff. If the diff makes the issue newly relevant, it is NOT pre-existing.
|
|
29
|
-
- You are operationally read-only. You may use non-mutating inspection commands, including read-oriented `git` / `gh` commands, to gather evidence. Do not edit files, change branches, commit, push, create PRs, or otherwise mutate the checkout or repository state.
|
|
30
|
-
- Set `autofix_class` conservatively. Use `safe_auto` only when the fix is local, deterministic, and low-risk. Use `gated_auto` when a concrete fix exists but changes behavior/contracts/permissions. Use `manual` for actionable residual work. Use `advisory` for report-only items that should not become code-fix work.
|
|
31
|
-
- Set `owner` to the default next actor for this finding: `review-fixer`, `downstream-resolver`, `human`, or `release`.
|
|
32
|
-
- Set `requires_verification` to true whenever the likely fix needs targeted tests, a focused re-review, or operational validation before it should be trusted.
|
|
33
|
-
- suggested_fix is optional. Only include it when the fix is obvious and correct. A bad suggestion is worse than none.
|
|
34
|
-
- If you find no issues, return an empty findings array. Still populate residual_risks and testing_gaps if applicable.
|
|
35
|
-
</output-contract>
|
|
36
|
-
|
|
37
|
-
<review-context>
|
|
38
|
-
Intent: {intent_summary}
|
|
39
|
-
|
|
40
|
-
Changed files: {file_list}
|
|
41
|
-
|
|
42
|
-
Diff:
|
|
43
|
-
{diff}
|
|
44
|
-
</review-context>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Variable Reference
|
|
48
|
-
|
|
49
|
-
| Variable | Source | Description |
|
|
50
|
-
|----------|--------|-------------|
|
|
51
|
-
| `{persona_file}` | Agent markdown file content | The full persona definition (identity, failure modes, calibration, suppress conditions) |
|
|
52
|
-
| `{diff_scope_rules}` | `references/diff-scope.md` content | Primary/secondary/pre-existing tier rules |
|
|
53
|
-
| `{schema}` | `references/findings-schema.json` content | The JSON schema reviewers must conform to |
|
|
54
|
-
| `{intent_summary}` | Stage 2 output | 2-3 line description of what the change is trying to accomplish |
|
|
55
|
-
| `{file_list}` | Stage 1 output | List of changed files from the scope step |
|
|
56
|
-
| `{diff}` | Stage 1 output | The actual diff content to review |
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: file-todos
|
|
3
|
-
description: This skill should be used when managing the file-based todo tracking system in the .context/systematic/todos/ directory. It provides workflows for creating todos, managing status and dependencies, conducting triage, and integrating with code review processes.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# File-Based Todo Tracking Skill
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
The `.context/systematic/todos/` directory contains a file-based tracking system for managing code review feedback, technical debt, feature requests, and work items. Each todo is a markdown file with YAML frontmatter and structured sections.
|
|
12
|
-
|
|
13
|
-
> **Legacy support:** During the transition period, always check both `.context/systematic/todos/` (canonical) and `todos/` (legacy) when reading or searching for todos. Write new todos only to the canonical path. Unlike per-run scratch directories, `.context/systematic/todos/` has a multi-session lifecycle -- do not clean it up as part of post-run scratch cleanup.
|
|
14
|
-
|
|
15
|
-
This skill should be used when:
|
|
16
|
-
- Creating new todos from findings or feedback
|
|
17
|
-
- Managing todo lifecycle (pending -> ready -> complete)
|
|
18
|
-
- Triaging pending items for approval
|
|
19
|
-
- Checking or managing dependencies
|
|
20
|
-
- Converting PR comments or code findings into tracked work
|
|
21
|
-
- Updating work logs during todo execution
|
|
22
|
-
|
|
23
|
-
## Directory Paths
|
|
24
|
-
|
|
25
|
-
| Purpose | Path |
|
|
26
|
-
|---------|------|
|
|
27
|
-
| **Canonical (write here)** | `.context/systematic/todos/` |
|
|
28
|
-
| **Legacy (read-only)** | `todos/` |
|
|
29
|
-
|
|
30
|
-
When searching or listing todos, always search both paths. When creating new todos, always write to the canonical path.
|
|
31
|
-
|
|
32
|
-
## File Naming Convention
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
{issue_id}-{status}-{priority}-{description}.md
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**Components:**
|
|
39
|
-
- **issue_id**: Sequential number (001, 002, 003...) -- never reused
|
|
40
|
-
- **status**: `pending` (needs triage), `ready` (approved), `complete` (done)
|
|
41
|
-
- **priority**: `p1` (critical), `p2` (important), `p3` (nice-to-have)
|
|
42
|
-
- **description**: kebab-case, brief description
|
|
43
|
-
|
|
44
|
-
**Examples:**
|
|
45
|
-
```
|
|
46
|
-
001-pending-p1-mailer-test.md
|
|
47
|
-
002-ready-p1-fix-n-plus-1.md
|
|
48
|
-
005-complete-p2-refactor-csv.md
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## File Structure
|
|
52
|
-
|
|
53
|
-
Each todo is a markdown file with YAML frontmatter and structured sections. Use the template at [todo-template.md](./assets/todo-template.md) as a starting point when creating new todos.
|
|
54
|
-
|
|
55
|
-
**Required sections:**
|
|
56
|
-
- **Problem Statement** -- What is broken, missing, or needs improvement?
|
|
57
|
-
- **Findings** -- Investigation results, root cause, key discoveries
|
|
58
|
-
- **Proposed Solutions** -- Multiple options with pros/cons, effort, risk
|
|
59
|
-
- **Recommended Action** -- Clear plan (filled during triage)
|
|
60
|
-
- **Acceptance Criteria** -- Testable checklist items
|
|
61
|
-
- **Work Log** -- Chronological record with date, actions, learnings
|
|
62
|
-
|
|
63
|
-
**Optional sections:**
|
|
64
|
-
- **Technical Details** -- Affected files, related components, DB changes
|
|
65
|
-
- **Resources** -- Links to errors, tests, PRs, documentation
|
|
66
|
-
- **Notes** -- Additional context or decisions
|
|
67
|
-
|
|
68
|
-
**YAML frontmatter fields:**
|
|
69
|
-
```yaml
|
|
70
|
-
---
|
|
71
|
-
status: ready # pending | ready | complete
|
|
72
|
-
priority: p1 # p1 | p2 | p3
|
|
73
|
-
issue_id: "002"
|
|
74
|
-
tags: [rails, performance, database]
|
|
75
|
-
dependencies: ["001"] # Issue IDs this is blocked by
|
|
76
|
-
---
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Common Workflows
|
|
80
|
-
|
|
81
|
-
> **Tool preference:** Use native file-search (e.g., Glob in OpenCode) and content-search (e.g., Grep in OpenCode) tools instead of shell commands for finding and reading todo files. This avoids unnecessary permission prompts in sub-agent workflows. Use shell only for operations that have no native equivalent (e.g., `mv` for renames, `mkdir -p` for directory creation).
|
|
82
|
-
|
|
83
|
-
### Creating a New Todo
|
|
84
|
-
|
|
85
|
-
1. Ensure directory exists: `mkdir -p .context/systematic/todos/`
|
|
86
|
-
2. Determine next issue ID by searching both canonical and legacy paths for files matching `[0-9]*-*.md` using the native file-search/glob tool. Extract the numeric prefix from each filename, find the highest, and increment by one. Zero-pad to 3 digits (e.g., `007`).
|
|
87
|
-
3. Read the template at [todo-template.md](./assets/todo-template.md), then write it to `.context/systematic/todos/{NEXT_ID}-pending-{priority}-{description}.md` using the native file-write tool.
|
|
88
|
-
4. Edit and fill required sections:
|
|
89
|
-
- Problem Statement
|
|
90
|
-
- Findings (if from investigation)
|
|
91
|
-
- Proposed Solutions (multiple options)
|
|
92
|
-
- Acceptance Criteria
|
|
93
|
-
- Add initial Work Log entry
|
|
94
|
-
5. Determine status: `pending` (needs triage) or `ready` (pre-approved)
|
|
95
|
-
6. Add relevant tags for filtering
|
|
96
|
-
|
|
97
|
-
**When to create a todo:**
|
|
98
|
-
- Requires more than 15-20 minutes of work
|
|
99
|
-
- Needs research, planning, or multiple approaches considered
|
|
100
|
-
- Has dependencies on other work
|
|
101
|
-
- Requires manager approval or prioritization
|
|
102
|
-
- Part of larger feature or refactor
|
|
103
|
-
- Technical debt needing documentation
|
|
104
|
-
|
|
105
|
-
**When to act immediately instead:**
|
|
106
|
-
- Issue is trivial (< 15 minutes)
|
|
107
|
-
- Complete context available now
|
|
108
|
-
- No planning needed
|
|
109
|
-
- User explicitly requests immediate action
|
|
110
|
-
- Simple bug fix with obvious solution
|
|
111
|
-
|
|
112
|
-
### Triaging Pending Items
|
|
113
|
-
|
|
114
|
-
1. Find pending items using the native file-search/glob tool with pattern `*-pending-*.md` in both directory paths.
|
|
115
|
-
2. For each todo:
|
|
116
|
-
- Read Problem Statement and Findings
|
|
117
|
-
- Review Proposed Solutions
|
|
118
|
-
- Make decision: approve, defer, or modify priority
|
|
119
|
-
3. Update approved todos:
|
|
120
|
-
- Rename file: `mv {file}-pending-{pri}-{desc}.md {file}-ready-{pri}-{desc}.md`
|
|
121
|
-
- Update frontmatter: `status: pending` -> `status: ready`
|
|
122
|
-
- Fill "Recommended Action" section with clear plan
|
|
123
|
-
- Adjust priority if different from initial assessment
|
|
124
|
-
4. Deferred todos stay in `pending` status
|
|
125
|
-
|
|
126
|
-
Load the `triage` skill for an interactive approval workflow.
|
|
127
|
-
|
|
128
|
-
### Managing Dependencies
|
|
129
|
-
|
|
130
|
-
**To track dependencies:**
|
|
131
|
-
|
|
132
|
-
```yaml
|
|
133
|
-
dependencies: ["002", "005"] # This todo blocked by issues 002 and 005
|
|
134
|
-
dependencies: [] # No blockers - can work immediately
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
**To check what blocks a todo:** Use the native content-search tool (e.g., Grep in OpenCode) to search for `^dependencies:` in the todo file.
|
|
138
|
-
|
|
139
|
-
**To find what a todo blocks:** Search both directory paths for files containing `dependencies:.*"002"` using the native content-search tool.
|
|
140
|
-
|
|
141
|
-
**To verify blockers are complete before starting:** For each dependency ID, use the native file-search/glob tool to look for `{dep_id}-complete-*.md` in both directory paths. Any missing matches indicate incomplete blockers.
|
|
142
|
-
|
|
143
|
-
### Updating Work Logs
|
|
144
|
-
|
|
145
|
-
When working on a todo, always add a work log entry:
|
|
146
|
-
|
|
147
|
-
```markdown
|
|
148
|
-
### YYYY-MM-DD - Session Title
|
|
149
|
-
|
|
150
|
-
**By:** Agent name / Developer Name
|
|
151
|
-
|
|
152
|
-
**Actions:**
|
|
153
|
-
- Specific changes made (include file:line references)
|
|
154
|
-
- Commands executed
|
|
155
|
-
- Tests run
|
|
156
|
-
- Results of investigation
|
|
157
|
-
|
|
158
|
-
**Learnings:**
|
|
159
|
-
- What worked / what didn't
|
|
160
|
-
- Patterns discovered
|
|
161
|
-
- Key insights for future work
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
Work logs serve as:
|
|
165
|
-
- Historical record of investigation
|
|
166
|
-
- Documentation of approaches attempted
|
|
167
|
-
- Knowledge sharing for team
|
|
168
|
-
- Context for future similar work
|
|
169
|
-
|
|
170
|
-
### Completing a Todo
|
|
171
|
-
|
|
172
|
-
1. Verify all acceptance criteria checked off
|
|
173
|
-
2. Update Work Log with final session and results
|
|
174
|
-
3. Rename file: `mv {file}-ready-{pri}-{desc}.md {file}-complete-{pri}-{desc}.md`
|
|
175
|
-
4. Update frontmatter: `status: ready` -> `status: complete`
|
|
176
|
-
5. Check for unblocked work: search both directory paths for `*-ready-*.md` files containing `dependencies:.*"{issue_id}"` using the native content-search tool
|
|
177
|
-
6. Commit with issue reference: `feat: resolve issue 002`
|
|
178
|
-
|
|
179
|
-
## Integration with Development Workflows
|
|
180
|
-
|
|
181
|
-
| Trigger | Flow | Tool |
|
|
182
|
-
|---------|------|------|
|
|
183
|
-
| Code review | `/ce:review` -> Findings -> `/triage` -> Todos | Review agent + skill |
|
|
184
|
-
| Beta autonomous review | `/ce:review-beta mode:autonomous` -> Downstream-resolver residual todos -> `/resolve-todo-parallel` | Review skill + todos |
|
|
185
|
-
| PR comments | `/resolve_pr_parallel` -> Individual fixes -> Todos | gh CLI + skill |
|
|
186
|
-
| Code TODOs | `/resolve-todo-parallel` -> Fixes + Complex todos | Agent + skill |
|
|
187
|
-
| Planning | Brainstorm -> Create todo -> Work -> Complete | Skill |
|
|
188
|
-
| Feedback | Discussion -> Create todo -> Triage -> Work | Skill |
|
|
189
|
-
|
|
190
|
-
## Quick Reference Patterns
|
|
191
|
-
|
|
192
|
-
Use the native file-search/glob tool (e.g., Glob in OpenCode) and content-search tool (e.g., Grep in OpenCode) for these operations. Search both canonical and legacy directory paths.
|
|
193
|
-
|
|
194
|
-
**Finding work:**
|
|
195
|
-
|
|
196
|
-
| Goal | Tool | Pattern |
|
|
197
|
-
|------|------|---------|
|
|
198
|
-
| List highest priority unblocked work | Content-search | `dependencies: \[\]` in `*-ready-p1-*.md` |
|
|
199
|
-
| List all pending items needing triage | File-search | `*-pending-*.md` |
|
|
200
|
-
| Find next issue ID | File-search | `[0-9]*-*.md`, extract highest numeric prefix |
|
|
201
|
-
| Count by status | File-search | `*-pending-*.md`, `*-ready-*.md`, `*-complete-*.md` |
|
|
202
|
-
|
|
203
|
-
**Dependency management:**
|
|
204
|
-
|
|
205
|
-
| Goal | Tool | Pattern |
|
|
206
|
-
|------|------|---------|
|
|
207
|
-
| What blocks this todo? | Content-search | `^dependencies:` in the specific todo file |
|
|
208
|
-
| What does this todo block? | Content-search | `dependencies:.*"{id}"` across all todo files |
|
|
209
|
-
|
|
210
|
-
**Searching:**
|
|
211
|
-
|
|
212
|
-
| Goal | Tool | Pattern |
|
|
213
|
-
|------|------|---------|
|
|
214
|
-
| Search by tag | Content-search | `tags:.*{tag}` across all todo files |
|
|
215
|
-
| Search by priority | File-search | `*-p1-*.md` (or p2, p3) |
|
|
216
|
-
| Full-text search | Content-search | `{keyword}` across both directory paths |
|
|
217
|
-
|
|
218
|
-
## Key Distinctions
|
|
219
|
-
|
|
220
|
-
**File-todos system (this skill):**
|
|
221
|
-
- Markdown files in `.context/systematic/todos/` (legacy: `todos/`)
|
|
222
|
-
- Development/project tracking across sessions and agents
|
|
223
|
-
- Standalone markdown files with YAML frontmatter
|
|
224
|
-
- Persisted to disk, cross-agent accessible
|
|
225
|
-
|
|
226
|
-
**In-session task tracking (e.g., todowrite/TaskUpdate in OpenCode, update_plan in Codex):**
|
|
227
|
-
- In-memory task tracking during agent sessions
|
|
228
|
-
- Temporary tracking for single conversation
|
|
229
|
-
- Not persisted to disk after session ends
|
|
230
|
-
- Different purpose: use for tracking steps within a session, not for durable cross-session work items
|
|
231
|
-
|