opencodekit 0.12.6 → 0.13.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/README.md +2 -2
- package/dist/index.js +2756 -523
- package/dist/template/.opencode/AGENTS.md +35 -128
- package/dist/template/.opencode/README.md +4 -3
- package/dist/template/.opencode/agent/build.md +32 -21
- package/dist/template/.opencode/agent/explore.md +27 -16
- package/dist/template/.opencode/agent/planner.md +103 -63
- package/dist/template/.opencode/agent/review.md +31 -23
- package/dist/template/.opencode/agent/rush.md +27 -19
- package/dist/template/.opencode/agent/scout.md +27 -19
- package/dist/template/.opencode/agent/vision.md +29 -19
- package/dist/template/.opencode/command/accessibility-check.md +1 -0
- package/dist/template/.opencode/command/analyze-mockup.md +1 -0
- package/dist/template/.opencode/command/analyze-project.md +2 -1
- package/dist/template/.opencode/command/brainstorm.md +2 -1
- package/dist/template/.opencode/command/design-audit.md +1 -0
- package/dist/template/.opencode/command/design.md +1 -0
- package/dist/template/.opencode/command/finish.md +39 -4
- package/dist/template/.opencode/command/fix.md +28 -1
- package/dist/template/.opencode/command/implement.md +26 -6
- package/dist/template/.opencode/command/init.md +1 -0
- package/dist/template/.opencode/command/pr.md +28 -1
- package/dist/template/.opencode/command/research-ui.md +1 -0
- package/dist/template/.opencode/command/research.md +1 -4
- package/dist/template/.opencode/command/review-codebase.md +1 -0
- package/dist/template/.opencode/command/start.md +106 -0
- package/dist/template/.opencode/command/status.md +3 -2
- package/dist/template/.opencode/command/summarize.md +2 -1
- package/dist/template/.opencode/command/triage.md +66 -12
- package/dist/template/.opencode/command/ui-review.md +1 -0
- package/dist/template/.opencode/memory/project/architecture.md +59 -6
- package/dist/template/.opencode/memory/project/beads-workflow.md +278 -0
- package/dist/template/.opencode/memory/project/commands.md +20 -164
- package/dist/template/.opencode/memory/session-context.md +40 -0
- package/dist/template/.opencode/memory/user.md +24 -7
- package/dist/template/.opencode/opencode.json +77 -16
- package/dist/template/.opencode/package.json +1 -1
- package/dist/template/.opencode/plugin/compaction.ts +62 -18
- package/dist/template/.opencode/plugin/lib/notify.ts +2 -3
- package/dist/template/.opencode/plugin/sessions.ts +1 -1
- package/dist/template/.opencode/plugin/skill-mcp.ts +11 -12
- package/dist/template/.opencode/skill/beads/SKILL.md +44 -0
- package/dist/template/.opencode/skill/condition-based-waiting/example.ts +71 -65
- package/dist/template/.opencode/tool/ast-grep.ts +3 -3
- package/dist/template/.opencode/tool/bd-inbox.ts +7 -6
- package/dist/template/.opencode/tool/bd-msg.ts +3 -3
- package/dist/template/.opencode/tool/bd-release.ts +2 -2
- package/dist/template/.opencode/tool/bd-reserve.ts +5 -4
- package/dist/template/.opencode/tool/memory-read.ts +58 -58
- package/dist/template/.opencode/tool/memory-search.ts +2 -2
- package/dist/template/.opencode/tool/memory-update.ts +53 -54
- package/dist/template/.opencode/tool/observation.ts +6 -6
- package/dist/template/.opencode/tsconfig.json +19 -19
- package/package.json +8 -17
- package/dist/template/.opencode/command.backup/analyze-project.md +0 -465
- package/dist/template/.opencode/command.backup/finish.md +0 -167
- package/dist/template/.opencode/command.backup/implement.md +0 -143
- package/dist/template/.opencode/command.backup/pr.md +0 -252
- package/dist/template/.opencode/command.backup/status.md +0 -376
- package/dist/template/.opencode/lib/lsp/client.ts +0 -614
- package/dist/template/.opencode/lib/lsp/config.ts +0 -199
- package/dist/template/.opencode/lib/lsp/constants.ts +0 -339
- package/dist/template/.opencode/lib/lsp/types.ts +0 -138
- package/dist/template/.opencode/lib/lsp/utils.ts +0 -190
- package/dist/template/.opencode/memory/project/SHELL_OUTPUT_MIGRATION_PLAN.md +0 -551
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"allowSyntheticDefaultImports": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"strict": false,
|
|
10
|
+
"noEmit": true,
|
|
11
|
+
"declaration": true,
|
|
12
|
+
"outDir": "./dist",
|
|
13
|
+
"rootDir": "./",
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"forceConsistentCasingInFileNames": true,
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"types": ["node"]
|
|
18
|
+
},
|
|
19
|
+
"include": ["plugin/**/*.ts", "tool/**/*.ts", "agent/**/*.ts", "*.ts"],
|
|
20
|
+
"exclude": ["node_modules", "dist", "**/*.js", "**/*.test.ts"]
|
|
21
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencodekit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "CLI tool for bootstrapping and managing OpenCodeKit projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -14,13 +14,10 @@
|
|
|
14
14
|
"bin": {
|
|
15
15
|
"ock": "dist/index.js"
|
|
16
16
|
},
|
|
17
|
-
"files": [
|
|
18
|
-
"dist",
|
|
19
|
-
"README.md"
|
|
20
|
-
],
|
|
17
|
+
"files": ["dist", "README.md"],
|
|
21
18
|
"scripts": {
|
|
22
19
|
"dev": "bun run src/index.ts",
|
|
23
|
-
"build": "bun build
|
|
20
|
+
"build": "bun run build.ts && mkdir -p dist/template && rsync -av --exclude=node_modules --exclude=dist --exclude=.git --exclude=coverage --exclude=.next --exclude=.turbo --exclude=logs --exclude=package-lock.json .opencode/ dist/template/.opencode/",
|
|
24
21
|
"compile": "bun build src/index.ts --compile --outfile ock",
|
|
25
22
|
"compile:binary": "bun build src/index.ts --compile --outfile bin/ock",
|
|
26
23
|
"typecheck": "tsc --noEmit",
|
|
@@ -29,14 +26,7 @@
|
|
|
29
26
|
"lint": "biome check .",
|
|
30
27
|
"lint:fix": "biome check --fix ."
|
|
31
28
|
},
|
|
32
|
-
"keywords": [
|
|
33
|
-
"cli",
|
|
34
|
-
"opencodekit",
|
|
35
|
-
"template",
|
|
36
|
-
"agents",
|
|
37
|
-
"mcp",
|
|
38
|
-
"opencode"
|
|
39
|
-
],
|
|
29
|
+
"keywords": ["cli", "opencodekit", "template", "agents", "mcp", "opencode"],
|
|
40
30
|
"author": "OpenCodeKit",
|
|
41
31
|
"license": "MIT",
|
|
42
32
|
"engines": {
|
|
@@ -45,11 +35,14 @@
|
|
|
45
35
|
"dependencies": {
|
|
46
36
|
"@clack/prompts": "^0.7.0",
|
|
47
37
|
"@opencode-ai/plugin": "^1.1.2",
|
|
38
|
+
"@opentui/core": "^0.1.69",
|
|
39
|
+
"@opentui/solid": "^0.1.69",
|
|
48
40
|
"beads-village": "^1.3.3",
|
|
49
41
|
"cac": "^6.7.14",
|
|
50
42
|
"cli-table3": "^0.6.5",
|
|
51
43
|
"ora": "^9.0.0",
|
|
52
44
|
"picocolors": "^1.1.1",
|
|
45
|
+
"solid-js": "^1.9.10",
|
|
53
46
|
"zod": "^3.23.8"
|
|
54
47
|
},
|
|
55
48
|
"devDependencies": {
|
|
@@ -59,7 +52,5 @@
|
|
|
59
52
|
"@types/node": "^22.10.1",
|
|
60
53
|
"typescript": "^5.7.2"
|
|
61
54
|
},
|
|
62
|
-
"trustedDependencies": [
|
|
63
|
-
"@beads/bd"
|
|
64
|
-
]
|
|
55
|
+
"trustedDependencies": ["@beads/bd"]
|
|
65
56
|
}
|
|
@@ -1,465 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Analyze project health, status, and ready work with metrics
|
|
3
|
-
argument-hint: "[--quick|--deep|--health|--security]"
|
|
4
|
-
agent: planner
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Analyze Project
|
|
8
|
-
|
|
9
|
-
## Load Beads Skill
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
skill({ name: "beads" });
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Phase 1: Quick Status Dashboard
|
|
16
|
-
|
|
17
|
-
Run these checks in parallel for speed:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
# Git status
|
|
21
|
-
git status --short
|
|
22
|
-
git branch --show-current
|
|
23
|
-
git log --oneline -3
|
|
24
|
-
|
|
25
|
-
# Beads status
|
|
26
|
-
bd status
|
|
27
|
-
bd list --status open --limit 5
|
|
28
|
-
bd list --status ready --limit 5
|
|
29
|
-
|
|
30
|
-
# CI/CD status (GitHub Actions)
|
|
31
|
-
gh run list --limit 5
|
|
32
|
-
|
|
33
|
-
# Last commit info
|
|
34
|
-
git log -1 --format="%h %s (%cr by %an)"
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Status Dashboard Output
|
|
38
|
-
|
|
39
|
-
```markdown
|
|
40
|
-
## Project Status Dashboard
|
|
41
|
-
|
|
42
|
-
| Category | Status | Details |
|
|
43
|
-
| ---------------- | --------------------- | ------------------------------ |
|
|
44
|
-
| **Branch** | `main` | 3 commits ahead of origin |
|
|
45
|
-
| **Working Tree** | Clean / Dirty | X files modified |
|
|
46
|
-
| **Last Commit** | `abc123` | "feat: add auth" (2 hours ago) |
|
|
47
|
-
| **CI Status** | Pass / Fail / Running | Last run: 2h ago |
|
|
48
|
-
| **Open Tasks** | X beads | Y ready, Z blocked |
|
|
49
|
-
| **Dependencies** | X outdated | Y security issues |
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Phase 2: Tech Stack Detection
|
|
55
|
-
|
|
56
|
-
Detect project technology:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
# Package manager & framework
|
|
60
|
-
ls package.json pyproject.toml Cargo.toml go.mod pom.xml build.gradle
|
|
61
|
-
|
|
62
|
-
# Read main config
|
|
63
|
-
read package.json # or equivalent
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Tech Stack Analysis
|
|
67
|
-
|
|
68
|
-
| Aspect | Detection Method | Example Output |
|
|
69
|
-
| --------------------- | ------------------------- | -------------------------------- |
|
|
70
|
-
| **Language** | File extensions, config | TypeScript, Python, Rust |
|
|
71
|
-
| **Framework** | package.json dependencies | Next.js 14, FastAPI, Axum |
|
|
72
|
-
| **Package Manager** | Lock file presence | npm, pnpm, yarn, bun |
|
|
73
|
-
| **Testing** | Test framework in deps | Jest, Vitest, pytest, cargo test |
|
|
74
|
-
| **Linting** | Config files | ESLint, Biome, Ruff |
|
|
75
|
-
| **Formatting** | Config files | Prettier, Biome, Black |
|
|
76
|
-
| **CI/CD** | Workflow files | GitHub Actions, GitLab CI |
|
|
77
|
-
| **Database** | Dependencies, .env | PostgreSQL, SQLite, MongoDB |
|
|
78
|
-
| **UI Framework** | Dependencies | React, Vue, Svelte |
|
|
79
|
-
| **Component Library** | components.json, deps | shadcn/ui, MUI, Chakra |
|
|
80
|
-
|
|
81
|
-
```markdown
|
|
82
|
-
## Tech Stack
|
|
83
|
-
|
|
84
|
-
| Category | Technology | Version |
|
|
85
|
-
| --------------- | ---------- | ------- |
|
|
86
|
-
| Language | TypeScript | 5.3.x |
|
|
87
|
-
| Runtime | Node.js | 20.x |
|
|
88
|
-
| Framework | Next.js | 14.2 |
|
|
89
|
-
| Package Manager | pnpm | 8.x |
|
|
90
|
-
| Testing | Vitest | 1.x |
|
|
91
|
-
| Linting | Biome | 1.x |
|
|
92
|
-
| UI | shadcn/ui | latest |
|
|
93
|
-
| Database | PostgreSQL | 16 |
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## Phase 3: Health Metrics
|
|
99
|
-
|
|
100
|
-
### 3.1 Dependency Health
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
# Node.js
|
|
104
|
-
npm outdated --json || pnpm outdated --json
|
|
105
|
-
npm audit --json
|
|
106
|
-
|
|
107
|
-
# Python
|
|
108
|
-
pip list --outdated
|
|
109
|
-
pip-audit
|
|
110
|
-
|
|
111
|
-
# Rust
|
|
112
|
-
cargo outdated
|
|
113
|
-
cargo audit
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**Dependency Dashboard:**
|
|
117
|
-
|
|
118
|
-
| Metric | Value | Status | Threshold |
|
|
119
|
-
| ------------------------ | ----- | ------- | --------- |
|
|
120
|
-
| Total dependencies | 45 | - | - |
|
|
121
|
-
| Outdated (major) | 3 | Warning | < 5 |
|
|
122
|
-
| Outdated (minor) | 8 | OK | < 20 |
|
|
123
|
-
| Security vulnerabilities | 0 | OK | 0 |
|
|
124
|
-
| High/Critical vulns | 0 | OK | 0 |
|
|
125
|
-
|
|
126
|
-
### 3.2 Test Coverage
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
# Node.js
|
|
130
|
-
npm test -- --coverage --json
|
|
131
|
-
|
|
132
|
-
# Python
|
|
133
|
-
pytest --cov --cov-report=json
|
|
134
|
-
|
|
135
|
-
# Check for coverage config
|
|
136
|
-
glob pattern="**/jest.config.*"
|
|
137
|
-
glob pattern="**/vitest.config.*"
|
|
138
|
-
glob pattern="**/pytest.ini"
|
|
139
|
-
glob pattern="**/pyproject.toml"
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
**Coverage Dashboard:**
|
|
143
|
-
|
|
144
|
-
| Metric | Value | Status | Threshold |
|
|
145
|
-
| --------------- | ----- | ------- | --------- |
|
|
146
|
-
| Line coverage | 78% | Warning | > 80% |
|
|
147
|
-
| Branch coverage | 65% | Warning | > 70% |
|
|
148
|
-
| Uncovered files | 12 | - | - |
|
|
149
|
-
| Test count | 156 | - | - |
|
|
150
|
-
| Test pass rate | 100% | OK | 100% |
|
|
151
|
-
|
|
152
|
-
### 3.3 Code Quality
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
# TypeScript type errors
|
|
156
|
-
npx tsc --noEmit 2>&1 | wc -l
|
|
157
|
-
|
|
158
|
-
# Linting issues
|
|
159
|
-
npm run lint -- --format json 2>/dev/null || npx biome check --reporter=json
|
|
160
|
-
|
|
161
|
-
# TODO/FIXME count
|
|
162
|
-
grep -r "TODO\|FIXME\|HACK\|XXX" src/ --include="*.ts" --include="*.tsx" | wc -l
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
**Quality Dashboard:**
|
|
166
|
-
|
|
167
|
-
| Metric | Value | Status | Threshold |
|
|
168
|
-
| ---------------------- | ----- | ------- | --------- |
|
|
169
|
-
| Type errors | 0 | OK | 0 |
|
|
170
|
-
| Lint errors | 5 | Warning | 0 |
|
|
171
|
-
| Lint warnings | 23 | OK | < 50 |
|
|
172
|
-
| TODO/FIXME | 15 | Info | < 30 |
|
|
173
|
-
| Console.log statements | 3 | Warning | 0 |
|
|
174
|
-
|
|
175
|
-
### 3.4 Documentation Status
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
# Check for docs
|
|
179
|
-
ls README.md CHANGELOG.md CONTRIBUTING.md docs/ 2>/dev/null
|
|
180
|
-
|
|
181
|
-
# README freshness
|
|
182
|
-
git log -1 --format="%cr" -- README.md
|
|
183
|
-
|
|
184
|
-
# API docs
|
|
185
|
-
ls docs/api/ openapi.yaml swagger.json 2>/dev/null
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
**Documentation Dashboard:**
|
|
189
|
-
|
|
190
|
-
| Document | Status | Last Updated |
|
|
191
|
-
| --------------- | ------- | ------------ |
|
|
192
|
-
| README.md | Present | 5 days ago |
|
|
193
|
-
| CHANGELOG.md | Present | 2 days ago |
|
|
194
|
-
| CONTRIBUTING.md | Missing | - |
|
|
195
|
-
| API docs | Present | 1 week ago |
|
|
196
|
-
| AGENTS.md | Present | 3 days ago |
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
|
|
200
|
-
## Phase 4: Detailed Analysis (--deep)
|
|
201
|
-
|
|
202
|
-
**For large codebases (>100KB of source):**
|
|
203
|
-
|
|
204
|
-
skill({ name: "gemini-large-context" })
|
|
205
|
-
|
|
206
|
-
### 4.1 Architecture Analysis
|
|
207
|
-
|
|
208
|
-
```bash
|
|
209
|
-
gemini -p "@src/
|
|
210
|
-
Describe:
|
|
211
|
-
1. Overall architecture pattern (MVC, Clean, Hexagonal, etc.)
|
|
212
|
-
2. Key modules and their responsibilities
|
|
213
|
-
3. Data flow between components
|
|
214
|
-
4. External dependencies and integrations
|
|
215
|
-
5. Areas of high complexity"
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### 4.2 Test Gap Analysis
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
gemini -p "@src/ @tests/
|
|
222
|
-
Assess test coverage:
|
|
223
|
-
- Which modules have tests?
|
|
224
|
-
- Which are missing tests?
|
|
225
|
-
- Test quality (unit vs integration)
|
|
226
|
-
- Edge cases covered
|
|
227
|
-
- Critical paths without tests"
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### 4.3 Code Smell Detection
|
|
231
|
-
|
|
232
|
-
```bash
|
|
233
|
-
gemini -p "@src/
|
|
234
|
-
Identify code smells:
|
|
235
|
-
- Duplicated code
|
|
236
|
-
- Long functions (>50 lines)
|
|
237
|
-
- Deep nesting (>4 levels)
|
|
238
|
-
- God objects/files
|
|
239
|
-
- Dead code
|
|
240
|
-
- Inconsistent patterns"
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### 4.4 Security Analysis (--security)
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
# Automated scans
|
|
247
|
-
npm audit
|
|
248
|
-
npx snyk test 2>/dev/null || true
|
|
249
|
-
|
|
250
|
-
# 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
|
|
254
|
-
|
|
255
|
-
# Deep analysis with Gemini
|
|
256
|
-
gemini -p "@src/ @api/
|
|
257
|
-
Security review:
|
|
258
|
-
- Input validation practices
|
|
259
|
-
- Authentication/authorization patterns
|
|
260
|
-
- SQL injection protections
|
|
261
|
-
- XSS prevention measures
|
|
262
|
-
- Secrets in code
|
|
263
|
-
- CORS configuration"
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
**Security Dashboard:**
|
|
267
|
-
|
|
268
|
-
| Check | Status | Issues |
|
|
269
|
-
| ----------------- | ------- | ------------------------- |
|
|
270
|
-
| npm audit | Pass | 0 vulnerabilities |
|
|
271
|
-
| Hardcoded secrets | Warning | 2 potential matches |
|
|
272
|
-
| Auth patterns | OK | Using established library |
|
|
273
|
-
| Input validation | Warning | 5 unvalidated endpoints |
|
|
274
|
-
| CORS | OK | Properly configured |
|
|
275
|
-
|
|
276
|
-
---
|
|
277
|
-
|
|
278
|
-
## Phase 5: Ready Work
|
|
279
|
-
|
|
280
|
-
Find actionable tasks with no blockers:
|
|
281
|
-
|
|
282
|
-
```bash
|
|
283
|
-
bd list --status ready --limit 10
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### Ready Work Table
|
|
287
|
-
|
|
288
|
-
| ID | Title | Type | Priority | Tags |
|
|
289
|
-
| ------ | ------------- | ------- | -------- | ----------- |
|
|
290
|
-
| bd-123 | Add user auth | feature | P1 | backend |
|
|
291
|
-
| bd-124 | Fix login bug | bug | P0 | urgent |
|
|
292
|
-
| bd-125 | Update deps | task | P2 | maintenance |
|
|
293
|
-
|
|
294
|
-
**Blocked Work:**
|
|
295
|
-
|
|
296
|
-
```bash
|
|
297
|
-
bd list --status blocked --limit 5
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
| ID | Title | Blocked By | Action Needed |
|
|
301
|
-
| ------ | -------------- | ---------- | ------------------- |
|
|
302
|
-
| bd-130 | Deploy to prod | bd-124 | Fix login bug first |
|
|
303
|
-
|
|
304
|
-
---
|
|
305
|
-
|
|
306
|
-
## Phase 6: Health Score
|
|
307
|
-
|
|
308
|
-
Calculate overall project health:
|
|
309
|
-
|
|
310
|
-
```
|
|
311
|
-
Health Score = 100 - (penalties)
|
|
312
|
-
|
|
313
|
-
Penalties:
|
|
314
|
-
- Each high/critical vulnerability: -10 (max -30)
|
|
315
|
-
- Each major outdated dependency: -2 (max -10)
|
|
316
|
-
- Type errors present: -15
|
|
317
|
-
- Test coverage < 80%: -10
|
|
318
|
-
- Test coverage < 60%: -20
|
|
319
|
-
- CI failing: -20
|
|
320
|
-
- No README: -5
|
|
321
|
-
- No CHANGELOG: -3
|
|
322
|
-
- Lint errors > 0: -5
|
|
323
|
-
- TODO count > 50: -5
|
|
324
|
-
|
|
325
|
-
Score interpretation:
|
|
326
|
-
90-100: Excellent - Ship with confidence
|
|
327
|
-
75-89: Good - Minor issues to address
|
|
328
|
-
60-74: Fair - Technical debt accumulating
|
|
329
|
-
< 60: Poor - Significant attention needed
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
### Health Score Output
|
|
333
|
-
|
|
334
|
-
```markdown
|
|
335
|
-
## Project Health Score: 82/100 (Good)
|
|
336
|
-
|
|
337
|
-
### Score Breakdown
|
|
338
|
-
|
|
339
|
-
| Category | Score | Notes |
|
|
340
|
-
| ------------- | ----- | ------------------------ |
|
|
341
|
-
| Security | 20/20 | No vulnerabilities |
|
|
342
|
-
| Dependencies | 18/20 | 2 major outdated |
|
|
343
|
-
| Tests | 15/20 | 78% coverage (below 80%) |
|
|
344
|
-
| Code Quality | 15/20 | 5 lint errors |
|
|
345
|
-
| CI/CD | 10/10 | Passing |
|
|
346
|
-
| Documentation | 4/10 | Missing CONTRIBUTING.md |
|
|
347
|
-
|
|
348
|
-
### Priority Actions
|
|
349
|
-
|
|
350
|
-
1. **Fix 5 lint errors** → `npm run lint -- --fix`
|
|
351
|
-
2. **Increase test coverage** → Focus on uncovered files
|
|
352
|
-
3. **Update 2 major deps** → `npm update`
|
|
353
|
-
4. **Add CONTRIBUTING.md** → Document contribution process
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
---
|
|
357
|
-
|
|
358
|
-
## Phase 7: Recommendations & Actions
|
|
359
|
-
|
|
360
|
-
Based on analysis, generate actionable recommendations:
|
|
361
|
-
|
|
362
|
-
### Immediate Actions
|
|
363
|
-
|
|
364
|
-
| Priority | Issue | Command | Bead Created |
|
|
365
|
-
| -------- | ---------------- | ----------------------- | ------------ |
|
|
366
|
-
| P0 | CI failing | Check `gh run view` | - |
|
|
367
|
-
| P1 | 2 security vulns | `npm audit fix` | bd-xxx |
|
|
368
|
-
| P2 | 5 lint errors | `npm run lint -- --fix` | - |
|
|
369
|
-
|
|
370
|
-
### Create Beads for Issues
|
|
371
|
-
|
|
372
|
-
For significant findings, create tracking issues:
|
|
373
|
-
|
|
374
|
-
```bash
|
|
375
|
-
# For security vulnerabilities
|
|
376
|
-
bd create "[Security] Fix npm audit vulnerabilities" -t bug -p 1
|
|
377
|
-
|
|
378
|
-
# For test coverage
|
|
379
|
-
bd create "[Quality] Increase test coverage to 80%" -t task -p 2
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
### Suggested Follow-up Commands
|
|
383
|
-
|
|
384
|
-
Based on findings:
|
|
385
|
-
|
|
386
|
-
| Finding | Suggested Command |
|
|
387
|
-
| --------------------- | ------------------------------------- |
|
|
388
|
-
| Ready tasks available | `/implement <bead-id>` |
|
|
389
|
-
| Test coverage low | `/research test coverage strategies` |
|
|
390
|
-
| Security issues | `/fix security` |
|
|
391
|
-
| Outdated deps | `npm update` or `/research migration` |
|
|
392
|
-
| Architecture unclear | `/research architecture` |
|
|
393
|
-
| Design system issues | `/design-audit codebase` |
|
|
394
|
-
|
|
395
|
-
---
|
|
396
|
-
|
|
397
|
-
## Output Modes
|
|
398
|
-
|
|
399
|
-
### --quick (Default)
|
|
400
|
-
|
|
401
|
-
- Status dashboard only
|
|
402
|
-
- Ready work list
|
|
403
|
-
- ~30 seconds
|
|
404
|
-
|
|
405
|
-
### --health
|
|
406
|
-
|
|
407
|
-
- Quick status + health metrics
|
|
408
|
-
- Dependency/security scan
|
|
409
|
-
- Health score
|
|
410
|
-
- ~2-3 minutes
|
|
411
|
-
|
|
412
|
-
### --deep
|
|
413
|
-
|
|
414
|
-
- Full analysis including Gemini-powered insights
|
|
415
|
-
- Architecture, test gaps, code smells
|
|
416
|
-
- ~10-15 minutes
|
|
417
|
-
|
|
418
|
-
### --security
|
|
419
|
-
|
|
420
|
-
- Security-focused analysis
|
|
421
|
-
- npm audit, secret detection, pattern analysis
|
|
422
|
-
- Gemini security review
|
|
423
|
-
- ~5-10 minutes
|
|
424
|
-
|
|
425
|
-
---
|
|
426
|
-
|
|
427
|
-
## Examples
|
|
428
|
-
|
|
429
|
-
```bash
|
|
430
|
-
# Quick status check
|
|
431
|
-
/analyze-project
|
|
432
|
-
|
|
433
|
-
# Full health assessment
|
|
434
|
-
/analyze-project --health
|
|
435
|
-
|
|
436
|
-
# Deep analysis for large codebase
|
|
437
|
-
/analyze-project --deep
|
|
438
|
-
|
|
439
|
-
# Security audit
|
|
440
|
-
/analyze-project --security
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
---
|
|
444
|
-
|
|
445
|
-
## Storage
|
|
446
|
-
|
|
447
|
-
Save analysis to `.opencode/memory/project/analysis-[YYYY-MM-DD].md` for trend tracking.
|
|
448
|
-
|
|
449
|
-
Compare with previous analysis:
|
|
450
|
-
|
|
451
|
-
```bash
|
|
452
|
-
read .opencode/memory/project/analysis-*.md
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
---
|
|
456
|
-
|
|
457
|
-
## Related Commands
|
|
458
|
-
|
|
459
|
-
| Need | Command |
|
|
460
|
-
| ------------------- | ------------------------------------- |
|
|
461
|
-
| Start ready work | `/implement <bead-id>` |
|
|
462
|
-
| Review codebase | `/review-codebase` |
|
|
463
|
-
| Check design system | `/design-audit` |
|
|
464
|
-
| Security deep dive | `/research security best practices` |
|
|
465
|
-
| Dependency update | `/research migration to [package] vX` |
|