@protoboxai/codeloop 0.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/LICENSE +21 -0
- package/README.md +589 -0
- package/dist/commands/adopt.d.ts +2 -0
- package/dist/commands/adopt.js +26 -0
- package/dist/commands/adopt.js.map +1 -0
- package/dist/commands/brief.d.ts +2 -0
- package/dist/commands/brief.js +22 -0
- package/dist/commands/brief.js.map +1 -0
- package/dist/commands/card.d.ts +6 -0
- package/dist/commands/card.js +159 -0
- package/dist/commands/card.js.map +1 -0
- package/dist/commands/check.d.ts +4 -0
- package/dist/commands/check.js +76 -0
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/cloud.d.ts +8 -0
- package/dist/commands/cloud.js +123 -0
- package/dist/commands/cloud.js.map +1 -0
- package/dist/commands/guard.d.ts +2 -0
- package/dist/commands/guard.js +26 -0
- package/dist/commands/guard.js.map +1 -0
- package/dist/commands/import.d.ts +2 -0
- package/dist/commands/import.js +24 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/inbox.d.ts +2 -0
- package/dist/commands/inbox.js +48 -0
- package/dist/commands/inbox.js.map +1 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.js +142 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/install.d.ts +2 -0
- package/dist/commands/install.js +125 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/lane.d.ts +2 -0
- package/dist/commands/lane.js +100 -0
- package/dist/commands/lane.js.map +1 -0
- package/dist/commands/list.d.ts +2 -0
- package/dist/commands/list.js +35 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/login.d.ts +2 -0
- package/dist/commands/login.js +77 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/mock.d.ts +3 -0
- package/dist/commands/mock.js +22 -0
- package/dist/commands/mock.js.map +1 -0
- package/dist/commands/pack.d.ts +2 -0
- package/dist/commands/pack.js +19 -0
- package/dist/commands/pack.js.map +1 -0
- package/dist/commands/publish.d.ts +2 -0
- package/dist/commands/publish.js +125 -0
- package/dist/commands/publish.js.map +1 -0
- package/dist/commands/remove.d.ts +2 -0
- package/dist/commands/remove.js +31 -0
- package/dist/commands/remove.js.map +1 -0
- package/dist/commands/render.d.ts +5 -0
- package/dist/commands/render.js +47 -0
- package/dist/commands/render.js.map +1 -0
- package/dist/commands/run.d.ts +2 -0
- package/dist/commands/run.js +45 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/scan.d.ts +2 -0
- package/dist/commands/scan.js +26 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/schedule.d.ts +2 -0
- package/dist/commands/schedule.js +51 -0
- package/dist/commands/schedule.js.map +1 -0
- package/dist/commands/search.d.ts +2 -0
- package/dist/commands/search.js +85 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/serve.d.ts +7 -0
- package/dist/commands/serve.js +126 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/commands/spec.d.ts +3 -0
- package/dist/commands/spec.js +64 -0
- package/dist/commands/spec.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.js +251 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.js +83 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/verify.d.ts +3 -0
- package/dist/commands/verify.js +75 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/commands/watch.d.ts +6 -0
- package/dist/commands/watch.js +111 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/commands/wiki.d.ts +3 -0
- package/dist/commands/wiki.js +85 -0
- package/dist/commands/wiki.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/agent.d.ts +27 -0
- package/dist/lib/agent.js +178 -0
- package/dist/lib/agent.js.map +1 -0
- package/dist/lib/board.d.ts +38 -0
- package/dist/lib/board.js +86 -0
- package/dist/lib/board.js.map +1 -0
- package/dist/lib/cards.d.ts +82 -0
- package/dist/lib/cards.js +107 -0
- package/dist/lib/cards.js.map +1 -0
- package/dist/lib/clock.d.ts +5 -0
- package/dist/lib/clock.js +14 -0
- package/dist/lib/clock.js.map +1 -0
- package/dist/lib/cloud.d.ts +122 -0
- package/dist/lib/cloud.js +580 -0
- package/dist/lib/cloud.js.map +1 -0
- package/dist/lib/competitors.d.ts +28 -0
- package/dist/lib/competitors.js +90 -0
- package/dist/lib/competitors.js.map +1 -0
- package/dist/lib/config.d.ts +7 -0
- package/dist/lib/config.js +25 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/cron.d.ts +5 -0
- package/dist/lib/cron.js +82 -0
- package/dist/lib/cron.js.map +1 -0
- package/dist/lib/detect.d.ts +13 -0
- package/dist/lib/detect.js +60 -0
- package/dist/lib/detect.js.map +1 -0
- package/dist/lib/engine.d.ts +88 -0
- package/dist/lib/engine.js +435 -0
- package/dist/lib/engine.js.map +1 -0
- package/dist/lib/flow.d.ts +44 -0
- package/dist/lib/flow.js +121 -0
- package/dist/lib/flow.js.map +1 -0
- package/dist/lib/glob.d.ts +2 -0
- package/dist/lib/glob.js +10 -0
- package/dist/lib/glob.js.map +1 -0
- package/dist/lib/import.d.ts +13 -0
- package/dist/lib/import.js +127 -0
- package/dist/lib/import.js.map +1 -0
- package/dist/lib/inbox.d.ts +42 -0
- package/dist/lib/inbox.js +65 -0
- package/dist/lib/inbox.js.map +1 -0
- package/dist/lib/lane.d.ts +71 -0
- package/dist/lib/lane.js +105 -0
- package/dist/lib/lane.js.map +1 -0
- package/dist/lib/lock.d.ts +6 -0
- package/dist/lib/lock.js +64 -0
- package/dist/lib/lock.js.map +1 -0
- package/dist/lib/mcp.d.ts +2 -0
- package/dist/lib/mcp.js +57 -0
- package/dist/lib/mcp.js.map +1 -0
- package/dist/lib/mock.d.ts +17 -0
- package/dist/lib/mock.js +137 -0
- package/dist/lib/mock.js.map +1 -0
- package/dist/lib/pack.d.ts +24 -0
- package/dist/lib/pack.js +77 -0
- package/dist/lib/pack.js.map +1 -0
- package/dist/lib/proposals.d.ts +48 -0
- package/dist/lib/proposals.js +240 -0
- package/dist/lib/proposals.js.map +1 -0
- package/dist/lib/render.d.ts +7 -0
- package/dist/lib/render.js +84 -0
- package/dist/lib/render.js.map +1 -0
- package/dist/lib/research.d.ts +8 -0
- package/dist/lib/research.js +39 -0
- package/dist/lib/research.js.map +1 -0
- package/dist/lib/run.d.ts +38 -0
- package/dist/lib/run.js +215 -0
- package/dist/lib/run.js.map +1 -0
- package/dist/lib/scaffold.d.ts +16 -0
- package/dist/lib/scaffold.js +175 -0
- package/dist/lib/scaffold.js.map +1 -0
- package/dist/lib/scan.d.ts +22 -0
- package/dist/lib/scan.js +85 -0
- package/dist/lib/scan.js.map +1 -0
- package/dist/lib/schedule.d.ts +20 -0
- package/dist/lib/schedule.js +66 -0
- package/dist/lib/schedule.js.map +1 -0
- package/dist/lib/server.d.ts +68 -0
- package/dist/lib/server.js +235 -0
- package/dist/lib/server.js.map +1 -0
- package/dist/lib/shell.d.ts +1 -0
- package/dist/lib/shell.js +25 -0
- package/dist/lib/shell.js.map +1 -0
- package/dist/lib/skills.d.ts +20 -0
- package/dist/lib/skills.js +92 -0
- package/dist/lib/skills.js.map +1 -0
- package/dist/lib/spec.d.ts +24 -0
- package/dist/lib/spec.js +102 -0
- package/dist/lib/spec.js.map +1 -0
- package/dist/lib/stats.d.ts +13 -0
- package/dist/lib/stats.js +43 -0
- package/dist/lib/stats.js.map +1 -0
- package/dist/lib/verify.d.ts +25 -0
- package/dist/lib/verify.js +135 -0
- package/dist/lib/verify.js.map +1 -0
- package/dist/lib/version.d.ts +10 -0
- package/dist/lib/version.js +27 -0
- package/dist/lib/version.js.map +1 -0
- package/dist/lib/wiki.d.ts +51 -0
- package/dist/lib/wiki.js +164 -0
- package/dist/lib/wiki.js.map +1 -0
- package/dist/registry/index.d.ts +7 -0
- package/dist/registry/index.js +8 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/installer.d.ts +30 -0
- package/dist/registry/installer.js +133 -0
- package/dist/registry/installer.js.map +1 -0
- package/dist/registry/local-index.d.ts +32 -0
- package/dist/registry/local-index.js +58 -0
- package/dist/registry/local-index.js.map +1 -0
- package/dist/registry/lockfile.d.ts +40 -0
- package/dist/registry/lockfile.js +85 -0
- package/dist/registry/lockfile.js.map +1 -0
- package/dist/registry/security.d.ts +25 -0
- package/dist/registry/security.js +100 -0
- package/dist/registry/security.js.map +1 -0
- package/dist/registry/skill-schema.d.ts +30 -0
- package/dist/registry/skill-schema.js +95 -0
- package/dist/registry/skill-schema.js.map +1 -0
- package/dist/ui/404.html +1 -0
- package/dist/ui/_next/static/6wzGE5sCtbYkSyhMWxL32/_buildManifest.js +1 -0
- package/dist/ui/_next/static/6wzGE5sCtbYkSyhMWxL32/_ssgManifest.js +1 -0
- package/dist/ui/_next/static/chunks/255-54d3085ce94738a4.js +1 -0
- package/dist/ui/_next/static/chunks/423-bb541b7ae2733575.js +1 -0
- package/dist/ui/_next/static/chunks/4bd1b696-c023c6e3521b1417.js +1 -0
- package/dist/ui/_next/static/chunks/app/_not-found/page-d6bc774f7acb716e.js +1 -0
- package/dist/ui/_next/static/chunks/app/layout-e5fc8e78e1c8da95.js +1 -0
- package/dist/ui/_next/static/chunks/app/page-0c34b6e119cef236.js +1 -0
- package/dist/ui/_next/static/chunks/framework-de98b93a850cfc71.js +1 -0
- package/dist/ui/_next/static/chunks/main-49fd204fc9037ea3.js +1 -0
- package/dist/ui/_next/static/chunks/main-app-c46afa2f48f3aaef.js +1 -0
- package/dist/ui/_next/static/chunks/pages/_app-7d307437aca18ad4.js +1 -0
- package/dist/ui/_next/static/chunks/pages/_error-cb2a52f75f2162e2.js +1 -0
- package/dist/ui/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/dist/ui/_next/static/chunks/webpack-4a462cecab786e93.js +1 -0
- package/dist/ui/_next/static/css/1bf01240dbfd6088.css +1 -0
- package/dist/ui/index.html +1 -0
- package/dist/ui/index.txt +19 -0
- package/dist/watch/index.d.ts +21 -0
- package/dist/watch/index.js +88 -0
- package/dist/watch/index.js.map +1 -0
- package/dist/watch/reporter.d.ts +11 -0
- package/dist/watch/reporter.js +44 -0
- package/dist/watch/reporter.js.map +1 -0
- package/dist/watch/signals.d.ts +38 -0
- package/dist/watch/signals.js +119 -0
- package/dist/watch/signals.js.map +1 -0
- package/dist/watch/triggers.d.ts +10 -0
- package/dist/watch/triggers.js +67 -0
- package/dist/watch/triggers.js.map +1 -0
- package/package.json +64 -0
- package/registry/index.json +106 -0
- package/starters/generic.yaml +95 -0
- package/starters/go.yaml +99 -0
- package/starters/node-typescript.yaml +108 -0
- package/starters/python.yaml +105 -0
- package/templates/ci/codeloop-pr.yml +29 -0
- package/templates/ci/codeloop-prod.yml +27 -0
- package/templates/ci/codeloop-staging.yml +34 -0
- package/templates/codeloop/board.json +5 -0
- package/templates/codeloop/gotchas.md +13 -0
- package/templates/codeloop/patterns.md +15 -0
- package/templates/codeloop/principles.md +49 -0
- package/templates/codeloop/rules.md +23 -0
- package/templates/commands/commit.md +255 -0
- package/templates/commands/debug.md +142 -0
- package/templates/commands/deploy.md +144 -0
- package/templates/commands/design.md +102 -0
- package/templates/commands/manage.md +77 -0
- package/templates/commands/plan.md +84 -0
- package/templates/commands/qa.md +155 -0
- package/templates/commands/reflect.md +93 -0
- package/templates/commands/ship.md +187 -0
- package/templates/commands/test.md +133 -0
- package/templates/hooks/commit-msg +8 -0
- package/templates/lanes/analyze.yaml +25 -0
- package/templates/lanes/build.yaml +45 -0
- package/templates/lanes/deploy.yaml +24 -0
- package/templates/lanes/learn.yaml +20 -0
- package/templates/lanes/market.yaml +25 -0
- package/templates/lanes/plan.yaml +24 -0
- package/templates/lanes/scan.yaml +11 -0
- package/templates/lanes/triage.yaml +24 -0
- package/templates/mock/template.html +82 -0
- package/templates/seeds/go-gotchas.md +28 -0
- package/templates/seeds/go-patterns.md +22 -0
- package/templates/seeds/node-typescript-gotchas.md +30 -0
- package/templates/seeds/node-typescript-patterns.md +27 -0
- package/templates/seeds/python-gotchas.md +30 -0
- package/templates/seeds/python-patterns.md +19 -0
- package/templates/seeds/universal-gotchas.md +11 -0
- package/templates/seeds/universal-patterns.md +11 -0
- package/templates/spec/plan.md +7 -0
- package/templates/spec/research.md +19 -0
- package/templates/spec/spec.md +14 -0
- package/templates/spec/tasks.md +10 -0
- package/templates/tasks/todo.md +3 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Investigate production issues — search logs, check health, create regression tasks
|
|
3
|
+
argument-hint: [pattern] [--health] [--recent]
|
|
4
|
+
allowed-tools: Bash, Read, Write, Edit, Glob, Grep, AskUserQuestion
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- codeloop-version: 0.3.0 -->
|
|
8
|
+
|
|
9
|
+
# /debug
|
|
10
|
+
|
|
11
|
+
Investigate production issues using configured log and health commands.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
/debug # Check health + show recent errors
|
|
17
|
+
/debug <pattern> # Search logs for a specific pattern
|
|
18
|
+
/debug --health # Health check only
|
|
19
|
+
/debug --recent # Show recent log entries (last 50 lines)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Phase 1: Load Config
|
|
23
|
+
|
|
24
|
+
1. Read `.codeloop/config.yaml` — load the `debug` section:
|
|
25
|
+
```yaml
|
|
26
|
+
debug:
|
|
27
|
+
logs: "fly logs --app myapp"
|
|
28
|
+
health: "curl -sf https://myapp.fly.dev/health"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
2. If no `debug` section → stop with:
|
|
32
|
+
"No debug commands configured. Add them to `.codeloop/config.yaml` under `debug`."
|
|
33
|
+
|
|
34
|
+
3. Read `.codeloop/board.json` — find the active task for context
|
|
35
|
+
|
|
36
|
+
## Phase 2: Health Check
|
|
37
|
+
|
|
38
|
+
If `debug.health` is configured (always run unless `<pattern>` provided without `--health`):
|
|
39
|
+
|
|
40
|
+
1. Run the health command
|
|
41
|
+
2. Parse the response:
|
|
42
|
+
- Exit 0 + valid response → HEALTHY
|
|
43
|
+
- Non-zero exit or timeout → UNHEALTHY
|
|
44
|
+
3. Report:
|
|
45
|
+
```
|
|
46
|
+
**Health**: ✓ healthy (200 OK, 120ms)
|
|
47
|
+
```
|
|
48
|
+
or:
|
|
49
|
+
```
|
|
50
|
+
**Health**: ✗ unhealthy (connection refused)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Phase 3: Search Logs
|
|
54
|
+
|
|
55
|
+
### Default (no pattern)
|
|
56
|
+
|
|
57
|
+
Run `debug.logs` and capture the last 50 lines. Scan for common error patterns:
|
|
58
|
+
- `Error`, `ERROR`, `Exception`, `FATAL`
|
|
59
|
+
- Stack traces (indented lines starting with `at ` or `Traceback`)
|
|
60
|
+
- HTTP 5xx status codes
|
|
61
|
+
- Connection refused / timeout patterns
|
|
62
|
+
|
|
63
|
+
Summarize findings:
|
|
64
|
+
```
|
|
65
|
+
## Recent Errors (last 50 lines)
|
|
66
|
+
|
|
67
|
+
Found 3 error entries:
|
|
68
|
+
|
|
69
|
+
1. **TypeError: Cannot read property 'id' of undefined**
|
|
70
|
+
at src/auth/middleware.ts:42
|
|
71
|
+
Occurred 2x in last 50 lines
|
|
72
|
+
|
|
73
|
+
2. **MongoServerError: connection pool closed**
|
|
74
|
+
at node_modules/mongodb/...
|
|
75
|
+
Occurred 1x
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### With pattern
|
|
79
|
+
|
|
80
|
+
Run the `debug.logs` command and pipe through `grep` with the user's pattern:
|
|
81
|
+
```bash
|
|
82
|
+
fly logs --app myapp | grep "auth"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Show matching lines and context. Summarize:
|
|
86
|
+
- How many matches found
|
|
87
|
+
- Timestamps of first and last match
|
|
88
|
+
- Common patterns in matches
|
|
89
|
+
|
|
90
|
+
## Phase 4: Cross-Reference
|
|
91
|
+
|
|
92
|
+
If the active task has commits:
|
|
93
|
+
1. List recent commits from the task
|
|
94
|
+
2. Check if any error patterns correlate with recently changed files
|
|
95
|
+
3. Report correlations:
|
|
96
|
+
```
|
|
97
|
+
### Possible Correlation
|
|
98
|
+
|
|
99
|
+
Error in `src/auth/middleware.ts:42` — this file was modified in commit abc1234
|
|
100
|
+
("feat(auth): add token refresh") from the current task.
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Phase 5: Regression Task
|
|
104
|
+
|
|
105
|
+
If issues are found, use AskUserQuestion:
|
|
106
|
+
|
|
107
|
+
- **Create regression task** — add a new task to the board
|
|
108
|
+
- **Investigate further** — continue debugging with another pattern
|
|
109
|
+
- **No action** — acknowledge and stop
|
|
110
|
+
|
|
111
|
+
If creating a regression task:
|
|
112
|
+
1. Read `.codeloop/board.json`
|
|
113
|
+
2. Add a new task:
|
|
114
|
+
- Title: "Fix: <error summary>"
|
|
115
|
+
- Status: `backlog`
|
|
116
|
+
- Labels: `regression`, `env:prod-fail` (or appropriate env)
|
|
117
|
+
- Description: error details, log excerpt, and correlation info
|
|
118
|
+
3. Write updated board
|
|
119
|
+
4. Report: "Regression task t-XXX created on the board."
|
|
120
|
+
|
|
121
|
+
## Phase 6: Report
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
## Debug Summary
|
|
125
|
+
|
|
126
|
+
**Environment**: production
|
|
127
|
+
**Health**: ✓ healthy
|
|
128
|
+
**Errors found**: 3 in last 50 lines
|
|
129
|
+
**Pattern searched**: "auth"
|
|
130
|
+
**Matches**: 7 entries
|
|
131
|
+
|
|
132
|
+
### Action Taken
|
|
133
|
+
Created regression task t-005: "Fix: TypeError in auth middleware"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Rules
|
|
137
|
+
|
|
138
|
+
- **Read-only by default.** This skill investigates — it doesn't fix or deploy.
|
|
139
|
+
- **Respect rate limits.** Don't hammer log endpoints. One query per debug session unless the user asks for more.
|
|
140
|
+
- **Surface correlations, don't blame.** "This file was changed recently" ≠ "this commit caused the bug."
|
|
141
|
+
- **Create tasks, not panic.** Regressions get tracked on the board — systematic, not reactive.
|
|
142
|
+
- **Config is required.** Without debug commands in config, this skill can't do anything. Guide the user to set them up.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Deploy to staging or production with verification gates
|
|
3
|
+
argument-hint: <staging|prod> [--force]
|
|
4
|
+
allowed-tools: Bash, Read, Write, Edit, Glob, Grep, AskUserQuestion
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- codeloop-version: 0.3.0 -->
|
|
8
|
+
|
|
9
|
+
# /deploy
|
|
10
|
+
|
|
11
|
+
Deploy to staging or production with pre-deploy gates and post-deploy verification.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
/deploy staging # Deploy to staging + verify
|
|
17
|
+
/deploy prod # Deploy to production (requires staging pass)
|
|
18
|
+
/deploy staging --force # Skip pre-deploy gate check
|
|
19
|
+
/deploy prod --force # Skip staging requirement (use with caution)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Phase 1: Pre-Deploy Gate
|
|
23
|
+
|
|
24
|
+
1. Read `.codeloop/config.yaml` — load the `deploy` section:
|
|
25
|
+
```yaml
|
|
26
|
+
deploy:
|
|
27
|
+
staging:
|
|
28
|
+
command: "make deploy-staging"
|
|
29
|
+
verify: "make smoke-test-staging"
|
|
30
|
+
production:
|
|
31
|
+
command: "make deploy-prod"
|
|
32
|
+
verify: "make smoke-test-prod"
|
|
33
|
+
requires: staging
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
2. If no `deploy` section, no command for the target environment, or the command is an empty string → stop with:
|
|
37
|
+
"No deploy command configured for `<env>`. Add it to `.codeloop/config.yaml` under `deploy.<env>.command`."
|
|
38
|
+
**Important**: An empty string (`command: ""`) means "not configured" — do NOT execute it.
|
|
39
|
+
|
|
40
|
+
3. Read `.codeloop/board.json` — find the active task
|
|
41
|
+
|
|
42
|
+
4. **Gate checks** (skip with `--force`):
|
|
43
|
+
- For `staging`: task must have `env:local-pass` label (set by `/qa`)
|
|
44
|
+
- For `prod`: task must have `env:staging-pass` label AND the `production.requires` field is checked
|
|
45
|
+
- If gate fails → show what's missing and stop
|
|
46
|
+
|
|
47
|
+
5. Show the deploy plan and confirm:
|
|
48
|
+
```
|
|
49
|
+
## Deploy Plan
|
|
50
|
+
|
|
51
|
+
**Target**: staging
|
|
52
|
+
**Task**: t-003 — Add user authentication
|
|
53
|
+
**Command**: make deploy-staging
|
|
54
|
+
**Verify**: make smoke-test-staging
|
|
55
|
+
|
|
56
|
+
Proceed?
|
|
57
|
+
```
|
|
58
|
+
Use AskUserQuestion: **Deploy** / **Abort**
|
|
59
|
+
|
|
60
|
+
## Phase 2: Deploy
|
|
61
|
+
|
|
62
|
+
1. Run the deploy command from config
|
|
63
|
+
2. Capture stdout/stderr
|
|
64
|
+
3. If command exits non-zero → report failure and stop:
|
|
65
|
+
```
|
|
66
|
+
## Deploy Failed
|
|
67
|
+
|
|
68
|
+
**Target**: staging
|
|
69
|
+
**Exit code**: 1
|
|
70
|
+
**Output**: (last 30 lines)
|
|
71
|
+
...
|
|
72
|
+
|
|
73
|
+
Deploy aborted. Fix the issue and retry with `/deploy staging`.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Phase 3: Verify
|
|
77
|
+
|
|
78
|
+
If a `verify` command is configured for this environment:
|
|
79
|
+
|
|
80
|
+
1. Wait 5 seconds for the deployment to stabilize (configurable services may need warm-up)
|
|
81
|
+
2. Run the verify command
|
|
82
|
+
3. If verify exits non-zero → report failure:
|
|
83
|
+
```
|
|
84
|
+
## Verification Failed
|
|
85
|
+
|
|
86
|
+
**Target**: staging
|
|
87
|
+
**Deploy**: succeeded
|
|
88
|
+
**Verify**: FAILED
|
|
89
|
+
**Output**: (last 30 lines)
|
|
90
|
+
...
|
|
91
|
+
|
|
92
|
+
The deployment succeeded but verification failed.
|
|
93
|
+
Check the verify command output and re-run `/deploy staging` after fixing.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
If no verify command → skip verification, report deploy-only result.
|
|
97
|
+
|
|
98
|
+
## Phase 4: Board Sync
|
|
99
|
+
|
|
100
|
+
On successful deploy + verify:
|
|
101
|
+
|
|
102
|
+
1. Update the active task in `.codeloop/board.json`:
|
|
103
|
+
- For staging: add label `env:staging-pass`, remove any `env:staging-fail`
|
|
104
|
+
- For prod: add label `env:prod-pass`, remove any `env:prod-fail`
|
|
105
|
+
- Write updated board
|
|
106
|
+
|
|
107
|
+
2. On failure:
|
|
108
|
+
- Add label `env:staging-fail` or `env:prod-fail`
|
|
109
|
+
- Write updated board
|
|
110
|
+
|
|
111
|
+
## Phase 5: Report
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
## Deploy Complete
|
|
115
|
+
|
|
116
|
+
**Target**: staging
|
|
117
|
+
**Task**: t-003 — Add user authentication
|
|
118
|
+
**Deploy**: ✓ succeeded
|
|
119
|
+
**Verify**: ✓ passed
|
|
120
|
+
**Label**: env:staging-pass
|
|
121
|
+
|
|
122
|
+
Next: `/deploy prod` when ready.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Or for production:
|
|
126
|
+
```
|
|
127
|
+
## Deploy Complete
|
|
128
|
+
|
|
129
|
+
**Target**: production
|
|
130
|
+
**Task**: t-003 — Add user authentication
|
|
131
|
+
**Deploy**: ✓ succeeded
|
|
132
|
+
**Verify**: ✓ passed
|
|
133
|
+
**Label**: env:prod-pass
|
|
134
|
+
|
|
135
|
+
Task is production-verified. Close with `/manage close` or `/ship`.
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Rules
|
|
139
|
+
|
|
140
|
+
- **Never deploy without confirmation.** Always show the plan and ask.
|
|
141
|
+
- **Respect the gate chain.** `local-pass` → `staging-pass` → `prod-pass`. Don't skip stages without `--force`.
|
|
142
|
+
- **`--force` is tracked.** If used, add a `deploy:forced` label to the task — visible on the board.
|
|
143
|
+
- **Verify is not optional.** If a verify command is configured, it runs. Failures are reported even though the deploy succeeded.
|
|
144
|
+
- **This skill runs commands — it doesn't know your infra.** The user is responsible for configuring correct deploy and verify commands.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Architecture before code — generate lightweight spec from codebase analysis
|
|
3
|
+
argument-hint: [description]
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep, AskUserQuestion, EnterPlanMode
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- codeloop-version: 0.3.0 -->
|
|
8
|
+
|
|
9
|
+
# /design
|
|
10
|
+
|
|
11
|
+
Understand a codebase and generate an architectural spec before planning implementation.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
/design # Analyze current project, prompt for focus area
|
|
17
|
+
/design <description> # Generate spec for a specific feature or change
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Phase 1: Discover
|
|
21
|
+
|
|
22
|
+
1. Read `.codeloop/config.yaml` for project context (scopes, structure)
|
|
23
|
+
2. Scan the project structure — identify key directories, entry points, and config files:
|
|
24
|
+
- Package managers: `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`
|
|
25
|
+
- Framework configs: `next.config.*`, `vite.config.*`, `tsconfig.json`, `Dockerfile`
|
|
26
|
+
- Entry points: `src/index.*`, `src/main.*`, `cmd/`, `app/`
|
|
27
|
+
3. Identify the tech stack, dependencies, and architectural patterns already in use
|
|
28
|
+
4. Read `.codeloop/patterns.md` for established patterns
|
|
29
|
+
5. Read `.codeloop/gotchas.md` for known pitfalls
|
|
30
|
+
|
|
31
|
+
## Phase 2: Analyze
|
|
32
|
+
|
|
33
|
+
Based on the task description, deep-dive into the relevant parts of the codebase:
|
|
34
|
+
|
|
35
|
+
1. Map the modules and their boundaries (imports, exports, interfaces)
|
|
36
|
+
2. Identify data flow — how data moves through the system
|
|
37
|
+
3. Find integration points — where the new work connects to existing code
|
|
38
|
+
4. Check for existing abstractions that should be reused vs. new ones needed
|
|
39
|
+
5. Note any constraints (framework conventions, dependency versions, API contracts)
|
|
40
|
+
|
|
41
|
+
## Phase 3: Spec
|
|
42
|
+
|
|
43
|
+
Write the design spec to `tasks/design-<slug>.md`:
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
# Design: <title>
|
|
47
|
+
|
|
48
|
+
## Goals
|
|
49
|
+
- <What this achieves for the user>
|
|
50
|
+
- <What this achieves technically>
|
|
51
|
+
|
|
52
|
+
## Approach
|
|
53
|
+
<High-level strategy — 2-3 sentences max>
|
|
54
|
+
|
|
55
|
+
## Architecture
|
|
56
|
+
|
|
57
|
+
### Current State
|
|
58
|
+
<Brief description of how the relevant parts work today>
|
|
59
|
+
|
|
60
|
+
### Proposed Changes
|
|
61
|
+
<What changes and why>
|
|
62
|
+
|
|
63
|
+
### Files to Change
|
|
64
|
+
| File | Change | Rationale |
|
|
65
|
+
|------|--------|-----------|
|
|
66
|
+
| `path/to/file.ts` | Add X | Because Y |
|
|
67
|
+
|
|
68
|
+
### New Files (if any)
|
|
69
|
+
| File | Purpose |
|
|
70
|
+
|------|---------|
|
|
71
|
+
| `path/to/new.ts` | Description |
|
|
72
|
+
|
|
73
|
+
## Risks
|
|
74
|
+
- <Risk 1 — and mitigation>
|
|
75
|
+
- <Risk 2 — and mitigation>
|
|
76
|
+
|
|
77
|
+
## Alternatives Considered
|
|
78
|
+
- <Alternative 1 — why rejected>
|
|
79
|
+
|
|
80
|
+
## Dependencies
|
|
81
|
+
- <External libs, APIs, or services needed>
|
|
82
|
+
|
|
83
|
+
## Open Questions
|
|
84
|
+
- <Anything that needs clarification before implementation>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Phase 4: Board Sync
|
|
88
|
+
|
|
89
|
+
If `.codeloop/board.json` exists:
|
|
90
|
+
1. Read the board
|
|
91
|
+
2. Create a new task with `status: "planned"` and title matching the design
|
|
92
|
+
3. Add steps derived from the "Files to Change" section
|
|
93
|
+
4. Write the updated board back
|
|
94
|
+
|
|
95
|
+
## Rules
|
|
96
|
+
|
|
97
|
+
- **Don't write code.** This is analysis and specification only.
|
|
98
|
+
- **Keep it lightweight.** The spec should fit on one screen — if it's longer, the scope is too big.
|
|
99
|
+
- **Flag unknowns.** If you're not sure about something, put it in Open Questions rather than guessing.
|
|
100
|
+
- **Reuse patterns.** If `.codeloop/patterns.md` has a relevant pattern, reference it — don't reinvent.
|
|
101
|
+
- **One spec per feature.** Don't combine unrelated changes into one design doc.
|
|
102
|
+
- **Next step: `/plan`** — after the design is written, run `/plan` to create the implementation plan. `/plan` will read the design spec automatically.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Track task progress — read/update tasks/todo.md
|
|
3
|
+
allowed-tools: Read, Write, Edit, Glob, Grep, AskUserQuestion
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- codeloop-version: 0.3.0 -->
|
|
7
|
+
|
|
8
|
+
# /manage
|
|
9
|
+
|
|
10
|
+
Track progress on the current task. Read and update `tasks/todo.md`.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
/manage # Show current task status
|
|
16
|
+
/manage done <n> # Mark step N as complete
|
|
17
|
+
/manage add <step> # Add a new step
|
|
18
|
+
/manage close # Mark task as done (moves to Done column)
|
|
19
|
+
/manage summary # Generate progress summary
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## How It Works
|
|
23
|
+
|
|
24
|
+
### Show Status (default)
|
|
25
|
+
|
|
26
|
+
1. Read `tasks/todo.md`
|
|
27
|
+
2. Show:
|
|
28
|
+
- Task title and context
|
|
29
|
+
- Checklist with completion status
|
|
30
|
+
- Next uncompleted step highlighted
|
|
31
|
+
|
|
32
|
+
### Mark Complete (`done <n>`)
|
|
33
|
+
|
|
34
|
+
1. Read `tasks/todo.md`
|
|
35
|
+
2. Change step N from `- [ ]` to `- [x]`
|
|
36
|
+
3. **Board sync** — if `.codeloop/board.json` exists:
|
|
37
|
+
- Read the board JSON
|
|
38
|
+
- Find the matching task: search by exact title from `tasks/todo.md`'s `# Task:` heading. If no exact match, use the first task with status `planned`, `in_progress`, or `backlog` (in that priority order)
|
|
39
|
+
- If no task found, warn: "Board sync skipped — no matching task found in board.json"
|
|
40
|
+
- Update the corresponding step's `done` field to `true`
|
|
41
|
+
- Update task status based on progress:
|
|
42
|
+
- First step marked done → set status to `in_progress`
|
|
43
|
+
- All steps marked done → set status to `review`
|
|
44
|
+
- Write the updated board back to `.codeloop/board.json`
|
|
45
|
+
4. If all steps complete, show completion summary
|
|
46
|
+
|
|
47
|
+
### Close Task (`close`)
|
|
48
|
+
|
|
49
|
+
1. Read `tasks/todo.md` — verify all steps are `- [x]` (complete)
|
|
50
|
+
2. If steps remain incomplete, warn: "N steps still unchecked — close anyway?" (use AskUserQuestion)
|
|
51
|
+
3. **Board sync** — if `.codeloop/board.json` exists:
|
|
52
|
+
- Find the matching task (same lookup as `done <n>`)
|
|
53
|
+
- Set task status to `done`
|
|
54
|
+
- Write the updated board back to `.codeloop/board.json`
|
|
55
|
+
4. Archive: rename `tasks/todo.md` to `tasks/done/<title-slug>.md` (create dir if needed)
|
|
56
|
+
5. Show: "Task closed. Board updated."
|
|
57
|
+
|
|
58
|
+
### Add Step (`add <step>`)
|
|
59
|
+
|
|
60
|
+
1. Read `tasks/todo.md`
|
|
61
|
+
2. Append new step to the plan
|
|
62
|
+
3. Show updated checklist
|
|
63
|
+
|
|
64
|
+
### Summary (`summary`)
|
|
65
|
+
|
|
66
|
+
Generate a concise summary of:
|
|
67
|
+
- What's done
|
|
68
|
+
- What's remaining
|
|
69
|
+
- Any blockers or gotchas encountered
|
|
70
|
+
- Time/effort estimate for remaining work
|
|
71
|
+
|
|
72
|
+
## Rules
|
|
73
|
+
|
|
74
|
+
- **tasks/todo.md is the source of truth.** All task state lives here.
|
|
75
|
+
- **Update as you go.** Don't wait until the end to mark things complete.
|
|
76
|
+
- **Be honest about blockers.** If stuck, say so in the summary.
|
|
77
|
+
- **Verify before marking done.** Each step should have evidence of completion.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Plan a task — write spec to tasks/todo.md, enter plan mode
|
|
3
|
+
allowed-tools: Read, Write, Edit, Glob, Grep, AskUserQuestion, EnterPlanMode
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- codeloop-version: 0.3.0 -->
|
|
7
|
+
|
|
8
|
+
# /plan
|
|
9
|
+
|
|
10
|
+
Plan before building. Write specs to `tasks/todo.md`, get approval, then execute.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
/plan # Start planning (enter plan mode)
|
|
16
|
+
/plan <description> # Plan a specific task
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Phase 1: Understand
|
|
20
|
+
|
|
21
|
+
1. Read the task description (from argument or ask the user)
|
|
22
|
+
2. Check for an existing design spec in `tasks/design-*.md` — if one exists for this task, use it as the starting point (goals, approach, files to change, risks)
|
|
23
|
+
3. Read `.codeloop/config.yaml` for project context (scopes, conventions)
|
|
24
|
+
4. Read `.codeloop/gotchas.md` — scan for relevant gotchas that could affect the plan
|
|
25
|
+
5. Read `.codeloop/patterns.md` — check for established patterns to follow
|
|
26
|
+
|
|
27
|
+
## Phase 2: Plan
|
|
28
|
+
|
|
29
|
+
Enter plan mode and explore the codebase:
|
|
30
|
+
|
|
31
|
+
1. Identify affected files and modules
|
|
32
|
+
2. Check for existing patterns that should be followed
|
|
33
|
+
3. Consider gotchas that apply to the planned changes
|
|
34
|
+
4. Write the plan to `tasks/todo.md` using test-first structure:
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
# Task: <title>
|
|
38
|
+
|
|
39
|
+
## Context
|
|
40
|
+
<Why this task exists, what problem it solves>
|
|
41
|
+
|
|
42
|
+
## Acceptance Criteria
|
|
43
|
+
- <criterion 1 — what must be true when done>
|
|
44
|
+
- <criterion 2>
|
|
45
|
+
|
|
46
|
+
## Tests (RED)
|
|
47
|
+
Define failing tests before writing implementation code:
|
|
48
|
+
- <test case 1>
|
|
49
|
+
- <test case 2>
|
|
50
|
+
|
|
51
|
+
## Plan
|
|
52
|
+
- [ ] Step 1: Write tests for acceptance criteria (RED)
|
|
53
|
+
- [ ] Step 2: Write minimum code to pass tests (GREEN)
|
|
54
|
+
- [ ] Step 3: Refactor while tests stay green
|
|
55
|
+
- [ ] ...
|
|
56
|
+
|
|
57
|
+
## Gotchas to Watch
|
|
58
|
+
- <relevant gotchas from .codeloop/gotchas.md>
|
|
59
|
+
|
|
60
|
+
## Files to Change
|
|
61
|
+
- `path/to/file.ts` — <what changes>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
5. **Board sync** — if `.codeloop/board.json` exists, create a task on the board:
|
|
65
|
+
- Read `.codeloop/board.json`
|
|
66
|
+
- Add a new task with `status: "planned"`, title matching the plan title, and steps matching the plan checklist
|
|
67
|
+
- Write the updated board back to `.codeloop/board.json`
|
|
68
|
+
|
|
69
|
+
6. Exit plan mode for user approval
|
|
70
|
+
|
|
71
|
+
## Phase 3: Execute
|
|
72
|
+
|
|
73
|
+
After approval, work through the plan:
|
|
74
|
+
|
|
75
|
+
1. Mark each step as you complete it (update `tasks/todo.md`)
|
|
76
|
+
2. If the plan needs adjustment, update it and explain why
|
|
77
|
+
3. Verify each step works before moving to the next
|
|
78
|
+
|
|
79
|
+
## Rules
|
|
80
|
+
|
|
81
|
+
- **3+ steps = always plan first.** Don't wing it.
|
|
82
|
+
- **Stop and re-plan if things go sideways.** The plan is a living document.
|
|
83
|
+
- **Staff engineer bar.** Before marking complete: "Would a staff engineer approve this?"
|
|
84
|
+
- **Gotchas are warnings.** Check `.codeloop/gotchas.md` before each risky step.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Quality gate — run all checks before promoting a task
|
|
3
|
+
argument-hint: [--strict] [--skip-tests]
|
|
4
|
+
allowed-tools: Bash, Read, Write, Edit, Glob, Grep, AskUserQuestion
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- codeloop-version: 0.3.0 -->
|
|
8
|
+
|
|
9
|
+
# /qa
|
|
10
|
+
|
|
11
|
+
The quality gate between coding and deployment. Runs all configured checks and gates task promotion.
|
|
12
|
+
|
|
13
|
+
> **When to use `/qa` vs `/test`**: `/test` is for quick dev feedback — run a suite, check coverage, iterate. `/qa` is the formal gate — it runs everything (`quality_checks` + `diff_scan` + full test suite + coverage threshold + integrity checks) and sets the `env:local-pass` label that unlocks `/deploy staging`. Use `/qa` when the task is code-complete and ready for promotion.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
/qa # Run full QA suite for active task
|
|
19
|
+
/qa --strict # Fail on warnings too (not just errors)
|
|
20
|
+
/qa --skip-tests # Skip test suite (only run static checks)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Phase 1: Gather Context
|
|
24
|
+
|
|
25
|
+
1. Read `.codeloop/config.yaml` — load `test`, `quality_checks`, `diff_scan` sections
|
|
26
|
+
2. Read `.codeloop/board.json` — find the active task (first `in_progress`, then `planned`)
|
|
27
|
+
3. Get the git diff since the task started:
|
|
28
|
+
- If the task has commits, diff from the first commit to HEAD
|
|
29
|
+
- If no commits yet, diff from HEAD (unstaged + staged changes)
|
|
30
|
+
4. Map changed files to scopes (same logic as `/commit` Phase 1)
|
|
31
|
+
|
|
32
|
+
## Phase 2: Run Checks
|
|
33
|
+
|
|
34
|
+
Execute each check category in order. A failure in any REQUIRED check blocks promotion.
|
|
35
|
+
|
|
36
|
+
### 2.1 Static Analysis
|
|
37
|
+
|
|
38
|
+
Run `quality_checks` from config for active scopes:
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
quality_checks:
|
|
42
|
+
backend:
|
|
43
|
+
- name: "Typecheck"
|
|
44
|
+
command: "npx tsc --noEmit 2>&1 | tail -20"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Each check: run command, capture output, exit 0 = PASS, non-zero = FAIL.
|
|
48
|
+
|
|
49
|
+
### 2.2 Diff Scan
|
|
50
|
+
|
|
51
|
+
Run `diff_scan` rules from config against the diff (same as `/commit` Phase 1.5):
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
diff_scan:
|
|
55
|
+
- pattern: "console\\.log"
|
|
56
|
+
files: "*.ts,*.js"
|
|
57
|
+
severity: CRITICAL
|
|
58
|
+
message: "console.log in production code"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 2.3 Test Suite
|
|
62
|
+
|
|
63
|
+
Run the test command from config (same as `/test`):
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
test:
|
|
67
|
+
command: "npm test"
|
|
68
|
+
coverage_threshold: 80
|
|
69
|
+
integrity_checks: true
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Parse results: pass/fail/skip counts and coverage percentage.
|
|
73
|
+
|
|
74
|
+
If `integrity_checks: true`, scan test output for suspicious patterns:
|
|
75
|
+
- Tests with zero assertions
|
|
76
|
+
- `expect(true).toBe(true)` or equivalent no-op assertions
|
|
77
|
+
- Skipped tests (`.skip`, `@pytest.mark.skip`) — count but don't fail
|
|
78
|
+
- Caught exceptions that are silently swallowed
|
|
79
|
+
|
|
80
|
+
### 2.4 Coverage Gate
|
|
81
|
+
|
|
82
|
+
If `test.coverage_threshold` is set:
|
|
83
|
+
- Coverage >= threshold → PASS
|
|
84
|
+
- Coverage < threshold → FAIL with gap report
|
|
85
|
+
|
|
86
|
+
Pass `--skip-tests` to bypass 2.3 and 2.4 (only run static checks).
|
|
87
|
+
|
|
88
|
+
## Phase 3: Report
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
## QA Report
|
|
92
|
+
|
|
93
|
+
**Task**: t-003 — Add user authentication
|
|
94
|
+
**Scopes**: backend, tests
|
|
95
|
+
**Mode**: standard (--strict would fail on warnings too)
|
|
96
|
+
|
|
97
|
+
### Results
|
|
98
|
+
|
|
99
|
+
| Check | Status | Details |
|
|
100
|
+
|-------|--------|---------|
|
|
101
|
+
| Typecheck | ✓ PASS | Clean |
|
|
102
|
+
| Lint | ✓ PASS | Clean |
|
|
103
|
+
| Diff scan | ⚠ WARN | 1 TODO comment found |
|
|
104
|
+
| Tests | ✓ PASS | 42/42 passed (3.2s) |
|
|
105
|
+
| Coverage | ✓ PASS | 84% (threshold: 80%) |
|
|
106
|
+
| Integrity | ✓ PASS | No suspicious patterns |
|
|
107
|
+
|
|
108
|
+
### Verdict: PASS (1 warning)
|
|
109
|
+
|
|
110
|
+
Ready to promote to review.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Verdicts:
|
|
114
|
+
- **PASS** — all required checks pass, warnings are informational
|
|
115
|
+
- **WARN** — warnings present but no failures (blocked in `--strict` mode)
|
|
116
|
+
- **FAIL** — one or more required checks failed, promotion blocked
|
|
117
|
+
|
|
118
|
+
### On FAIL
|
|
119
|
+
|
|
120
|
+
Show each failure with details:
|
|
121
|
+
- What failed and why
|
|
122
|
+
- The specific output or pattern that triggered it
|
|
123
|
+
- Suggestion for how to fix
|
|
124
|
+
|
|
125
|
+
Use AskUserQuestion:
|
|
126
|
+
- **Fix issues** — stop, user fixes and re-runs `/qa`
|
|
127
|
+
- **Override and promote** — bypass the gate (adds `qa:override` label)
|
|
128
|
+
- **Abort** — stop entirely
|
|
129
|
+
|
|
130
|
+
### On PASS
|
|
131
|
+
|
|
132
|
+
Continue to Phase 4.
|
|
133
|
+
|
|
134
|
+
## Phase 4: Promote
|
|
135
|
+
|
|
136
|
+
If all checks pass (or user overrides):
|
|
137
|
+
|
|
138
|
+
1. **Board sync** — update the active task:
|
|
139
|
+
- Set status to `review`
|
|
140
|
+
- Add label: `env:local-pass`
|
|
141
|
+
- Add label: `qa:pass` (or `qa:override` if overridden)
|
|
142
|
+
- Remove any existing `qa:fail` label
|
|
143
|
+
- Write updated board
|
|
144
|
+
|
|
145
|
+
2. **History** — append to `.codeloop/test-history.json` if tests were run
|
|
146
|
+
|
|
147
|
+
3. Report: "Task t-003 promoted to review. Ready for `/deploy staging`."
|
|
148
|
+
|
|
149
|
+
## Rules
|
|
150
|
+
|
|
151
|
+
- **The gate is the contract.** `/qa` is what prevents "it works on my machine."
|
|
152
|
+
- **Don't skip tests unless asked.** The `--skip-tests` flag exists for iteration speed, not for cheating.
|
|
153
|
+
- **Warnings are informational in standard mode.** They don't block unless `--strict`.
|
|
154
|
+
- **Override is tracked.** `qa:override` label is visible on the board — it's a code smell, not a secret.
|
|
155
|
+
- **Run before every deploy.** `/deploy` checks for the `env:local-pass` label.
|