@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,108 @@
|
|
|
1
|
+
# Codeloop Configuration
|
|
2
|
+
# Node.js + TypeScript starter
|
|
3
|
+
|
|
4
|
+
project:
|
|
5
|
+
name: "my-project"
|
|
6
|
+
|
|
7
|
+
scopes:
|
|
8
|
+
backend:
|
|
9
|
+
paths: ["src/**", "lib/**"]
|
|
10
|
+
gotcha_sections: ["Backend", "Database", "API"]
|
|
11
|
+
pattern_sections: ["Backend", "API", "Error Handling"]
|
|
12
|
+
frontend:
|
|
13
|
+
paths: ["app/**", "components/**", "pages/**"]
|
|
14
|
+
gotcha_sections: ["Frontend", "React"]
|
|
15
|
+
pattern_sections: ["Frontend", "Components"]
|
|
16
|
+
tests:
|
|
17
|
+
paths: ["**/*.test.*", "**/*.spec.*", "__tests__/**"]
|
|
18
|
+
gotcha_sections: ["Testing"]
|
|
19
|
+
pattern_sections: ["Testing"]
|
|
20
|
+
config:
|
|
21
|
+
paths: [".github/**", "Dockerfile*", "docker-compose*", "*.config.*"]
|
|
22
|
+
gotcha_sections: ["CI", "Config"]
|
|
23
|
+
pattern_sections: ["CI"]
|
|
24
|
+
|
|
25
|
+
quality_checks:
|
|
26
|
+
backend:
|
|
27
|
+
- name: "Typecheck"
|
|
28
|
+
command: "npx tsc --noEmit 2>&1 | tail -20"
|
|
29
|
+
frontend:
|
|
30
|
+
- name: "Typecheck"
|
|
31
|
+
command: "npx tsc --noEmit 2>&1 | tail -20"
|
|
32
|
+
|
|
33
|
+
diff_scan:
|
|
34
|
+
- pattern: "console\\.log"
|
|
35
|
+
files: "*.ts,*.tsx,*.js,*.jsx"
|
|
36
|
+
exclude: "*.test.*,*.spec.*"
|
|
37
|
+
severity: CRITICAL
|
|
38
|
+
message: "console.log in production code"
|
|
39
|
+
- pattern: "\\.env"
|
|
40
|
+
files: "*"
|
|
41
|
+
severity: CRITICAL
|
|
42
|
+
message: ".env file should not be committed"
|
|
43
|
+
- pattern: "any\\b"
|
|
44
|
+
files: "*.ts,*.tsx"
|
|
45
|
+
exclude: "*.test.*,*.spec.*,*.d.ts"
|
|
46
|
+
severity: WARNING
|
|
47
|
+
message: "Explicit 'any' type — consider a specific type"
|
|
48
|
+
|
|
49
|
+
# Testing — used by /test and /qa
|
|
50
|
+
test:
|
|
51
|
+
command: "npm test"
|
|
52
|
+
coverage_threshold: 80
|
|
53
|
+
integrity_checks: true
|
|
54
|
+
|
|
55
|
+
# Deployment — used by /deploy and /ship
|
|
56
|
+
# Uncomment and fill in your deploy commands:
|
|
57
|
+
# deploy:
|
|
58
|
+
# staging:
|
|
59
|
+
# command: "make deploy-staging" # or "vercel --env preview"
|
|
60
|
+
# verify: "curl -sf https://staging.example.com/health"
|
|
61
|
+
# production:
|
|
62
|
+
# command: "make deploy-prod" # or "vercel --prod"
|
|
63
|
+
# verify: "curl -sf https://example.com/health"
|
|
64
|
+
# requires: staging
|
|
65
|
+
|
|
66
|
+
# Debugging — used by /debug
|
|
67
|
+
# Uncomment and fill in your log/health commands:
|
|
68
|
+
# debug:
|
|
69
|
+
# logs: "fly logs --app myapp" # or "vercel logs"
|
|
70
|
+
# health: "curl -sf https://example.com/health"
|
|
71
|
+
|
|
72
|
+
commit:
|
|
73
|
+
types: [feat, fix, refactor, docs, test, chore, perf]
|
|
74
|
+
format: "type(scope): message"
|
|
75
|
+
|
|
76
|
+
# Watch mode — used by `codeloop watch`
|
|
77
|
+
watch:
|
|
78
|
+
enabled: true
|
|
79
|
+
idle_timeout: 300
|
|
80
|
+
signals:
|
|
81
|
+
file_change: true
|
|
82
|
+
git_commit: true
|
|
83
|
+
test_result: true
|
|
84
|
+
build_status: true
|
|
85
|
+
idle: true
|
|
86
|
+
ignore:
|
|
87
|
+
- node_modules
|
|
88
|
+
- dist
|
|
89
|
+
- .git
|
|
90
|
+
- "*.log"
|
|
91
|
+
|
|
92
|
+
# Unattended runs — used by `codeloop run --agent` and `codeloop schedule install`.
|
|
93
|
+
# The command gets the stage brief; {brief} becomes the shell-quoted path to it.
|
|
94
|
+
# agents:
|
|
95
|
+
# default: claude
|
|
96
|
+
# claude:
|
|
97
|
+
# cmd: "claude -p --permission-mode acceptEdits < {brief}"
|
|
98
|
+
# timeout_minutes: 20 # the agent is killed after this
|
|
99
|
+
# max_runs_per_day: 20 # agent starts across the project in any 24 hours
|
|
100
|
+
# codex:
|
|
101
|
+
# cmd: "codex exec - < {brief}"
|
|
102
|
+
# run:
|
|
103
|
+
# agent: true # plain `codeloop run` starts agents too
|
|
104
|
+
|
|
105
|
+
codeloop:
|
|
106
|
+
critical_frequency: 3
|
|
107
|
+
promote_frequency: 10
|
|
108
|
+
max_knowledge_lines: 200
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Codeloop Configuration
|
|
2
|
+
# Python starter
|
|
3
|
+
|
|
4
|
+
project:
|
|
5
|
+
name: "my-project"
|
|
6
|
+
|
|
7
|
+
scopes:
|
|
8
|
+
backend:
|
|
9
|
+
paths: ["src/**", "app/**", "lib/**"]
|
|
10
|
+
gotcha_sections: ["Backend", "Database", "API"]
|
|
11
|
+
pattern_sections: ["Backend", "API"]
|
|
12
|
+
tests:
|
|
13
|
+
paths: ["tests/**", "**/*_test.py", "**/test_*.py"]
|
|
14
|
+
gotcha_sections: ["Testing"]
|
|
15
|
+
pattern_sections: ["Testing"]
|
|
16
|
+
config:
|
|
17
|
+
paths: [".github/**", "Dockerfile*", "docker-compose*", "pyproject.toml", "setup.py"]
|
|
18
|
+
gotcha_sections: ["CI", "Config"]
|
|
19
|
+
pattern_sections: ["CI"]
|
|
20
|
+
|
|
21
|
+
quality_checks:
|
|
22
|
+
backend:
|
|
23
|
+
- name: "Type check"
|
|
24
|
+
command: "mypy src/ 2>&1 | tail -20"
|
|
25
|
+
- name: "Lint"
|
|
26
|
+
command: "ruff check src/ 2>&1 | tail -20"
|
|
27
|
+
|
|
28
|
+
diff_scan:
|
|
29
|
+
- pattern: "print\\("
|
|
30
|
+
files: "*.py"
|
|
31
|
+
exclude: "test_*,*_test.py,conftest.py"
|
|
32
|
+
severity: WARNING
|
|
33
|
+
message: "print() in production code — use logging"
|
|
34
|
+
- pattern: "import pdb"
|
|
35
|
+
files: "*.py"
|
|
36
|
+
severity: CRITICAL
|
|
37
|
+
message: "Debugger import left in code"
|
|
38
|
+
- pattern: "\\.env"
|
|
39
|
+
files: "*"
|
|
40
|
+
severity: CRITICAL
|
|
41
|
+
message: ".env file should not be committed"
|
|
42
|
+
|
|
43
|
+
# Testing — used by /test and /qa
|
|
44
|
+
test:
|
|
45
|
+
command: "pytest"
|
|
46
|
+
coverage_threshold: 80
|
|
47
|
+
integrity_checks: true
|
|
48
|
+
|
|
49
|
+
# Deployment — used by /deploy and /ship
|
|
50
|
+
# Uncomment and fill in your deploy commands:
|
|
51
|
+
# deploy:
|
|
52
|
+
# staging:
|
|
53
|
+
# command: "make deploy-staging"
|
|
54
|
+
# verify: "curl -sf https://staging.example.com/health"
|
|
55
|
+
# production:
|
|
56
|
+
# command: "make deploy-prod"
|
|
57
|
+
# verify: "curl -sf https://example.com/health"
|
|
58
|
+
# requires: staging
|
|
59
|
+
|
|
60
|
+
# Debugging — used by /debug
|
|
61
|
+
# Uncomment and fill in your log/health commands:
|
|
62
|
+
# debug:
|
|
63
|
+
# logs: "journalctl -u myapp --no-pager -n 50"
|
|
64
|
+
# health: "curl -sf https://example.com/health"
|
|
65
|
+
|
|
66
|
+
commit:
|
|
67
|
+
types: [feat, fix, refactor, docs, test, chore, perf]
|
|
68
|
+
format: "type(scope): message"
|
|
69
|
+
|
|
70
|
+
# Watch mode — used by `codeloop watch`
|
|
71
|
+
watch:
|
|
72
|
+
enabled: true
|
|
73
|
+
idle_timeout: 300
|
|
74
|
+
signals:
|
|
75
|
+
file_change: true
|
|
76
|
+
git_commit: true
|
|
77
|
+
test_result: true
|
|
78
|
+
build_status: true
|
|
79
|
+
idle: true
|
|
80
|
+
ignore:
|
|
81
|
+
- __pycache__
|
|
82
|
+
- .venv
|
|
83
|
+
- venv
|
|
84
|
+
- dist
|
|
85
|
+
- .git
|
|
86
|
+
- "*.log"
|
|
87
|
+
- "*.pyc"
|
|
88
|
+
|
|
89
|
+
# Unattended runs — used by `codeloop run --agent` and `codeloop schedule install`.
|
|
90
|
+
# The command gets the stage brief; {brief} becomes the shell-quoted path to it.
|
|
91
|
+
# agents:
|
|
92
|
+
# default: claude
|
|
93
|
+
# claude:
|
|
94
|
+
# cmd: "claude -p --permission-mode acceptEdits < {brief}"
|
|
95
|
+
# timeout_minutes: 20 # the agent is killed after this
|
|
96
|
+
# max_runs_per_day: 20 # agent starts across the project in any 24 hours
|
|
97
|
+
# codex:
|
|
98
|
+
# cmd: "codex exec - < {brief}"
|
|
99
|
+
# run:
|
|
100
|
+
# agent: true # plain `codeloop run` starts agents too
|
|
101
|
+
|
|
102
|
+
codeloop:
|
|
103
|
+
critical_frequency: 3
|
|
104
|
+
promote_frequency: 10
|
|
105
|
+
max_knowledge_lines: 200
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Written by `codeloop init --ci github`.
|
|
2
|
+
name: codeloop pr
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
gate:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v4
|
|
11
|
+
with:
|
|
12
|
+
fetch-depth: 0
|
|
13
|
+
- uses: actions/setup-node@v4
|
|
14
|
+
with:
|
|
15
|
+
node-version: 20
|
|
16
|
+
- run: npm ci
|
|
17
|
+
- run: npm run build --if-present
|
|
18
|
+
- run: npm test
|
|
19
|
+
- run: npx --yes @protoboxai/codeloop lane lint
|
|
20
|
+
- name: Every commit carries a Feature trailer
|
|
21
|
+
run: |
|
|
22
|
+
missing=0
|
|
23
|
+
for sha in $(git log --no-merges --format=%H "origin/${{ github.base_ref }}..HEAD"); do
|
|
24
|
+
if [ -z "$(git log -1 --format='%(trailers:key=Feature,valueonly)' "$sha")" ]; then
|
|
25
|
+
echo "::error::commit $sha has no Feature: <card-id> trailer"
|
|
26
|
+
missing=1
|
|
27
|
+
fi
|
|
28
|
+
done
|
|
29
|
+
exit $missing
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Written by `codeloop init --ci github`. The `production` environment is the human gate: give it
|
|
2
|
+
# required reviewers in the repository settings and the job waits for one of them.
|
|
3
|
+
name: codeloop prod
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
tags: ['v*']
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
prod:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: production
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: 20
|
|
17
|
+
- run: npm ci
|
|
18
|
+
- run: npm run build --if-present
|
|
19
|
+
- name: Deploy to production
|
|
20
|
+
run: |
|
|
21
|
+
cmd=$(npx --yes @protoboxai/codeloop config get deploy.production.command)
|
|
22
|
+
[ -n "$cmd" ] || cmd=$(npx --yes @protoboxai/codeloop config get deploy.prod.command)
|
|
23
|
+
if [ -z "$cmd" ]; then
|
|
24
|
+
echo "deploy.production.command is not set; nothing to deploy"
|
|
25
|
+
exit 0
|
|
26
|
+
fi
|
|
27
|
+
sh -c "$cmd"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Written by `codeloop init --ci github`. Does nothing until deploy.staging.command is set in .codeloop/config.yaml.
|
|
2
|
+
name: codeloop staging
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
staging:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
with:
|
|
13
|
+
fetch-depth: 0
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: 20
|
|
17
|
+
- run: npm ci
|
|
18
|
+
- run: npm run build --if-present
|
|
19
|
+
- name: Deploy to staging
|
|
20
|
+
id: deploy
|
|
21
|
+
run: |
|
|
22
|
+
cmd=$(npx --yes @protoboxai/codeloop config get deploy.staging.command)
|
|
23
|
+
if [ -z "$cmd" ]; then
|
|
24
|
+
echo "deploy.staging.command is not set; nothing to deploy"
|
|
25
|
+
exit 0
|
|
26
|
+
fi
|
|
27
|
+
sh -c "$cmd"
|
|
28
|
+
echo "deployed=true" >> "$GITHUB_OUTPUT"
|
|
29
|
+
- name: Verify the shipped cards against staging
|
|
30
|
+
if: steps.deploy.outputs.deployed == 'true'
|
|
31
|
+
run: |
|
|
32
|
+
for id in $(git log --format='%(trailers:key=Feature,valueonly)' "${{ github.event.before }}..${{ github.sha }}" | sort -u); do
|
|
33
|
+
npx --yes @protoboxai/codeloop verify "$id" --env staging --no-record
|
|
34
|
+
done
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Gotchas
|
|
2
|
+
|
|
3
|
+
Cross-cutting gotchas discovered during development. Sorted by frequency (highest first).
|
|
4
|
+
New entries added via `/commit` and `/reflect`. Frequency incremented when re-encountered.
|
|
5
|
+
|
|
6
|
+
Frequency determines severity in `/commit` review:
|
|
7
|
+
- `freq >= 3` → CRITICAL (blocks commit unless overridden)
|
|
8
|
+
- `freq 1-2` → WARNING (non-blocking)
|
|
9
|
+
- `freq >= 10` → Consider promoting to `rules.md`
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<!-- Add gotchas below, organized by section. Sections should match your config.yaml gotcha_sections. -->
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Patterns
|
|
2
|
+
|
|
3
|
+
Proven patterns used in this project. Confidence levels based on adoption.
|
|
4
|
+
New entries added via `/commit` and `/reflect`.
|
|
5
|
+
|
|
6
|
+
Confidence levels:
|
|
7
|
+
- **HIGH** — Used consistently, well-tested
|
|
8
|
+
- **MEDIUM** — Used in some places, works well
|
|
9
|
+
- **LOW** — Experimental, needs more validation
|
|
10
|
+
|
|
11
|
+
HIGH-confidence patterns are checked during `/commit` review — deviations trigger warnings.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<!-- Add patterns below, organized by section. Sections should match your config.yaml pattern_sections. -->
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Operating Principles
|
|
2
|
+
|
|
3
|
+
These principles guide how Claude Code works in this project. They're loaded as context for all flywheel skills.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Plan Mode Default
|
|
8
|
+
|
|
9
|
+
3+ steps = plan first. Write the plan to `tasks/todo.md`. Get approval before building. STOP and re-plan if things go sideways.
|
|
10
|
+
|
|
11
|
+
## 2. Subagent Strategy
|
|
12
|
+
|
|
13
|
+
Offload research and exploration to subagents. One task per subagent. Keep the main context clean for implementation work.
|
|
14
|
+
|
|
15
|
+
## 3. Self-Improvement Loop
|
|
16
|
+
|
|
17
|
+
After any correction or discovery:
|
|
18
|
+
- Capture gotchas and patterns via `/commit` or `/reflect`
|
|
19
|
+
- Frequency = severity: the more something recurs, the more critical it becomes
|
|
20
|
+
- `freq >= 3` = CRITICAL in next `/commit` review
|
|
21
|
+
|
|
22
|
+
## 4. Verification Before Done
|
|
23
|
+
|
|
24
|
+
Never mark a task complete without proof. Run tests, check logs, verify the output. Ask yourself: "Would a staff engineer approve this?"
|
|
25
|
+
|
|
26
|
+
## 5. Demand Elegance (Balanced)
|
|
27
|
+
|
|
28
|
+
For non-trivial changes, pause and ask "is there a more elegant way?" Skip this for simple fixes — don't over-engineer.
|
|
29
|
+
|
|
30
|
+
## 6. Autonomous Bug Fixing
|
|
31
|
+
|
|
32
|
+
Given a bug? Just fix it. Zero hand-holding. Point at evidence, resolve it. Don't ask for permission to investigate.
|
|
33
|
+
|
|
34
|
+
## 7. Simplicity First
|
|
35
|
+
|
|
36
|
+
Minimal code, minimal impact. Touch only what's necessary. The right amount of complexity is the minimum needed for the current task.
|
|
37
|
+
|
|
38
|
+
## 8. No Laziness
|
|
39
|
+
|
|
40
|
+
Root causes only. Don't patch symptoms. Don't skip hard problems. Don't leave broken things behind.
|
|
41
|
+
|
|
42
|
+
## 9. TDD Default
|
|
43
|
+
|
|
44
|
+
Write acceptance criteria first. Define tests before code. Follow RED → GREEN → REFACTOR:
|
|
45
|
+
1. **RED** — Write failing tests that define what "done" looks like
|
|
46
|
+
2. **GREEN** — Write the minimum code to make tests pass
|
|
47
|
+
3. **REFACTOR** — Clean up while tests stay green
|
|
48
|
+
|
|
49
|
+
Not every change needs full TDD, but any non-trivial feature or bug fix benefits from defining expected behavior before implementation.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Rules
|
|
2
|
+
|
|
3
|
+
Non-negotiable rules for this project. These are always loaded as CRITICAL by `/commit`.
|
|
4
|
+
|
|
5
|
+
Add project-specific rules here. Start with these universals:
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Errors = Failure
|
|
10
|
+
|
|
11
|
+
Never rationalize error codes. 404/401/500 means something is broken — fix it or report it.
|
|
12
|
+
|
|
13
|
+
## 2. Verify Before Claiming Done
|
|
14
|
+
|
|
15
|
+
A feature "works" when the **user can see/use the result**, not when code compiles. Run the tests, check the output, prove it works.
|
|
16
|
+
|
|
17
|
+
## 3. Own It
|
|
18
|
+
|
|
19
|
+
Complete ALL tasks. No "next steps" lists, no "TODO later", no deferring. If something is broken, fix it. If something is missing, add it.
|
|
20
|
+
|
|
21
|
+
## 4. No Destructive Operations Without Confirmation
|
|
22
|
+
|
|
23
|
+
`git push`, `git stash`, `git rebase`, force deletes — always confirm with the user first. These affect shared state and can destroy work.
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review + reflect + commit in one flow
|
|
3
|
+
argument-hint: [type] [scope] [message] OR [--wip]
|
|
4
|
+
allowed-tools: Bash(git:*), Read, Edit, Write, Glob, Grep, AskUserQuestion
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- codeloop-version: 0.3.0 -->
|
|
8
|
+
|
|
9
|
+
# /commit
|
|
10
|
+
|
|
11
|
+
Three-phase commit: **Review → Reflect → Commit**.
|
|
12
|
+
|
|
13
|
+
## Quick Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
/commit # Full flow: review → reflect → commit (auto-generate message)
|
|
17
|
+
/commit feat auth "add login endpoints" # Full flow with explicit message
|
|
18
|
+
/commit --wip # Skip review + reflect, WIP commit with --no-verify
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Phase 1: Review
|
|
24
|
+
|
|
25
|
+
### 1.1 Get the diff
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git diff HEAD --name-only
|
|
29
|
+
git status --short
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If nothing to commit → say "Nothing to commit" and **stop**.
|
|
33
|
+
|
|
34
|
+
### 1.2 Determine scopes from changed paths
|
|
35
|
+
|
|
36
|
+
Read `.codeloop/config.yaml` and map changed files to scopes using the `scopes` section:
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
scopes:
|
|
40
|
+
backend:
|
|
41
|
+
paths: ["src/**", "lib/**"]
|
|
42
|
+
gotcha_sections: ["Backend", "Database"]
|
|
43
|
+
pattern_sections: ["Backend", "API"]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Match each changed file against scope paths. A file can match multiple scopes.
|
|
47
|
+
|
|
48
|
+
If no config.yaml exists, use a single "all" scope that loads everything.
|
|
49
|
+
|
|
50
|
+
### 1.3 Load dynamic rubrics
|
|
51
|
+
|
|
52
|
+
Read these files and extract rules matching the active scopes:
|
|
53
|
+
|
|
54
|
+
1. **`.codeloop/rules.md`** — all rules are always CRITICAL
|
|
55
|
+
2. **`.codeloop/gotchas.md`** — items with `freq >= 3` in matching sections → CRITICAL; `freq 1-2` → WARNING
|
|
56
|
+
3. **`.codeloop/patterns.md`** — HIGH-confidence patterns in matching sections → expectations (deviation = WARNING)
|
|
57
|
+
|
|
58
|
+
Only load sections relevant to the active scopes. Don't review the entire gotchas file for a docs-only change.
|
|
59
|
+
|
|
60
|
+
**Scope → rubric section mapping** comes from `config.yaml`:
|
|
61
|
+
- `gotcha_sections` defines which gotcha sections to load for that scope
|
|
62
|
+
- `pattern_sections` defines which pattern sections to load for that scope
|
|
63
|
+
|
|
64
|
+
### 1.3b Critical wiki pages
|
|
65
|
+
|
|
66
|
+
If `.codeloop/wiki/` exists, run this with the changed files:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
codeloop check gotchas --files $(git diff HEAD --name-only)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Exit 1 means a critical page applies to this change. Read each page it prints, confirm the change handles it, then re-run with `--ack "<title>"` for each. Do not commit while it exits 1.
|
|
73
|
+
|
|
74
|
+
### 1.4 Quality checks
|
|
75
|
+
|
|
76
|
+
Read `quality_checks` from `.codeloop/config.yaml` and run checks for active scopes:
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
quality_checks:
|
|
80
|
+
backend:
|
|
81
|
+
- name: "Typecheck"
|
|
82
|
+
command: "npx tsc --noEmit 2>&1 | tail -20"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
If any check **fails** → report as a CRITICAL finding.
|
|
86
|
+
|
|
87
|
+
If no quality_checks defined → skip silently.
|
|
88
|
+
|
|
89
|
+
### 1.5 Scan diff for violations
|
|
90
|
+
|
|
91
|
+
Read `diff_scan` rules from `.codeloop/config.yaml`:
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
diff_scan:
|
|
95
|
+
- pattern: "console\\.log"
|
|
96
|
+
files: "*.ts,*.js"
|
|
97
|
+
exclude: "*.test.*"
|
|
98
|
+
severity: CRITICAL
|
|
99
|
+
message: "console.log in production code"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
For each rule, scan the actual diff content for matches.
|
|
103
|
+
|
|
104
|
+
If no diff_scan rules → skip silently.
|
|
105
|
+
|
|
106
|
+
### 1.6 Output findings
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
## Review
|
|
110
|
+
|
|
111
|
+
**Scopes**: backend, frontend
|
|
112
|
+
**Rubrics loaded**: 6 CRITICAL, 3 WARNING from gotchas; 4 patterns checked
|
|
113
|
+
|
|
114
|
+
| Sev | Finding | File |
|
|
115
|
+
|-----|---------|------|
|
|
116
|
+
| CRITICAL | console.log in service code | src/foo/bar.ts:42 |
|
|
117
|
+
| CRITICAL | Typecheck failed (2 errors) | — |
|
|
118
|
+
| WARNING | Hardcoded string | src/foo/bar.ts:18 |
|
|
119
|
+
| CLEAN | Build passed | — |
|
|
120
|
+
|
|
121
|
+
**Verdict**: BLOCKED (2 critical)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Verdicts:
|
|
125
|
+
- **CLEAN** — no issues, proceed
|
|
126
|
+
- **WARNINGS** — non-blocking suggestions, proceed to commit
|
|
127
|
+
- **BLOCKED** — critical issues found, must fix before commit
|
|
128
|
+
|
|
129
|
+
### 1.7 If BLOCKED
|
|
130
|
+
|
|
131
|
+
Use AskUserQuestion with options:
|
|
132
|
+
- **Fix issues** — stop here, user fixes and re-runs `/commit`
|
|
133
|
+
- **Commit anyway** — override, proceed to Phase 2
|
|
134
|
+
- **Abort** — stop entirely
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Phase 2: Reflect (lightweight)
|
|
139
|
+
|
|
140
|
+
Quickly scan this session for:
|
|
141
|
+
1. **Gotchas** — unexpected behavior, hidden dependencies, bugs found
|
|
142
|
+
2. **Patterns** — approaches that worked well, shortcuts discovered
|
|
143
|
+
|
|
144
|
+
If anything found → use AskUserQuestion with multiSelect to let user pick what to save.
|
|
145
|
+
|
|
146
|
+
Save selected items to `.codeloop/gotchas.md` or `.codeloop/patterns.md`.
|
|
147
|
+
|
|
148
|
+
New gotchas get `[freq:1]`. Place them in the appropriate section (create section if needed).
|
|
149
|
+
|
|
150
|
+
If nothing worth saving → skip silently, move to Phase 3.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Phase 3: Commit
|
|
155
|
+
|
|
156
|
+
### 3.1 Stage files
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
git add -A
|
|
160
|
+
git status --short
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Show what will be committed.
|
|
164
|
+
|
|
165
|
+
### 3.2 Build commit message
|
|
166
|
+
|
|
167
|
+
**If type/scope/message provided as arguments:**
|
|
168
|
+
```
|
|
169
|
+
$TYPE($SCOPE): $MESSAGE
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**If auto-generating**, analyze the staged diff:
|
|
173
|
+
- **Type**: Read allowed types from `commit.types` in config.yaml (default: feat, fix, refactor, docs, test, chore, perf)
|
|
174
|
+
- **Scope**: primary directory/feature from changed files
|
|
175
|
+
- **Message**: brief description of the "why", not the "what"
|
|
176
|
+
|
|
177
|
+
For large commits (10+ files or multiple features), include a body with grouped bullet points.
|
|
178
|
+
|
|
179
|
+
### 3.3 Create commit
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
git commit -m "$(cat <<'EOF'
|
|
183
|
+
type(scope): message
|
|
184
|
+
|
|
185
|
+
optional body
|
|
186
|
+
EOF
|
|
187
|
+
)"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### 3.4 Board sync
|
|
191
|
+
|
|
192
|
+
If `.codeloop/board.json` exists:
|
|
193
|
+
- Read the board JSON
|
|
194
|
+
- Find the active task: first task with status `in_progress`, then `review`, then `planned` (in that priority order)
|
|
195
|
+
- If no task found, warn: "Board sync skipped — no active task found in board.json" (non-blocking, commit still succeeds)
|
|
196
|
+
- Append the new commit SHA to the task's `commits` array
|
|
197
|
+
- Write the updated board back to `.codeloop/board.json`
|
|
198
|
+
|
|
199
|
+
### 3.5 Report result
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
## Committed
|
|
203
|
+
|
|
204
|
+
**Hash**: abc1234
|
|
205
|
+
**Message**: feat(auth): add login endpoints
|
|
206
|
+
**Files**: 5 changed, +120, -30
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## WIP Mode (`--wip`)
|
|
212
|
+
|
|
213
|
+
Skip Phase 1 and Phase 2 entirely:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
git add -A
|
|
217
|
+
git commit -m "chore: WIP" --no-verify
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Report the commit hash and stop.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Rubric Evolution
|
|
225
|
+
|
|
226
|
+
The review gets smarter over time:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
Session work → discover gotcha → Phase 2 saves to gotchas.md (freq:1)
|
|
230
|
+
→ re-encountered in future sessions → freq increases via /reflect
|
|
231
|
+
→ next /commit Phase 1 picks it up at higher severity (freq >= 3 = CRITICAL)
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
No separate rubrics file. `gotchas.md` IS the rubrics source. Frequency = severity.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Commit Types
|
|
239
|
+
|
|
240
|
+
| Type | When |
|
|
241
|
+
|------|------|
|
|
242
|
+
| `feat` | New feature or capability |
|
|
243
|
+
| `fix` | Bug fix |
|
|
244
|
+
| `refactor` | Code restructuring, no behavior change |
|
|
245
|
+
| `docs` | Documentation only |
|
|
246
|
+
| `test` | Adding/updating tests |
|
|
247
|
+
| `chore` | Maintenance, deps, config |
|
|
248
|
+
| `perf` | Performance improvement |
|
|
249
|
+
|
|
250
|
+
## Safety Rules
|
|
251
|
+
|
|
252
|
+
1. **ALWAYS `git add -A` first** — never leave uncommitted work
|
|
253
|
+
2. **Never amend pushed commits**
|
|
254
|
+
3. **Never skip hooks** (except `--wip`)
|
|
255
|
+
4. **Never push** — `/commit` only creates local commits
|