kanban-system 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/.env.example +76 -0
  2. package/CLAUDE.md +108 -0
  3. package/README.md +272 -0
  4. package/agents/_TEMPLATE.md +42 -0
  5. package/agents/backend-agent.md +81 -0
  6. package/agents/deploy-gate-agent.md +73 -0
  7. package/agents/frontend-agent.md +73 -0
  8. package/agents/monitor-agent.md +65 -0
  9. package/agents/orchestrator.md +91 -0
  10. package/agents/reviewer-codex.md +51 -0
  11. package/bin/cli.js +171 -0
  12. package/config.example.js +99 -0
  13. package/docs/adapting-to-your-project.md +155 -0
  14. package/docs/example-apex.md +86 -0
  15. package/docs/the-pattern.md +92 -0
  16. package/hooks/launchd.plist.template +66 -0
  17. package/hooks/pre-push.sample +61 -0
  18. package/lib/config.cjs +138 -0
  19. package/lib/detect/_template.cjs +63 -0
  20. package/lib/detect/rules.json +28 -0
  21. package/lib/detect/sentry.cjs +86 -0
  22. package/lib/detect/vercel.cjs +62 -0
  23. package/lib/gate/index.cjs +182 -0
  24. package/lib/runner/adapters/both.cjs +33 -0
  25. package/lib/runner/adapters/claude.cjs +119 -0
  26. package/lib/runner/adapters/codex.cjs +43 -0
  27. package/lib/runner/adapters/reviewer.cjs +91 -0
  28. package/lib/runner/budget.cjs +75 -0
  29. package/lib/runner/index.cjs +93 -0
  30. package/lib/runner/result-merger.cjs +58 -0
  31. package/lib/runner/worktree-manager.cjs +64 -0
  32. package/lib/watch/scheduler.cjs +164 -0
  33. package/package.json +59 -0
  34. package/playbooks/_TEMPLATE.html +54 -0
  35. package/playbooks/build-fail.html +57 -0
  36. package/playbooks/deploy-rollback.html +53 -0
  37. package/playbooks/e2e-regression.html +58 -0
  38. package/playbooks/playbook.css +26 -0
  39. package/playbooks/sentry-spike.html +53 -0
  40. package/server/kanban.cjs +1152 -0
  41. package/skills/archive.md +18 -0
  42. package/skills/gate.md +22 -0
  43. package/skills/standup.md +24 -0
  44. package/skills/triage.md +24 -0
  45. package/ui/kanban.html +628 -0
  46. package/ui/styles/kanban.css +436 -0
  47. package/ui/styles/progress.css +315 -0
  48. package/ui/styles/tokens.css +291 -0
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: archive
3
+ description: >-
4
+ Archive completed kanban tasks — move done cards out of the active board into a
5
+ dated archive so the board stays focused. Use when asked for "/archive".
6
+ ---
7
+
8
+ # /archive
9
+
10
+ A reusable Claude Code skill stub.
11
+
12
+ When invoked:
13
+ 1. `GET /api/tasks`. Select tasks with `status: completed` (optionally older than N days,
14
+ default keep the last few for visibility).
15
+ 2. For each, append it to `~/.claude/tasks/_archives/<YYYY-MM>.jsonl` (preserving
16
+ `reportPath` / `reportSummary`), then `DELETE /api/tasks/:id`.
17
+ 3. Print a short summary: how many archived, and where.
18
+ 4. Never archive tasks that are `in_progress`, `in_review`, or `pending`.
package/skills/gate.md ADDED
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: gate
3
+ description: >-
4
+ Run the pre-deploy gate (config.js → deployCommands + optional bundle inspection)
5
+ and report pass/fail per stage. Use when asked for "/gate" or before a deploy.
6
+ ---
7
+
8
+ # /gate
9
+
10
+ A reusable Claude Code skill stub. The gate itself is `lib/gate/index.cjs`.
11
+
12
+ When invoked:
13
+ 1. Run `node lib/gate/index.cjs` (or `npm run gate`) from the harness root. It
14
+ executes `config.js → deployCommands` in order, fail-fast, from `config.js → repoPath`,
15
+ then an optional bundle-inspection stage.
16
+ 2. Read the run report at `data/runs/gate-<ts>/report.md` and relay the verdict +
17
+ per-stage status. On failure, point at the failing stage's log
18
+ (`data/runs/gate-<ts>/<stage>.log`) and the auto-created "needs human" task.
19
+ 3. If the gate failed, do NOT proceed to deploy. Fix the failing stage, re-run.
20
+
21
+ The hard gate (`hooks/pre-push.sample`) runs the same thing on `git push`; a human
22
+ can override with `KANBAN_GATE_BYPASS=1 git push` (audit-logged).
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: standup
3
+ description: >-
4
+ Generate a daily standup digest of the last 24h of kanban activity — throughput,
5
+ per-agent state, cross-validation outcomes, the second-model budget, gate runs,
6
+ and watch findings. Use when asked for "/standup" or a daily report.
7
+ ---
8
+
9
+ # /standup
10
+
11
+ A reusable Claude Code skill stub. Wire it up to your project, then expand.
12
+
13
+ When invoked:
14
+ 1. `GET http://localhost:<port>/api/tasks` and `GET /api/activity?limit=500`.
15
+ 2. Summarize the last 24h: tasks created / completed / moved; per-agent counts
16
+ (total / in-progress / needs-human / completed); cross-validation outcomes
17
+ (agreed / partial / disagreed) from `task.metadata.crossValidation`.
18
+ 3. Read `data/runs/budget.json` for the second-model budget and fallback rate.
19
+ 4. Scan `data/runs/gate-*/report.md` (last 24h) for pass/fail counts.
20
+ 5. Scan `data/runs/watch-findings/sweep-*.md` (last 24h) for alerts posted.
21
+ 6. Print a markdown digest; save it to `data/runs/standup/<YYYY-MM-DD>.md`.
22
+ 7. Optionally post it to Slack if `SLACK_AGENT_WEBHOOK` is set.
23
+
24
+ Flags to support: `--since 48h`, `--post`.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: triage
3
+ description: >-
4
+ Triage unrouted / stale kanban tasks — apply the orchestrator's routing rules to
5
+ assign an agent + runner, flag disagreements waiting on a human, and surface tasks
6
+ stuck too long. Use when asked for "/triage".
7
+ ---
8
+
9
+ # /triage
10
+
11
+ A reusable Claude Code skill stub. See `agents/orchestrator.md` for the routing rules.
12
+
13
+ When invoked:
14
+ 1. `GET /api/tasks`. Split into: unrouted (no `agent`), in-progress past their
15
+ timeout, `in_review` with `agreement: disagreed`, and `pending` older than N days.
16
+ 2. For each unrouted task, apply the orchestrator routing rules:
17
+ - explicit `metadata.agent` → respect it;
18
+ - touches exactly one agent's `owns` glob → assign that agent;
19
+ - severity ≥ medium → `runner: both`; recent regression in the area → `reviewer:codex`;
20
+ - otherwise → label `unrouted`, leave for a human.
21
+ `PUT /api/tasks/:id` with `agent` + `metadata.runner`.
22
+ 3. List the disagreements that need a human decision (with the diff path).
23
+ 4. List anything stuck too long, with a suggested next action.
24
+ 5. Write a `data/runs/triage-<ts>.md` summary.