@fro.bot/systematic 2.2.0 → 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.
Files changed (52) hide show
  1. package/agents/document-review/adversarial-document-reviewer.md +87 -0
  2. package/agents/review/adversarial-reviewer.md +107 -0
  3. package/agents/review/cli-agent-readiness-reviewer.md +443 -0
  4. package/agents/review/cli-readiness-reviewer.md +69 -0
  5. package/agents/review/previous-comments-reviewer.md +64 -0
  6. package/agents/review/project-standards-reviewer.md +80 -0
  7. package/package.json +1 -1
  8. package/skills/ce-compound/assets/resolution-template.md +90 -0
  9. package/skills/ce-compound/references/schema.yaml +222 -0
  10. package/skills/ce-compound/references/yaml-schema.md +87 -0
  11. package/skills/ce-compound-refresh/assets/resolution-template.md +90 -0
  12. package/skills/ce-compound-refresh/references/schema.yaml +222 -0
  13. package/skills/ce-compound-refresh/references/yaml-schema.md +87 -0
  14. package/skills/{ce-review-beta → ce-review}/references/findings-schema.json +8 -7
  15. package/skills/ce-review/references/persona-catalog.md +67 -0
  16. package/skills/ce-review/references/resolve-base.sh +94 -0
  17. package/skills/{ce-review-beta → ce-review}/references/review-output-template.md +36 -3
  18. package/skills/ce-review/references/subagent-template.md +84 -0
  19. package/skills/claude-permissions-optimizer/scripts/extract-commands.mjs +2 -2
  20. package/skills/claude-permissions-optimizer/scripts/normalize.mjs +8 -8
  21. package/skills/document-review/references/findings-schema.json +109 -0
  22. package/skills/document-review/references/review-output-template.md +89 -0
  23. package/skills/document-review/references/subagent-template.md +57 -0
  24. package/skills/git-clean-gone-branches/SKILL.md +63 -0
  25. package/skills/git-clean-gone-branches/scripts/clean-gone +48 -0
  26. package/skills/git-commit/SKILL.md +103 -0
  27. package/skills/git-commit-push-pr/SKILL.md +419 -0
  28. package/skills/onboarding/SKILL.md +407 -0
  29. package/skills/onboarding/scripts/inventory.mjs +1043 -0
  30. package/skills/resolve-pr-feedback/SKILL.md +374 -0
  31. package/skills/resolve-pr-feedback/scripts/get-pr-comments +104 -0
  32. package/skills/resolve-pr-feedback/scripts/get-thread-for-comment +58 -0
  33. package/skills/resolve-pr-feedback/scripts/reply-to-pr-thread +33 -0
  34. package/skills/{resolve-pr-parallel → resolve-pr-feedback}/scripts/resolve-pr-thread +0 -0
  35. package/skills/todo-create/SKILL.md +109 -0
  36. package/skills/todo-resolve/SKILL.md +68 -0
  37. package/skills/todo-triage/SKILL.md +70 -0
  38. package/skills/ce-review-beta/SKILL.md +0 -506
  39. package/skills/ce-review-beta/references/persona-catalog.md +0 -50
  40. package/skills/ce-review-beta/references/subagent-template.md +0 -56
  41. package/skills/file-todos/SKILL.md +0 -231
  42. package/skills/resolve-pr-parallel/SKILL.md +0 -96
  43. package/skills/resolve-pr-parallel/scripts/get-pr-comments +0 -68
  44. package/skills/resolve-todo-parallel/SKILL.md +0 -68
  45. package/skills/triage/SKILL.md +0 -312
  46. package/skills/workflows-brainstorm/SKILL.md +0 -11
  47. package/skills/workflows-compound/SKILL.md +0 -10
  48. package/skills/workflows-plan/SKILL.md +0 -10
  49. package/skills/workflows-review/SKILL.md +0 -10
  50. package/skills/workflows-work/SKILL.md +0 -10
  51. /package/skills/{ce-review-beta → ce-review}/references/diff-scope.md +0 -0
  52. /package/skills/{file-todos → todo-create}/assets/todo-template.md +0 -0
