@fernado03/zoo-flow 0.5.3 → 0.7.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 (127) hide show
  1. package/README.md +102 -79
  2. package/bin/zoo-flow.js +398 -50
  3. package/docs/architecture.md +380 -0
  4. package/docs/bloat-control.md +49 -0
  5. package/docs/command-design.md +38 -0
  6. package/docs/command-flow.md +133 -0
  7. package/docs/comparison.md +86 -0
  8. package/docs/context-packs.md +35 -0
  9. package/docs/dogfood/01-small-library.md +28 -0
  10. package/docs/dogfood/02-web-app.md +29 -0
  11. package/docs/dogfood/03-mixed-monorepo.md +29 -0
  12. package/docs/mode-rules.md +86 -0
  13. package/docs/npm-publishing.md +79 -0
  14. package/docs/out-of-scope/mainstream-issue-trackers-only.md +25 -0
  15. package/docs/out-of-scope/question-limits.md +18 -0
  16. package/docs/out-of-scope/setup-skill-verify-mode.md +15 -0
  17. package/docs/overview.md +61 -0
  18. package/docs/philosophy.md +73 -0
  19. package/docs/quality-scorecard.md +23 -0
  20. package/docs/skill-maintenance.md +32 -0
  21. package/docs/skills-index.md +61 -0
  22. package/docs/team-mode.md +46 -0
  23. package/docs/token-budget.md +22 -0
  24. package/docs/troubleshooting.md +288 -0
  25. package/examples/demo-transcripts/01-small-tweak.md +37 -0
  26. package/examples/demo-transcripts/02-unknown-bug-fix.md +37 -0
  27. package/examples/demo-transcripts/03-new-feature.md +37 -0
  28. package/examples/demo-transcripts/04-refactor.md +37 -0
  29. package/examples/demo-transcripts/05-review-and-verify.md +37 -0
  30. package/examples/feature-flow.md +117 -0
  31. package/examples/fix-flow.md +139 -0
  32. package/package.json +16 -5
  33. package/quality/scorecard.json +88 -0
  34. package/quality/token-budget.exceptions.json +13 -0
  35. package/scripts/bundle.ps1 +135 -0
  36. package/scripts/check-golden-transcripts.js +69 -0
  37. package/scripts/check-package-links.js +72 -0
  38. package/scripts/check-package-manifest.js +70 -0
  39. package/scripts/eval-routing.js +149 -0
  40. package/scripts/score-quality.js +292 -0
  41. package/scripts/test-doctor.js +107 -0
  42. package/scripts/test-project-shapes.js +99 -0
  43. package/scripts/token-budget.js +105 -0
  44. package/templates/full/.roo/commands/caveman.md +1 -1
  45. package/templates/full/.roo/commands/diagnose.md +2 -1
  46. package/templates/full/.roo/commands/feature.md +1 -1
  47. package/templates/full/.roo/commands/fix.md +1 -1
  48. package/templates/full/.roo/commands/grill-me.md +2 -1
  49. package/templates/full/.roo/commands/grill-with-docs.md +2 -1
  50. package/templates/full/.roo/commands/handoff.md +2 -1
  51. package/templates/full/.roo/commands/improve-codebase-architecture.md +2 -1
  52. package/templates/full/.roo/commands/prototype.md +1 -1
  53. package/templates/full/.roo/commands/refactor.md +1 -1
  54. package/templates/full/.roo/commands/review.md +11 -0
  55. package/templates/full/.roo/commands/setup-matt-pocock-skills.md +1 -1
  56. package/templates/full/.roo/commands/tdd.md +1 -1
  57. package/templates/full/.roo/commands/to-issues.md +2 -1
  58. package/templates/full/.roo/commands/to-prd.md +2 -1
  59. package/templates/full/.roo/commands/triage.md +1 -1
  60. package/templates/full/.roo/commands/tweak.md +1 -1
  61. package/templates/full/.roo/commands/verify.md +11 -0
  62. package/templates/full/.roo/commands/write-a-skill.md +2 -1
  63. package/templates/full/.roo/commands/zoom-out.md +2 -1
  64. package/templates/full/.roo/rules/01-command-protocol.md +1 -1
  65. package/templates/full/.roo/rules/04-context-economy.md +3 -5
  66. package/templates/full/.roo/rules-code-tweaker/01-completion.md +12 -8
  67. package/templates/full/.roo/rules-custom-orchestrator/00-routing.md +23 -9
  68. package/templates/full/.roo/rules-custom-orchestrator/01-delegation-message.md +11 -7
  69. package/templates/full/.roo/rules-system-architect/02-completion.md +6 -2
  70. package/templates/full/.roo/skills/engineering/README.md +2 -0
  71. package/templates/full/.roo/skills/engineering/commit-and-document/SKILL.md +1 -2
  72. package/templates/full/.roo/skills/engineering/grill-with-docs/ADR-FORMAT.md +1 -1
  73. package/templates/full/.roo/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md +7 -32
  74. package/templates/full/.roo/skills/engineering/grill-with-docs/SKILL.md +1 -1
  75. package/templates/full/.roo/skills/engineering/improve-codebase-architecture/SKILL.md +3 -3
  76. package/templates/full/.roo/skills/engineering/review/SKILL.md +111 -0
  77. package/templates/full/.roo/skills/engineering/scaffold-context/SKILL.md +66 -0
  78. package/templates/full/.roo/skills/engineering/scaffold-context/templates/writing-patterns.md +17 -0
  79. package/templates/full/.roo/skills/engineering/setup-matt-pocock-skills/SKILL.md +3 -3
  80. package/templates/full/.roo/skills/engineering/setup-matt-pocock-skills/domain.md +2 -3
  81. package/templates/full/.roo/skills/engineering/tdd/SKILL.md +2 -0
  82. package/templates/full/.roo/skills/engineering/tweak/SKILL.md +2 -1
  83. package/templates/full/.roo/skills/engineering/verify/SKILL.md +80 -0
  84. package/templates/full/.roo/skills/in-progress/README.md +0 -1
  85. package/templates/full/.roomodes +3 -3
  86. package/templates/full/.zoo-flow/evals/no-regression-checklist.md +4 -2
  87. package/templates/full/.zoo-flow/evals/routing-cases.jsonl +20 -0
  88. package/templates/full/.zoo-flow/evals/routing-cases.md +27 -3
  89. package/templates/full/.zoo-flow/project-profile.json +24 -0
  90. package/tests/fixtures/bad-routing-cases/bad-json.jsonl +1 -0
  91. package/tests/fixtures/bad-routing-cases/bad-mode.jsonl +1 -0
  92. package/tests/fixtures/bad-routing-cases/missing-command.jsonl +1 -0
  93. package/tests/fixtures/doctor/bad-built-in-delegation/fixture.json +1 -0
  94. package/tests/fixtures/doctor/bad-mode-slug/fixture.json +1 -0
  95. package/tests/fixtures/doctor/bad-skill-wrapper/fixture.json +1 -0
  96. package/tests/fixtures/doctor/bad-zoo-path/fixture.json +1 -0
  97. package/tests/fixtures/doctor/helper-missing-mode/fixture.json +1 -0
  98. package/tests/fixtures/doctor/helper-not-permitted/fixture.json +1 -0
  99. package/tests/fixtures/doctor/manual-good-template/fixture.json +1 -0
  100. package/tests/fixtures/doctor/missing-command/fixture.json +1 -0
  101. package/tests/fixtures/doctor/missing-roomodes/fixture.json +1 -0
  102. package/tests/fixtures/doctor/missing-skill/fixture.json +1 -0
  103. package/tests/fixtures/project-shapes/cli-tool/cmd/root.go +1 -0
  104. package/tests/fixtures/project-shapes/cli-tool/fixture.json +1 -0
  105. package/tests/fixtures/project-shapes/cli-tool/package.json +1 -0
  106. package/tests/fixtures/project-shapes/data-pipeline/fixture.json +1 -0
  107. package/tests/fixtures/project-shapes/data-pipeline/pipelines/invoices.py +1 -0
  108. package/tests/fixtures/project-shapes/data-pipeline/pyproject.toml +2 -0
  109. package/tests/fixtures/project-shapes/library/fixture.json +1 -0
  110. package/tests/fixtures/project-shapes/library/package.json +1 -0
  111. package/tests/fixtures/project-shapes/library/src/index.ts +1 -0
  112. package/tests/fixtures/project-shapes/monorepo/fixture.json +1 -0
  113. package/tests/fixtures/project-shapes/monorepo/package.json +1 -0
  114. package/tests/fixtures/project-shapes/monorepo/packages/core/index.ts +1 -0
  115. package/tests/fixtures/project-shapes/monorepo/packages/web/index.ts +1 -0
  116. package/tests/fixtures/project-shapes/serverless/fixture.json +1 -0
  117. package/tests/fixtures/project-shapes/serverless/functions/webhook.ts +1 -0
  118. package/tests/fixtures/project-shapes/serverless/package.json +1 -0
  119. package/tests/fixtures/project-shapes/web-app/app/routes/index.tsx +1 -0
  120. package/tests/fixtures/project-shapes/web-app/fixture.json +1 -0
  121. package/tests/fixtures/project-shapes/web-app/package.json +1 -0
  122. package/tests/golden-transcripts/01-small-tweak-golden.md +21 -0
  123. package/tests/golden-transcripts/02-diagnosis-golden.md +26 -0
  124. package/tests/golden-transcripts/03-verification-golden.md +24 -0
  125. package/tests/golden-transcripts/04-review-golden.md +26 -0
  126. package/tests/golden-transcripts/05-feature-planning-golden.md +23 -0
  127. package/templates/full/.roo/skills/in-progress/review/SKILL.md +0 -39
