opencodekit 0.12.3 → 0.12.5
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/dist/index.js +2 -2
- package/dist/template/.opencode/agent/build.md +66 -9
- package/dist/template/.opencode/agent/rush.md +43 -19
- package/dist/template/.opencode/command/accessibility-check.md +7 -10
- package/dist/template/.opencode/command/analyze-mockup.md +3 -16
- package/dist/template/.opencode/command/analyze-project.md +57 -69
- package/dist/template/.opencode/command/brainstorm.md +3 -11
- package/dist/template/.opencode/command/commit.md +10 -18
- package/dist/template/.opencode/command/create.md +4 -8
- package/dist/template/.opencode/command/design-audit.md +24 -51
- package/dist/template/.opencode/command/design.md +10 -17
- package/dist/template/.opencode/command/finish.md +9 -9
- package/dist/template/.opencode/command/fix-ci.md +7 -28
- package/dist/template/.opencode/command/fix-types.md +3 -7
- package/dist/template/.opencode/command/fix-ui.md +5 -11
- package/dist/template/.opencode/command/fix.md +4 -10
- package/dist/template/.opencode/command/handoff.md +8 -14
- package/dist/template/.opencode/command/implement.md +13 -16
- package/dist/template/.opencode/command/import-plan.md +20 -38
- package/dist/template/.opencode/command/init.md +9 -13
- package/dist/template/.opencode/command/integration-test.md +11 -13
- package/dist/template/.opencode/command/issue.md +4 -8
- package/dist/template/.opencode/command/new-feature.md +20 -40
- package/dist/template/.opencode/command/plan.md +8 -12
- package/dist/template/.opencode/command/pr.md +29 -38
- package/dist/template/.opencode/command/quick-build.md +3 -7
- package/dist/template/.opencode/command/research-and-implement.md +4 -6
- package/dist/template/.opencode/command/research.md +10 -7
- package/dist/template/.opencode/command/resume.md +12 -24
- package/dist/template/.opencode/command/revert-feature.md +21 -56
- package/dist/template/.opencode/command/review-codebase.md +21 -23
- package/dist/template/.opencode/command/skill-create.md +1 -5
- package/dist/template/.opencode/command/skill-optimize.md +3 -10
- package/dist/template/.opencode/command/status.md +28 -25
- package/dist/template/.opencode/command/triage.md +19 -31
- package/dist/template/.opencode/command/ui-review.md +6 -13
- package/dist/template/.opencode/command.backup/analyze-project.md +465 -0
- package/dist/template/.opencode/command.backup/finish.md +167 -0
- package/dist/template/.opencode/command.backup/implement.md +143 -0
- package/dist/template/.opencode/command.backup/pr.md +252 -0
- package/dist/template/.opencode/command.backup/status.md +376 -0
- package/dist/template/.opencode/memory/project/SHELL_OUTPUT_MIGRATION_PLAN.md +551 -0
- package/dist/template/.opencode/memory/project/gotchas.md +33 -28
- package/dist/template/.opencode/opencode.json +542 -510
- package/dist/template/.opencode/package.json +1 -3
- package/dist/template/.opencode/plugin/compaction.ts +51 -129
- package/dist/template/.opencode/plugin/handoff.ts +18 -163
- package/dist/template/.opencode/plugin/notification.ts +1 -1
- package/dist/template/.opencode/plugin/package.json +7 -0
- package/dist/template/.opencode/plugin/sessions.ts +185 -651
- package/dist/template/.opencode/plugin/skill-mcp.ts +2 -1
- package/dist/template/.opencode/plugin/truncator.ts +19 -41
- package/dist/template/.opencode/plugin/tsconfig.json +14 -13
- package/dist/template/.opencode/tool/bd-inbox.ts +109 -0
- package/dist/template/.opencode/tool/bd-msg.ts +62 -0
- package/dist/template/.opencode/tool/bd-release.ts +71 -0
- package/dist/template/.opencode/tool/bd-reserve.ts +120 -0
- package/package.json +2 -2
- package/dist/template/.opencode/plugin/beads.ts +0 -1419
- package/dist/template/.opencode/plugin/compactor.ts +0 -107
- package/dist/template/.opencode/plugin/enforcer.ts +0 -190
- package/dist/template/.opencode/plugin/injector.ts +0 -150
package/dist/index.js
CHANGED
|
@@ -750,7 +750,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
750
750
|
// package.json
|
|
751
751
|
var package_default = {
|
|
752
752
|
name: "opencodekit",
|
|
753
|
-
version: "0.12.
|
|
753
|
+
version: "0.12.5",
|
|
754
754
|
description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
|
|
755
755
|
type: "module",
|
|
756
756
|
repository: {
|
|
@@ -784,7 +784,7 @@ var package_default = {
|
|
|
784
784
|
},
|
|
785
785
|
dependencies: {
|
|
786
786
|
"@clack/prompts": "^0.7.0",
|
|
787
|
-
"@opencode-ai/plugin": "^1.
|
|
787
|
+
"@opencode-ai/plugin": "^1.1.2",
|
|
788
788
|
"beads-village": "^1.3.3",
|
|
789
789
|
cac: "^6.7.14",
|
|
790
790
|
"cli-table3": "^0.6.5",
|
|
@@ -15,7 +15,7 @@ permission:
|
|
|
15
15
|
websearch: allow
|
|
16
16
|
codesearch: allow
|
|
17
17
|
ast-grep*: allow
|
|
18
|
-
|
|
18
|
+
lsp_*: allow
|
|
19
19
|
context7*: allow
|
|
20
20
|
gh_grep*: allow
|
|
21
21
|
memory-read: allow
|
|
@@ -45,6 +45,30 @@ Primary orchestrator. Execute-first. Autonomous task completion until resolved.
|
|
|
45
45
|
- Keep responses concise
|
|
46
46
|
- First output is ~70-80% right; refinement is expected, not failure
|
|
47
47
|
|
|
48
|
+
## Phase 0: Intent Gate
|
|
49
|
+
|
|
50
|
+
Before ANY action on a new request, do two things.
|
|
51
|
+
|
|
52
|
+
**First, check skills.** If the request matches a skill trigger phrase, invoke that skill immediately. Skills are specialized workflows that handle specific tasks better than manual orchestration. Don't proceed until you've checked.
|
|
53
|
+
|
|
54
|
+
**Second, classify the request.** Trivial requests (single file, known location) get direct tool use. Explicit requests (specific file and line, clear command) get immediate execution. Exploratory requests ("how does X work?") get delegated to @explore. Open-ended requests ("improve this", "add a feature") require codebase assessment first. Ambiguous requests where interpretations differ by 2x or more in effort require clarification—ask ONE question.
|
|
55
|
+
|
|
56
|
+
## Codebase Assessment
|
|
57
|
+
|
|
58
|
+
For open-ended tasks, assess the codebase state before following existing patterns blindly.
|
|
59
|
+
|
|
60
|
+
Check config files (linter, formatter, tsconfig) and sample 2-3 similar files for consistency. Then classify:
|
|
61
|
+
|
|
62
|
+
**Disciplined codebases** have consistent patterns, configs present, tests exist. Follow existing style strictly—don't innovate.
|
|
63
|
+
|
|
64
|
+
**Transitional codebases** show mixed patterns, some structure emerging. Ask which pattern to follow: "I see both X and Y patterns here. Which should I use?"
|
|
65
|
+
|
|
66
|
+
**Legacy or chaotic codebases** have no consistency, outdated patterns everywhere. Propose a convention: "No clear pattern exists. I suggest using X. OK to proceed?"
|
|
67
|
+
|
|
68
|
+
**Greenfield projects** are new or empty. Apply modern best practices from the start.
|
|
69
|
+
|
|
70
|
+
Important: different patterns may be intentional (serving different purposes) or a migration may be in progress. Verify before assuming chaos.
|
|
71
|
+
|
|
48
72
|
## Interaction Awareness
|
|
49
73
|
|
|
50
74
|
**Sounding Board triggers**: "Let's chat", "Help me think through", "Before we code", "What are the tradeoffs"
|
|
@@ -52,12 +76,33 @@ Primary orchestrator. Execute-first. Autonomous task completion until resolved.
|
|
|
52
76
|
|
|
53
77
|
**Execution mode** (default): Take action, produce output, iterate on feedback.
|
|
54
78
|
|
|
79
|
+
## Challenge the User
|
|
80
|
+
|
|
81
|
+
If you observe a design decision that will cause obvious problems, an approach that contradicts established codebase patterns, or a request that misunderstands how existing code works—raise it.
|
|
82
|
+
|
|
83
|
+
Don't blindly implement bad ideas. Don't lecture either. State your concern concisely, propose an alternative, and ask if they want to proceed anyway:
|
|
84
|
+
|
|
85
|
+
"I notice [observation]. This might cause [problem] because [reason]. Alternative: [suggestion]. Proceed with original, or try the alternative?"
|
|
86
|
+
|
|
55
87
|
## Anti-Hallucination
|
|
56
88
|
|
|
57
89
|
**Before work:** Check bead spec if doing feature work (`bd show <id>`)
|
|
58
90
|
**During work:** Verify against spec constraints; stop if violation detected
|
|
59
91
|
**After work:** Update review.md; close bead with reason
|
|
60
92
|
|
|
93
|
+
## Parallel Exploration
|
|
94
|
+
|
|
95
|
+
Treat @explore and @scout as grep, not consultants. Fire them in parallel, continue working, collect results when needed.
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
Task({ subagent_type: "explore", prompt: "Find auth middleware..." })
|
|
99
|
+
Task({ subagent_type: "explore", prompt: "Find error handling patterns..." })
|
|
100
|
+
Task({ subagent_type: "scout", prompt: "Find JWT best practices in official docs..." })
|
|
101
|
+
// Continue working immediately. Collect results when needed.
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Stop searching when:** You have enough context to proceed confidently, same information keeps appearing across sources, or two search iterations yielded nothing new. Don't over-explore—time is precious.
|
|
105
|
+
|
|
61
106
|
## Verification Loop
|
|
62
107
|
|
|
63
108
|
You are the implementation half of an implementation+verification pair. After making changes:
|
|
@@ -69,20 +114,32 @@ You are the implementation half of an implementation+verification pair. After ma
|
|
|
69
114
|
|
|
70
115
|
**Goal**: Return tested, working code—not just code that looks right.
|
|
71
116
|
|
|
117
|
+
## Evidence Requirements
|
|
118
|
+
|
|
119
|
+
A task is not complete without evidence.
|
|
120
|
+
|
|
121
|
+
File edits require clean `lsp_lsp_diagnostics` on changed files. Build commands require exit code 0. Test runs require pass (or explicit note of pre-existing failures). Delegations require verified results, not just "done" from the subagent.
|
|
122
|
+
|
|
123
|
+
No evidence means not complete. Period.
|
|
124
|
+
|
|
125
|
+
## Failure Recovery
|
|
126
|
+
|
|
127
|
+
After three consecutive failures on the same issue:
|
|
128
|
+
|
|
129
|
+
1. **STOP** all further edits immediately
|
|
130
|
+
2. **REVERT** to last known working state (git checkout or undo)
|
|
131
|
+
3. **DOCUMENT** what was attempted and what failed
|
|
132
|
+
4. **CONSULT** @review with full failure context
|
|
133
|
+
5. If still unresolved, **ASK USER** before proceeding
|
|
134
|
+
|
|
135
|
+
Never leave code in a broken state. Never continue hoping random changes will work. Never delete failing tests to "pass."
|
|
136
|
+
|
|
72
137
|
## Task Management
|
|
73
138
|
|
|
74
139
|
- Use TodoWrite to track subtasks; update every 10-15 minutes
|
|
75
140
|
- Finish one subtask end-to-end before starting next
|
|
76
141
|
- Create handoff via `/handoff <bead-id>` before context limit
|
|
77
142
|
|
|
78
|
-
## Verification
|
|
79
|
-
|
|
80
|
-
Before claiming completion:
|
|
81
|
-
|
|
82
|
-
1. Run discovered test commands (package.json, Makefile, pytest.ini)
|
|
83
|
-
2. Prefer automated verification over manual spot-checks
|
|
84
|
-
3. Document results in review.md
|
|
85
|
-
|
|
86
143
|
## Delegation
|
|
87
144
|
|
|
88
145
|
- Codebase search → @explore
|
|
@@ -14,7 +14,7 @@ permission:
|
|
|
14
14
|
webfetch: allow
|
|
15
15
|
websearch: allow
|
|
16
16
|
ast-grep*: allow
|
|
17
|
-
|
|
17
|
+
lsp_*: allow
|
|
18
18
|
context7*: allow
|
|
19
19
|
gh_grep*: allow
|
|
20
20
|
codesearch: allow
|
|
@@ -30,15 +30,29 @@ Fast execute-first agent. Speed over depth. Delegate anything complex.
|
|
|
30
30
|
|
|
31
31
|
**Rush excels when specification quality is already high.** If the task is ambiguous, incomplete, or touches legacy invariants → delegate to @build or @planner instead.
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Intent Gate (Fast Version)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Before acting, answer three questions in your head:
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
- Is the change **localized** (1-3 files) vs system-wide?
|
|
39
|
-
- Am I working on **greenfield** (simple context) vs **legacy** (hidden invariants)?
|
|
37
|
+
**Is there a skill for this?** If the request matches a skill trigger, invoke it. Skills handle specialized workflows better than you improvising.
|
|
40
38
|
|
|
41
|
-
If
|
|
39
|
+
**Is this mine to do?** Rush handles well-defined, localized (1-3 files), greenfield tasks. If any of these fail—ambiguous scope, system-wide changes, or legacy code with hidden invariants—delegate immediately. Don't power through complexity; avoid it.
|
|
40
|
+
|
|
41
|
+
**Do I need to read first?** If you're about to edit a file you haven't seen, stop. Read it. Never speculate about uninspected code.
|
|
42
|
+
|
|
43
|
+
## Bail Triggers
|
|
44
|
+
|
|
45
|
+
Delegate immediately when you hit any of these:
|
|
46
|
+
|
|
47
|
+
**Scope creep**: Task that looked simple now touches 4+ files or requires understanding interconnected systems. Hand to @build.
|
|
48
|
+
|
|
49
|
+
**Research required**: Need to look up library docs, external APIs, or best practices. Hand to @scout.
|
|
50
|
+
|
|
51
|
+
**Two failures**: You tried twice and it's still broken. Don't guess a third time. Hand to @build or @review with full context of what you tried.
|
|
52
|
+
|
|
53
|
+
**Architecture question**: "Should we use X or Y pattern?" is not a Rush decision. Hand to @planner.
|
|
54
|
+
|
|
55
|
+
**Legacy minefield**: You're seeing patterns you don't understand, code that looks intentionally weird, or comments warning about edge cases. Hand to @build who will assess the codebase state first.
|
|
42
56
|
|
|
43
57
|
## Strengths
|
|
44
58
|
|
|
@@ -53,27 +67,36 @@ If answers are "no", "system-wide", or "legacy" → delegate. Rush speed comes f
|
|
|
53
67
|
- Only make changes directly requested
|
|
54
68
|
- Use `file:line_number` format for references
|
|
55
69
|
- No emojis unless requested
|
|
56
|
-
- Delegate complex tasks immediately
|
|
57
70
|
- First output is ~70-80% right; refinement is expected
|
|
58
71
|
- Quick sanity check after changes (linter/type-check), but don't do full verification loops
|
|
59
72
|
|
|
60
|
-
##
|
|
73
|
+
## Challenge Obvious Problems
|
|
61
74
|
|
|
62
|
-
|
|
75
|
+
Even at speed, don't blindly implement bad ideas. If you see an obvious problem with what the user is asking—something that will clearly break or contradict existing patterns—say so in one sentence and ask if they want to proceed anyway.
|
|
63
76
|
|
|
64
|
-
|
|
65
|
-
2. Should I delegate? If complex → use task tool
|
|
66
|
-
3. Will this cause issues? If risky → verify first
|
|
77
|
+
Don't lecture. Don't explore alternatives in depth. Just: "This will break X because Y. Proceed anyway?" Then do what they say.
|
|
67
78
|
|
|
68
|
-
##
|
|
79
|
+
## Evidence (Light Version)
|
|
69
80
|
|
|
70
|
-
|
|
81
|
+
Rush doesn't do full verification loops, but does require minimal evidence:
|
|
71
82
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
-
|
|
83
|
+
After file edits, run a quick sanity check—`lsp_lsp_diagnostics` on changed files or a fast lint/typecheck command if available. If it fails, fix it or delegate.
|
|
84
|
+
|
|
85
|
+
After running commands, check exit codes. Non-zero means something went wrong; don't ignore it.
|
|
86
|
+
|
|
87
|
+
For delegations, verify the subagent actually answered the question. "Done" without evidence means re-delegate with stricter requirements.
|
|
88
|
+
|
|
89
|
+
## Parallel When Multiple Unknowns
|
|
90
|
+
|
|
91
|
+
If you need to look up multiple things before proceeding, fire them in parallel:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Task({ subagent_type: "explore", prompt: "Find where config is loaded..." })
|
|
95
|
+
Task({ subagent_type: "explore", prompt: "Find how errors are handled..." })
|
|
96
|
+
// Continue with what you know. Collect results when needed.
|
|
97
|
+
```
|
|
75
98
|
|
|
76
|
-
|
|
99
|
+
Don't wait sequentially for each answer. Rush is fast because it parallelizes.
|
|
77
100
|
|
|
78
101
|
## Delegation
|
|
79
102
|
|
|
@@ -84,6 +107,7 @@ Delegate to specialized agents:
|
|
|
84
107
|
- Code review, debugging → @review
|
|
85
108
|
- Architecture, 3+ phases → @planner
|
|
86
109
|
- UI/UX, mockups, visuals → @vision
|
|
110
|
+
- Complex multi-step work → @build
|
|
87
111
|
|
|
88
112
|
## Beads Task Ownership (Leader Pattern)
|
|
89
113
|
|
|
@@ -21,9 +21,7 @@ skill({ name: "accessibility-audit" });
|
|
|
21
21
|
|
|
22
22
|
**Check for bead context:**
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
bd_show({ id: "$ARGUMENTS" }); // If bead ID provided
|
|
26
|
-
```
|
|
24
|
+
!`bd show $ARGUMENTS` # If bead ID provided
|
|
27
25
|
|
|
28
26
|
Parse path and WCAG level from `$ARGUMENTS` (default: AA).
|
|
29
27
|
|
|
@@ -117,6 +115,8 @@ ast - grep({ pattern: "<input $$$>" }); // Check for id + matching label
|
|
|
117
115
|
|
|
118
116
|
### ARIA Pattern Checks
|
|
119
117
|
|
|
118
|
+
!`grep -r "role=" --include="*.tsx" --include="*.jsx" | head -20`
|
|
119
|
+
|
|
120
120
|
| Pattern | Required ARIA |
|
|
121
121
|
| --------------- | ------------------------------------------ |
|
|
122
122
|
| Modal dialog | role="dialog", aria-modal, aria-labelledby |
|
|
@@ -137,11 +137,8 @@ ast - grep({ pattern: "<input $$$>" }); // Check for id + matching label
|
|
|
137
137
|
| Focus restoration | Focus returns after modal closes |
|
|
138
138
|
| Skip links | Skip to main content available |
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
grep({ pattern: ":focus", include: "*.css" });
|
|
143
|
-
grep({ pattern: "focus:", include: "*.tsx" }); // Tailwind
|
|
144
|
-
```
|
|
140
|
+
!`grep -r ":focus" --include="*.css" | head -10`
|
|
141
|
+
!`grep -r "focus:" --include="*.tsx" | head -10` // Tailwind
|
|
145
142
|
|
|
146
143
|
## Phase 6: Keyboard Navigation Testing
|
|
147
144
|
|
|
@@ -292,8 +289,8 @@ Remaining:
|
|
|
292
289
|
|
|
293
290
|
## Phase 11: Sync
|
|
294
291
|
|
|
295
|
-
```
|
|
296
|
-
|
|
292
|
+
```bash
|
|
293
|
+
bd sync
|
|
297
294
|
```
|
|
298
295
|
|
|
299
296
|
## Output
|
|
@@ -360,22 +360,9 @@ skill({ name: "mockup-to-code" })
|
|
|
360
360
|
|
|
361
361
|
**Create Implementation Tasks:**
|
|
362
362
|
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
desc: "Extract CSS variables for colors, typography, spacing from [mockup]",
|
|
367
|
-
type: "task",
|
|
368
|
-
pri: 1,
|
|
369
|
-
tags: ["frontend", "design-system"]
|
|
370
|
-
})
|
|
371
|
-
|
|
372
|
-
bd_add({
|
|
373
|
-
title: "Implement [ComponentName] component",
|
|
374
|
-
desc: "Build component matching mockup spec. Variants: [...], States: [...]",
|
|
375
|
-
type: "task",
|
|
376
|
-
pri: 2,
|
|
377
|
-
tags: ["frontend", "component"]
|
|
378
|
-
})
|
|
363
|
+
```bash
|
|
364
|
+
bd create "Implement design tokens from mockup" -t task -p 1
|
|
365
|
+
bd create "Implement [ComponentName] component" -t task -p 2
|
|
379
366
|
```
|
|
380
367
|
|
|
381
368
|
**Suggested Follow-up Commands:**
|
|
@@ -16,22 +16,22 @@ skill({ name: "beads" });
|
|
|
16
16
|
|
|
17
17
|
Run these checks in parallel for speed:
|
|
18
18
|
|
|
19
|
-
```
|
|
19
|
+
```
|
|
20
20
|
# Git status
|
|
21
|
-
git status --short
|
|
22
|
-
git branch --show-current
|
|
23
|
-
git log --oneline -3
|
|
21
|
+
!`git status --short`
|
|
22
|
+
!`git branch --show-current`
|
|
23
|
+
!`git log --oneline -3`
|
|
24
24
|
|
|
25
25
|
# Beads status
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
!`bd status`
|
|
27
|
+
!`bd list --status open --limit 5`
|
|
28
|
+
!`bd list --status ready --limit 5`
|
|
29
29
|
|
|
30
30
|
# CI/CD status (GitHub Actions)
|
|
31
|
-
gh run list --limit 5
|
|
31
|
+
!`gh run list --limit 5`
|
|
32
32
|
|
|
33
33
|
# Last commit info
|
|
34
|
-
git log -1 --format="%h %s (%cr by %an)"
|
|
34
|
+
!`git log -1 --format="%h %s (%cr by %an)"`
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### Status Dashboard Output
|
|
@@ -55,12 +55,12 @@ git log -1 --format="%h %s (%cr by %an)"
|
|
|
55
55
|
|
|
56
56
|
Detect project technology:
|
|
57
57
|
|
|
58
|
-
```
|
|
58
|
+
```
|
|
59
59
|
# Package manager & framework
|
|
60
|
-
ls package.json pyproject.toml Cargo.toml go.mod pom.xml build.gradle
|
|
60
|
+
!`ls package.json pyproject.toml Cargo.toml go.mod pom.xml build.gradle`
|
|
61
61
|
|
|
62
|
-
# Read main config
|
|
63
|
-
|
|
62
|
+
# Read main config (instructional - agent must read this file)
|
|
63
|
+
# Read package.json # or equivalent
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
### Tech Stack Analysis
|
|
@@ -101,15 +101,15 @@ read package.json # or equivalent
|
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
103
|
# Node.js
|
|
104
|
-
npm outdated --json || pnpm outdated --json
|
|
105
|
-
npm audit --json
|
|
104
|
+
!`npm outdated --json || pnpm outdated --json`
|
|
105
|
+
!`npm audit --json`
|
|
106
106
|
|
|
107
107
|
# Python
|
|
108
|
-
pip list --outdated
|
|
109
|
-
pip-audit
|
|
108
|
+
!`pip list --outdated`
|
|
109
|
+
!`pip-audit`
|
|
110
110
|
|
|
111
111
|
# Rust
|
|
112
|
-
cargo outdated
|
|
112
|
+
!`cargo outdated`
|
|
113
113
|
cargo audit
|
|
114
114
|
```
|
|
115
115
|
|
|
@@ -132,11 +132,11 @@ npm test -- --coverage --json
|
|
|
132
132
|
# Python
|
|
133
133
|
pytest --cov --cov-report=json
|
|
134
134
|
|
|
135
|
-
# Check for coverage config
|
|
136
|
-
glob pattern
|
|
137
|
-
glob pattern
|
|
138
|
-
glob pattern
|
|
139
|
-
glob pattern
|
|
135
|
+
# Check for coverage config (instructional - agent uses glob tool)
|
|
136
|
+
glob({ pattern: "**/jest.config.*" })
|
|
137
|
+
glob({ pattern: "**/vitest.config.*" })
|
|
138
|
+
glob({ pattern: "**/pytest.ini" })
|
|
139
|
+
glob({ pattern: "**/pyproject.toml" })
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
**Coverage Dashboard:**
|
|
@@ -153,13 +153,13 @@ glob pattern="**/pyproject.toml"
|
|
|
153
153
|
|
|
154
154
|
```bash
|
|
155
155
|
# TypeScript type errors
|
|
156
|
-
npx tsc --noEmit 2>&1 | wc -l
|
|
156
|
+
!`npx tsc --noEmit 2>&1 | wc -l`
|
|
157
157
|
|
|
158
158
|
# Linting issues
|
|
159
|
-
npm run lint -- --format json 2>/dev/null || npx biome check --reporter=json
|
|
159
|
+
!`npm run lint -- --format json 2>/dev/null || npx biome check --reporter=json`
|
|
160
160
|
|
|
161
161
|
# TODO/FIXME count
|
|
162
|
-
grep -r "TODO\|FIXME\|HACK\|XXX" src/ --include="*.ts" --include="*.tsx" | wc -l
|
|
162
|
+
!`grep -r "TODO\|FIXME\|HACK\|XXX" src/ --include="*.ts" --include="*.tsx" | wc -l`
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
**Quality Dashboard:**
|
|
@@ -174,15 +174,15 @@ grep -r "TODO\|FIXME\|HACK\|XXX" src/ --include="*.ts" --include="*.tsx" | wc -l
|
|
|
174
174
|
|
|
175
175
|
### 3.4 Documentation Status
|
|
176
176
|
|
|
177
|
-
```
|
|
177
|
+
```
|
|
178
178
|
# Check for docs
|
|
179
|
-
ls README.md CHANGELOG.md CONTRIBUTING.md docs/ 2>/dev/null
|
|
179
|
+
!`ls README.md CHANGELOG.md CONTRIBUTING.md docs/ 2>/dev/null`
|
|
180
180
|
|
|
181
181
|
# README freshness
|
|
182
|
-
git log -1 --format="%cr" -- README.md
|
|
182
|
+
!`git log -1 --format="%cr" -- README.md`
|
|
183
183
|
|
|
184
184
|
# API docs
|
|
185
|
-
ls docs/api/ openapi.yaml swagger.json 2>/dev/null
|
|
185
|
+
!`ls docs/api/ openapi.yaml swagger.json 2>/dev/null`
|
|
186
186
|
```
|
|
187
187
|
|
|
188
188
|
**Documentation Dashboard:**
|
|
@@ -205,52 +205,51 @@ skill({ name: "gemini-large-context" })
|
|
|
205
205
|
|
|
206
206
|
### 4.1 Architecture Analysis
|
|
207
207
|
|
|
208
|
-
```
|
|
209
|
-
gemini
|
|
208
|
+
```typescript
|
|
209
|
+
gemini({ prompt: "@src/
|
|
210
210
|
Describe:
|
|
211
211
|
1. Overall architecture pattern (MVC, Clean, Hexagonal, etc.)
|
|
212
212
|
2. Key modules and their responsibilities
|
|
213
213
|
3. Data flow between components
|
|
214
214
|
4. External dependencies and integrations
|
|
215
|
-
5. Areas of high complexity"
|
|
215
|
+
5. Areas of high complexity" });
|
|
216
216
|
```
|
|
217
217
|
|
|
218
218
|
### 4.2 Test Gap Analysis
|
|
219
219
|
|
|
220
|
-
```
|
|
221
|
-
gemini
|
|
220
|
+
```typescript
|
|
221
|
+
gemini({ prompt: "@src/ @tests/
|
|
222
222
|
Assess test coverage:
|
|
223
223
|
- Which modules have tests?
|
|
224
224
|
- Which are missing tests?
|
|
225
225
|
- Test quality (unit vs integration)
|
|
226
226
|
- Edge cases covered
|
|
227
|
-
- Critical paths without tests"
|
|
227
|
+
- Critical paths without tests" });
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
### 4.3 Code Smell Detection
|
|
231
231
|
|
|
232
|
-
```
|
|
233
|
-
gemini
|
|
232
|
+
```typescript
|
|
233
|
+
gemini({ prompt: "@src/
|
|
234
234
|
Identify code smells:
|
|
235
235
|
- Duplicated code
|
|
236
236
|
- Long functions (>50 lines)
|
|
237
237
|
- Deep nesting (>4 levels)
|
|
238
238
|
- God objects/files
|
|
239
|
-
-
|
|
240
|
-
- Inconsistent patterns"
|
|
239
|
+
- Overly complex conditions" });
|
|
241
240
|
```
|
|
242
241
|
|
|
243
242
|
### 4.4 Security Analysis (--security)
|
|
244
243
|
|
|
245
244
|
```bash
|
|
246
245
|
# Automated scans
|
|
247
|
-
npm audit
|
|
248
|
-
npx snyk test 2>/dev/null || true
|
|
246
|
+
!`npm audit`
|
|
247
|
+
!`npx snyk test 2>/dev/null || true`
|
|
249
248
|
|
|
250
249
|
# Pattern-based detection
|
|
251
|
-
grep -r "password\s*=" src/ --include="*.ts" || true
|
|
252
|
-
grep -r "api_key\s*=" src/ --include="*.ts" || true
|
|
253
|
-
grep -r "secret" src/ --include="*.ts" || true
|
|
250
|
+
!`grep -r "password\s*=" src/ --include="*.ts" || true`
|
|
251
|
+
!`grep -r "api_key\s*=" src/ --include="*.ts" || true`
|
|
252
|
+
!`grep -r "secret" src/ --include="*.ts" || true`
|
|
254
253
|
|
|
255
254
|
# Deep analysis with Gemini
|
|
256
255
|
gemini -p "@src/ @api/
|
|
@@ -279,8 +278,8 @@ Security review:
|
|
|
279
278
|
|
|
280
279
|
Find actionable tasks with no blockers:
|
|
281
280
|
|
|
282
|
-
```
|
|
283
|
-
|
|
281
|
+
```
|
|
282
|
+
!`bd list --status ready --limit 10`
|
|
284
283
|
```
|
|
285
284
|
|
|
286
285
|
### Ready Work Table
|
|
@@ -293,8 +292,8 @@ bd_ls({ status: "ready", limit: 10, offset: 0 });
|
|
|
293
292
|
|
|
294
293
|
**Blocked Work:**
|
|
295
294
|
|
|
296
|
-
```
|
|
297
|
-
|
|
295
|
+
```
|
|
296
|
+
!`bd list --status blocked --limit 5`
|
|
298
297
|
```
|
|
299
298
|
|
|
300
299
|
| ID | Title | Blocked By | Action Needed |
|
|
@@ -371,24 +370,12 @@ Based on analysis, generate actionable recommendations:
|
|
|
371
370
|
|
|
372
371
|
For significant findings, create tracking issues:
|
|
373
372
|
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
pri: 1,
|
|
381
|
-
tags: ["security", "dependencies"],
|
|
382
|
-
});
|
|
383
|
-
|
|
384
|
-
// For test coverage
|
|
385
|
-
bd_add({
|
|
386
|
-
title: "[Quality] Increase test coverage to 80%",
|
|
387
|
-
desc: "Current coverage: 78%\nTarget: 80%\n\nUncovered files:\n- src/auth/login.ts\n- src/api/users.ts",
|
|
388
|
-
type: "task",
|
|
389
|
-
pri: 2,
|
|
390
|
-
tags: ["testing", "quality"],
|
|
391
|
-
});
|
|
373
|
+
```bash
|
|
374
|
+
# For security vulnerabilities
|
|
375
|
+
bd create "[Security] Fix npm audit vulnerabilities" -t bug -p 1 # Keep as instructional
|
|
376
|
+
|
|
377
|
+
# For test coverage
|
|
378
|
+
bd create "[Quality] Increase test coverage to 80%" -t task -p 2 # Keep as instructional
|
|
392
379
|
```
|
|
393
380
|
|
|
394
381
|
### Suggested Follow-up Commands
|
|
@@ -460,8 +447,9 @@ Save analysis to `.opencode/memory/project/analysis-[YYYY-MM-DD].md` for trend t
|
|
|
460
447
|
|
|
461
448
|
Compare with previous analysis:
|
|
462
449
|
|
|
463
|
-
```
|
|
464
|
-
|
|
450
|
+
```typescript
|
|
451
|
+
glob({ pattern: ".opencode/memory/project/analysis-*.md" });
|
|
452
|
+
// Then read each matched file
|
|
465
453
|
```
|
|
466
454
|
|
|
467
455
|
---
|
|
@@ -28,9 +28,7 @@ skill({ name: "brainstorming" });
|
|
|
28
28
|
|
|
29
29
|
If `$ARGUMENTS` is a bead ID:
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
bd_show({ id: "$ARGUMENTS" });
|
|
33
|
-
```
|
|
31
|
+
!`bd show $ARGUMENTS`
|
|
34
32
|
|
|
35
33
|
Load constraints from `.beads/artifacts/<bead-id>/spec.md` if it exists.
|
|
36
34
|
|
|
@@ -247,14 +245,8 @@ observation({
|
|
|
247
245
|
|
|
248
246
|
For promising ideas that need more work:
|
|
249
247
|
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
title: "[Idea name]",
|
|
253
|
-
type: "task",
|
|
254
|
-
pri: 2,
|
|
255
|
-
desc: "From brainstorm: [topic]. Needs research/prototyping.",
|
|
256
|
-
tags: ["brainstorm"],
|
|
257
|
-
});
|
|
248
|
+
```bash
|
|
249
|
+
bd create "[Idea name]" -t task -p 2
|
|
258
250
|
```
|
|
259
251
|
|
|
260
252
|
## Output
|
|
@@ -19,11 +19,9 @@ skill({ name: "verification-before-completion" });
|
|
|
19
19
|
|
|
20
20
|
## Phase 1: Check Git State
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
git
|
|
24
|
-
git diff --stat
|
|
25
|
-
git diff --cached --stat
|
|
26
|
-
```
|
|
22
|
+
!`git status --porcelain`
|
|
23
|
+
!`git diff --stat`
|
|
24
|
+
!`git diff --cached --stat`
|
|
27
25
|
|
|
28
26
|
Report:
|
|
29
27
|
|
|
@@ -48,9 +46,7 @@ If nothing staged: "No changes staged. Run `git add <files>` first."
|
|
|
48
46
|
|
|
49
47
|
Detect project type and run gates:
|
|
50
48
|
|
|
51
|
-
|
|
52
|
-
ls package.json Cargo.toml pyproject.toml go.mod Makefile 2>/dev/null
|
|
53
|
-
```
|
|
49
|
+
!`ls package.json Cargo.toml pyproject.toml go.mod Makefile 2>/dev/null`
|
|
54
50
|
|
|
55
51
|
| Project | Test Command | Lint Command |
|
|
56
52
|
| ------- | --------------- | ------------------------------------ |
|
|
@@ -78,10 +74,8 @@ Fix errors or use `git commit --no-verify` (not recommended).
|
|
|
78
74
|
|
|
79
75
|
## Phase 3: Analyze Changes for Message
|
|
80
76
|
|
|
81
|
-
|
|
82
|
-
git diff --cached
|
|
83
|
-
git diff --cached
|
|
84
|
-
```
|
|
77
|
+
!`git diff --cached --stat`
|
|
78
|
+
!`git diff --cached`
|
|
85
79
|
|
|
86
80
|
Determine:
|
|
87
81
|
|
|
@@ -186,8 +180,8 @@ Options:
|
|
|
186
180
|
|
|
187
181
|
If bead ID was provided:
|
|
188
182
|
|
|
189
|
-
```
|
|
190
|
-
|
|
183
|
+
```bash
|
|
184
|
+
bd sync
|
|
191
185
|
```
|
|
192
186
|
|
|
193
187
|
## Output
|
|
@@ -221,10 +215,8 @@ Create PR:
|
|
|
221
215
|
|
|
222
216
|
**Safety checks before amend:**
|
|
223
217
|
|
|
224
|
-
|
|
225
|
-
git
|
|
226
|
-
git status # Check if pushed
|
|
227
|
-
```
|
|
218
|
+
!`git log -1 --format='%H %s'` # What we're amending
|
|
219
|
+
!`git status` # Check if pushed
|
|
228
220
|
|
|
229
221
|
```
|
|
230
222
|
Amend Safety Check:
|
|
@@ -10,9 +10,7 @@ You're creating a new tracked task. Keep it simple unless complexity demands oth
|
|
|
10
10
|
|
|
11
11
|
## Check For Duplicates First
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
bd list --status=all | grep -i "[keywords]"
|
|
15
|
-
```
|
|
13
|
+
!`bd list --status=all | grep -i "[keywords]"`
|
|
16
14
|
|
|
17
15
|
If similar work exists, link to it or extend it instead of creating duplicate.
|
|
18
16
|
|
|
@@ -104,14 +102,12 @@ bd dep add bd-[second] bd-[first] --type blocks
|
|
|
104
102
|
|
|
105
103
|
Visualize:
|
|
106
104
|
|
|
107
|
-
|
|
108
|
-
bd dep tree bd-[epic]
|
|
109
|
-
```
|
|
105
|
+
!`bd dep tree bd-[epic]`
|
|
110
106
|
|
|
111
107
|
## Sync
|
|
112
108
|
|
|
113
|
-
```
|
|
114
|
-
|
|
109
|
+
```bash
|
|
110
|
+
bd sync
|
|
115
111
|
```
|
|
116
112
|
|
|
117
113
|
## Output
|