@@ -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,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
-
@@ -1,96 +0,0 @@
1
- ---
2
- name: resolve-pr-parallel
3
- description: Resolve all PR comments using parallel processing. Use when addressing PR review feedback, resolving review threads, or batch-fixing PR comments.
4
- argument-hint: '[optional: PR number or current PR]'
5
- disable-model-invocation: true
6
- allowed-tools: Bash(gh *), Bash(git *), Read
7
- ---
8
-
9
- # Resolve PR Comments in Parallel
10
-
11
- Resolve all unresolved PR review comments by spawning parallel agents for each thread.
12
-
13
- ## Context Detection
14
-
15
- Detect git context from the current working directory:
16
- - Current branch and associated PR
17
- - All PR comments and review threads
18
- - Works with any PR by specifying the number
19
-
20
- ## Workflow
21
-
22
- ### 1. Analyze
23
-
24
- Fetch unresolved review threads using the GraphQL script at [scripts/get-pr-comments](scripts/get-pr-comments):
25
-
26
- ```bash
27
- bash scripts/get-pr-comments PR_NUMBER
28
- ```
29
-
30
- This returns only **unresolved, non-outdated** threads with file paths, line numbers, and comment bodies.
31
-
32
- If the script fails, fall back to:
33
- ```bash
34
- gh pr view PR_NUMBER --json reviews,comments
35
- gh api repos/{owner}/{repo}/pulls/PR_NUMBER/comments
36
- ```
37
-
38
- ### 2. Plan
39
-
40
- Create a task list of all unresolved items grouped by type (e.g., `todowrite` in OpenCode, `update_plan` in Codex):
41
- - Code changes requested
42
- - Questions to answer
43
- - Style/convention fixes
44
- - Test additions needed
45
-
46
- ### 3. Implement (PARALLEL)
47
-
48
- Spawn a `systematic:workflow:pr-comment-resolver` agent for each unresolved item.
49
-
50
- If there are 3 comments, spawn 3 agents — one per comment. Prefer running all agents in parallel; if the platform does not support parallel dispatch, run them sequentially.
51
-
52
- Keep parent-context pressure bounded:
53
- - If there are 1-4 unresolved items, direct parallel returns are fine
54
- - If there are 5+ unresolved items, launch in batches of at most 4 agents at a time
55
- - Require each resolver agent to return a short status summary to the parent: comment/thread handled, files changed, tests run or skipped, any blocker that still needs human attention, and for question-only threads the substantive reply text so the parent can post or verify it
56
-
57
- If the PR is large enough that even batched short returns are likely to get noisy, use a per-run scratch directory such as `.context/systematic/resolve-pr-parallel/<run-id>/`:
58
- - Have each resolver write a compact artifact for its thread there
59
- - Return only a completion summary to the parent
60
- - Re-read only the artifacts that are needed to resolve threads, answer reviewer questions, or summarize the batch
61
-
62
- ### 4. Commit & Resolve
63
-
64
- - Commit changes with a clear message referencing the PR feedback
65
- - Resolve each thread programmatically using [scripts/resolve-pr-thread](scripts/resolve-pr-thread):
66
-
67
- ```bash
68
- bash scripts/resolve-pr-thread THREAD_ID
69
- ```
70
-
71
- - Push to remote
72
-
73
- ### 5. Verify
74
-
75
- Re-fetch comments to confirm all threads are resolved:
76
-
77
- ```bash
78
- bash scripts/get-pr-comments PR_NUMBER
79
- ```
80
-
81
- Should return an empty array `[]`. If threads remain, repeat from step 1.
82
-
83
- If a scratch directory was used and the user did not ask to inspect it, clean it up after verification succeeds.
84
-
85
- ## Scripts
86
-
87
- - [scripts/get-pr-comments](scripts/get-pr-comments) - GraphQL query for unresolved review threads
88
- - [scripts/resolve-pr-thread](scripts/resolve-pr-thread) - GraphQL mutation to resolve a thread by ID
89
-
90
- ## Success Criteria
91
-
92
- - All unresolved review threads addressed
93
- - Changes committed and pushed
94
- - Threads resolved via GraphQL (marked as resolved on GitHub)
95
- - Empty result from get-pr-comments on verify
96
-
@@ -1,68 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -e
4
-
5
- if [ $# -lt 1 ]; then
6
- echo "Usage: get-pr-comments PR_NUMBER [OWNER/REPO]"
7
- echo "Example: get-pr-comments 123"
8
- echo "Example: get-pr-comments 123 EveryInc/cora"
9
- exit 1
10
- fi
11
-
12
- PR_NUMBER=$1
13
-
14
- if [ -n "$2" ]; then
15
- OWNER=$(echo "$2" | cut -d/ -f1)
16
- REPO=$(echo "$2" | cut -d/ -f2)
17
- else
18
- OWNER=$(gh repo view --json owner -q .owner.login 2>/dev/null)
19
- REPO=$(gh repo view --json name -q .name 2>/dev/null)
20
- fi
21
-
22
- if [ -z "$OWNER" ] || [ -z "$REPO" ]; then
23
- echo "Error: Could not detect repository. Pass OWNER/REPO as second argument."
24
- exit 1
25
- fi
26
-
27
- gh api graphql -f owner="$OWNER" -f repo="$REPO" -F pr="$PR_NUMBER" -f query='
28
- query FetchUnresolvedComments($owner: String!, $repo: String!, $pr: Int!) {
29
- repository(owner: $owner, name: $repo) {
30
- pullRequest(number: $pr) {
31
- title
32
- url
33
- reviewThreads(first: 100) {
34
- totalCount
35
- edges {
36
- node {
37
- id
38
- isResolved
39
- isOutdated
40
- isCollapsed
41
- path
42
- line
43
- startLine
44
- diffSide
45
- comments(first: 100) {
46
- totalCount
47
- nodes {
48
- id
49
- author {
50
- login
51
- }
52
- body
53
- createdAt
54
- updatedAt
55
- url
56
- outdated
57
- }
58
- }
59
- }
60
- }
61
- pageInfo {
62
- hasNextPage
63
- endCursor
64
- }
65
- }
66
- }
67
- }
68
- }' | jq '.data.repository.pullRequest.reviewThreads.edges | map(select(.node.isResolved == false and .node.isOutdated == false))'
@@ -1,68 +0,0 @@
1
- ---
2
- name: resolve-todo-parallel
3
- description: Resolve all pending CLI todos using parallel processing, compound on lessons learned, then clean up completed todos.
4
- argument-hint: '[optional: specific todo ID or pattern]'
5
- ---
6
-
7
- Resolve all TODO comments using parallel processing, document lessons learned, then clean up completed todos.
8
-
9
- ## Workflow
10
-
11
- ### 1. Analyze
12
-
13
- Get all unresolved TODOs from `.context/systematic/todos/*.md` and legacy `todos/*.md`
14
-
15
- Residual actionable work may come from `ce:review-beta mode:autonomous` after its in-skill `safe_auto` pass. Treat those todos as normal unresolved work items; the review skill has already decided they should not be auto-fixed inline.
16
-
17
- If any todo recommends deleting, removing, or gitignoring files in `docs/brainstorms/`, `docs/plans/`, or `docs/solutions/`, skip it and mark it as `wont_fix`. These are systematic pipeline artifacts that are intentional and permanent.
18
-
19
- ### 2. Plan
20
-
21
- Create a task list of all unresolved items grouped by type (e.g., `todowrite` in OpenCode, `update_plan` in Codex). Analyze dependencies and prioritize items that others depend on. For example, if a rename is needed, it must complete before dependent items. Output a mermaid flow diagram showing execution order — what can run in parallel, and what must run first.
22
-
23
- ### 3. Implement (PARALLEL)
24
-
25
- Spawn a `systematic:workflow:pr-comment-resolver` agent for each unresolved item.
26
-
27
- If there are 3 items, spawn 3 agents — one per item. Prefer running all agents in parallel; if the platform does not support parallel dispatch, run them sequentially respecting the dependency order from step 2.
28
-
29
- Keep parent-context pressure bounded:
30
- - If there are 1-4 unresolved items, direct parallel returns are fine
31
- - If there are 5+ unresolved items, launch in batches of at most 4 agents at a time
32
- - Require each resolver agent to return only a short status summary to the parent: todo handled, files changed, tests run or skipped, and any blocker that still needs follow-up
33
-
34
- If the todo set is large enough that even batched short returns are likely to get noisy, use a per-run scratch directory such as `.context/systematic/resolve-todo-parallel/<run-id>/`:
35
- - Have each resolver write a compact artifact for its todo there
36
- - Return only a completion summary to the parent
37
- - Re-read only the artifacts that are needed to summarize outcomes, document learnings, or decide whether a todo is truly resolved
38
-
39
- ### 4. Commit & Resolve
40
-
41
- - Commit changes
42
- - Remove the TODO from the file, and mark it as resolved.
43
- - Push to remote
44
-
45
- GATE: STOP. Verify that todos have been resolved and changes committed. Do NOT proceed to step 5 if no todos were resolved.
46
-
47
- ### 5. Compound on Lessons Learned
48
-
49
- Load the `ce:compound` skill to document what was learned from resolving the todos.
50
-
51
- The todo resolutions often surface patterns, recurring issues, or architectural insights worth capturing. This step ensures that knowledge compounds rather than being lost.
52
-
53
- GATE: STOP. Verify that the compound skill produced a solution document in `docs/solutions/`. If no document was created (user declined or no non-trivial learnings), continue to step 6.
54
-
55
- ### 6. Clean Up Completed Todos
56
-
57
- Search both `.context/systematic/todos/` and legacy `todos/` for files with `done`, `resolved`, or `complete` status, then delete them to keep the todo list clean and actionable.
58
-
59
- If a per-run scratch directory was created at `.context/systematic/resolve-todo-parallel/<run-id>/`, and the user did not ask to inspect it, delete that specific `<run-id>/` directory after todo cleanup succeeds. Do not delete any other `.context/` subdirectories.
60
-
61
- After cleanup, output a summary:
62
-
63
- ```
64
- Todos resolved: [count]
65
- Lessons documented: [path to solution doc, or "skipped"]
66
- Todos cleaned up: [count deleted]
67
- ```
68
-