@@ -0,0 +1,26 @@
1
+ # Golden: Diagnosis
2
+
3
+ ## User
4
+ Checkout randomly crashes after payment. It used to work.
5
+
6
+ ## Workflow
7
+ diagnosis -> /fix -> system-architect -> code-tweaker -> system-architect
8
+
9
+ ## Expected structure
10
+ 1. Orchestrator proposes "diagnosis" in plain language.
11
+ 2. User approves.
12
+ 3. Orchestrator delegates /fix to system-architect.
13
+ 4. System Architect reads domain docs, reproduces, minimizes, hypothesizes.
14
+ 5. System Architect hands to code-tweaker for fix.
15
+ 6. Code Tweaker implements, verifies.
16
+ 7. Control returns to system-architect for post-mortem.
17
+ 8. System Architect uses attempt_completion.
18
+
19
+ ## Must include
20
+ - Reproduction before hypothesis
21
+ - Hypothesis before fix
22
+ - Post-mortem after fix
23
+
24
+ ## Must not include
25
+ - Built-in mode delegation
26
+ - /fix in user-facing suggestions
@@ -0,0 +1,24 @@
1
+ # Golden: Verification
2
+
3
+ ## User
4
+ Run tests for this change and make sure nothing broke.
5
+
6
+ ## Workflow
7
+ verification -> /verify -> code-tweaker
8
+
9
+ ## Expected structure
10
+ 1. Orchestrator proposes "verification" in plain language.
11
+ 2. User approves.
12
+ 3. Orchestrator delegates /verify to code-tweaker.
13
+ 4. Code Tweaker reads verify skill.
14
+ 5. Code Tweaker inspects project type and changed files.
15
+ 6. Code Tweaker picks smallest useful checks.
16
+ 7. Code Tweaker runs checks, captures output.
17
+ 8. Code Tweaker reports: verification result with status, commands run, evidence, remaining risk.
18
+ 9. Code Tweaker uses attempt_completion.
19
+
20
+ ## Evidence format
21
+ - Status: pass | fail | partial | blocked
22
+ - Commands run with pass/fail per command
23
+ - Evidence: short summary of output
24
+ - Remaining risk: what was not checked
@@ -0,0 +1,26 @@
1
+ # Golden: Review
2
+
3
+ ## User
4
+ Review this branch before I commit it.
5
+
6
+ ## Workflow
7
+ review -> /review -> system-architect
8
+
9
+ ## Expected structure
10
+ 1. Orchestrator proposes "review" in plain language.
11
+ 2. User approves.
12
+ 3. Orchestrator delegates /review to system-architect.
13
+ 4. System Architect reads review skill.
14
+ 5. System Architect identifies target (branch diff).
15
+ 6. System Architect reads targeted diffs.
16
+ 7. System Architect evaluates axes: standards, spec, security/risk.
17
+ 8. System Architect reports findings by severity.
18
+ 9. System Architect ends with canonical result line.
19
+ 10. System Architect uses attempt_completion.
20
+
21
+ ## Result line
22
+ - Review result: approve | approve with nits | changes requested | blocked
23
+
24
+ ## Must include
25
+ - Severity-ordered findings
26
+ - Security/Risk axis when change touches auth/payments/PII/data
@@ -0,0 +1,23 @@
1
+ # Golden: Feature Planning
2
+
3
+ ## User
4
+ Add team invitations with email invites and pending invite states.
5
+
6
+ ## Workflow
7
+ feature planning -> /feature -> system-architect -> code-tweaker -> system-architect
8
+
9
+ ## Expected structure
10
+ 1. Orchestrator proposes "feature planning" in plain language.
11
+ 2. User approves phase gates.
12
+ 3. Orchestrator delegates /feature to system-architect.
13
+ 4. System Architect reads domain docs (CONTEXT.md, ADRs).
14
+ 5. System Architect sharpens scope, may produce PRD.
15
+ 6. System Architect slices into issues.
16
+ 7. System Architect hands to code-tweaker for implementation.
17
+ 8. Code Tweaker implements TDD loop.
18
+ 9. Control returns to system-architect for close.
19
+ 10. System Architect uses attempt_completion.
20
+
21
+ ## Must not include
22
+ - Implementation before planning
23
+ - Skipping phase gates
@@ -1,39 +0,0 @@
1
- ---
2
- name: review
3
- description: Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".
4
- ---
5
-
6
- # Review
7
-
8
- Issue tracker should exist; run `/setup-matt-pocock-skills` if `docs/agents/issue-tracker.md` missing.
9
-
10
- ## 1. Fixed point
11
-
12
- 1. Use user-supplied commit/branch/tag/`main`/`HEAD~N` exactly.
13
- 2. If missing, ask: `Review against what — a branch, a commit, or main?`
14
- 3. Diff: `git diff {fixed-point}...HEAD`.
15
- 4. Commits: `git log {fixed-point}..HEAD --oneline`.
16
-
17
- ## 2. Spec
18
-
19
- Order:
20
- 1. Issue refs in commits (`#123`, `Closes #45`, GitLab refs); fetch via `docs/agents/issue-tracker.md`.
21
- 2. User path.
22
- 3. Matching PRD/spec under `docs/`, `specs/`, `.scratch/`.
23
- 4. If none, ask. If no spec, skip Spec axis with `no spec available`.
24
-
25
- ## 3. Standards
26
-
27
- Collect: `CLAUDE.md`, `AGENTS.md`, `CONTRIBUTING.md`, context docs, `docs/adr/`, `.editorconfig`, `eslint.config.*`, `biome.json`, Prettier config, `tsconfig.json`, `STYLE.md`, `STANDARDS.md`, `STYLEGUIDE.md`, similar.
28
-
29
- ## 4. Parallel sub-agents
30
-
31
- Standards prompt: diff command; commits; standards files; report documented-standard violations per file/hunk; cite standard; hard vs judgement; skip tooling-enforced; under 400 words.
32
-
33
- Spec prompt: diff command; commits; spec path/content; report missing/partial requirements, scope creep, wrong-looking implementation; quote spec line; under 400 words.
34
-
35
- ## 5. Aggregate
36
-
37
- 1. Present `## Standards` and `## Spec` separately.
38
- 2. DO NOT merge/rerank axes.
39
- 3. End with counts per axis + worst issue.