@wazir-dev/cli 1.1.0 → 1.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.
Files changed (138) hide show
  1. package/CHANGELOG.md +74 -10
  2. package/README.md +15 -15
  3. package/assets/demo.cast +47 -0
  4. package/assets/demo.gif +0 -0
  5. package/docs/anti-patterns/AP-23-skipping-enabled-workflows.md +28 -0
  6. package/docs/anti-patterns/AP-24-clarifier-deciding-scope.md +34 -0
  7. package/docs/concepts/architecture.md +1 -1
  8. package/docs/concepts/roles-and-workflows.md +2 -0
  9. package/docs/concepts/why-wazir.md +59 -0
  10. package/docs/decisions/2026-03-19-deferred-items.md +564 -0
  11. package/docs/decisions/2026-03-19-enhancement-decisions.md +300 -0
  12. package/docs/readmes/INDEX.md +21 -5
  13. package/docs/readmes/features/expertise/README.md +2 -2
  14. package/docs/readmes/features/exports/README.md +2 -2
  15. package/docs/readmes/features/hooks/pre-compact-summary.md +1 -1
  16. package/docs/readmes/features/schemas/README.md +3 -0
  17. package/docs/readmes/features/skills/README.md +17 -0
  18. package/docs/readmes/features/skills/clarifier.md +5 -0
  19. package/docs/readmes/features/skills/claude-cli.md +5 -0
  20. package/docs/readmes/features/skills/codex-cli.md +5 -0
  21. package/docs/readmes/features/skills/dispatching-parallel-agents.md +5 -0
  22. package/docs/readmes/features/skills/executing-plans.md +5 -0
  23. package/docs/readmes/features/skills/executor.md +5 -0
  24. package/docs/readmes/features/skills/finishing-a-development-branch.md +5 -0
  25. package/docs/readmes/features/skills/gemini-cli.md +5 -0
  26. package/docs/readmes/features/skills/humanize.md +5 -0
  27. package/docs/readmes/features/skills/init-pipeline.md +5 -0
  28. package/docs/readmes/features/skills/receiving-code-review.md +5 -0
  29. package/docs/readmes/features/skills/requesting-code-review.md +5 -0
  30. package/docs/readmes/features/skills/reviewer.md +5 -0
  31. package/docs/readmes/features/skills/subagent-driven-development.md +5 -0
  32. package/docs/readmes/features/skills/using-git-worktrees.md +5 -0
  33. package/docs/readmes/features/skills/wazir.md +5 -0
  34. package/docs/readmes/features/skills/writing-skills.md +5 -0
  35. package/docs/readmes/features/workflows/prepare-next.md +1 -1
  36. package/docs/reference/configuration-reference.md +47 -6
  37. package/docs/reference/hooks.md +1 -0
  38. package/docs/reference/launch-checklist.md +4 -4
  39. package/docs/reference/review-loop-pattern.md +119 -9
  40. package/docs/reference/roles-reference.md +1 -0
  41. package/docs/reference/skill-tiers.md +147 -0
  42. package/docs/reference/tooling-cli.md +3 -1
  43. package/docs/truth-claims.yaml +12 -0
  44. package/expertise/antipatterns/process/ai-coding-antipatterns.md +214 -1
  45. package/exports/hosts/claude/.claude/commands/plan-review.md +3 -1
  46. package/exports/hosts/claude/.claude/commands/verify.md +30 -1
  47. package/exports/hosts/claude/.claude/settings.json +9 -0
  48. package/exports/hosts/claude/CLAUDE.md +1 -1
  49. package/exports/hosts/claude/export.manifest.json +6 -4
  50. package/exports/hosts/claude/host-package.json +3 -1
  51. package/exports/hosts/codex/AGENTS.md +1 -1
  52. package/exports/hosts/codex/export.manifest.json +6 -4
  53. package/exports/hosts/codex/host-package.json +3 -1
  54. package/exports/hosts/cursor/.cursor/hooks.json +4 -0
  55. package/exports/hosts/cursor/.cursor/rules/wazir-core.mdc +1 -1
  56. package/exports/hosts/cursor/export.manifest.json +6 -4
  57. package/exports/hosts/cursor/host-package.json +3 -1
  58. package/exports/hosts/gemini/GEMINI.md +1 -1
  59. package/exports/hosts/gemini/export.manifest.json +6 -4
  60. package/exports/hosts/gemini/host-package.json +3 -1
  61. package/hooks/context-mode-router +191 -0
  62. package/hooks/definitions/context_mode_router.yaml +19 -0
  63. package/hooks/hooks.json +31 -6
  64. package/hooks/protected-path-write-guard +8 -0
  65. package/hooks/routing-matrix.json +45 -0
  66. package/hooks/session-start +62 -1
  67. package/llms-full.txt +937 -134
  68. package/package.json +2 -4
  69. package/schemas/hook.schema.json +2 -1
  70. package/schemas/phase-report.schema.json +89 -0
  71. package/schemas/usage.schema.json +25 -1
  72. package/schemas/wazir-manifest.schema.json +19 -0
  73. package/skills/brainstorming/SKILL.md +32 -157
  74. package/skills/clarifier/SKILL.md +289 -111
  75. package/skills/claude-cli/SKILL.md +320 -0
  76. package/skills/codex-cli/SKILL.md +260 -0
  77. package/skills/debugging/SKILL.md +13 -0
  78. package/skills/design/SKILL.md +13 -0
  79. package/skills/dispatching-parallel-agents/SKILL.md +13 -0
  80. package/skills/executing-plans/SKILL.md +13 -0
  81. package/skills/executor/SKILL.md +139 -19
  82. package/skills/finishing-a-development-branch/SKILL.md +13 -0
  83. package/skills/gemini-cli/SKILL.md +260 -0
  84. package/skills/humanize/SKILL.md +13 -0
  85. package/skills/init-pipeline/SKILL.md +72 -164
  86. package/skills/prepare-next/SKILL.md +81 -10
  87. package/skills/receiving-code-review/SKILL.md +13 -0
  88. package/skills/requesting-code-review/SKILL.md +13 -0
  89. package/skills/reviewer/SKILL.md +369 -24
  90. package/skills/run-audit/SKILL.md +13 -0
  91. package/skills/scan-project/SKILL.md +13 -0
  92. package/skills/self-audit/SKILL.md +217 -16
  93. package/skills/skill-research/SKILL.md +188 -0
  94. package/skills/subagent-driven-development/SKILL.md +13 -0
  95. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +2 -0
  96. package/skills/subagent-driven-development/implementer-prompt.md +8 -0
  97. package/skills/subagent-driven-development/spec-reviewer-prompt.md +7 -0
  98. package/skills/tdd/SKILL.md +13 -0
  99. package/skills/using-git-worktrees/SKILL.md +13 -0
  100. package/skills/using-skills/SKILL.md +13 -0
  101. package/skills/verification/SKILL.md +54 -3
  102. package/skills/wazir/SKILL.md +464 -381
  103. package/skills/writing-plans/SKILL.md +14 -1
  104. package/skills/writing-skills/SKILL.md +13 -0
  105. package/templates/artifacts/implementation-plan.md +3 -0
  106. package/templates/artifacts/tasks-template.md +133 -0
  107. package/templates/examples/phase-report.example.json +48 -0
  108. package/tooling/src/adapters/composition-engine.js +256 -0
  109. package/tooling/src/adapters/model-router.js +84 -0
  110. package/tooling/src/capture/command.js +41 -2
  111. package/tooling/src/capture/run-config.js +3 -1
  112. package/tooling/src/capture/store.js +56 -0
  113. package/tooling/src/capture/usage.js +106 -0
  114. package/tooling/src/capture/user-input.js +66 -0
  115. package/tooling/src/checks/ac-matrix.js +256 -0
  116. package/tooling/src/checks/command-registry.js +12 -0
  117. package/tooling/src/checks/docs-truth.js +1 -1
  118. package/tooling/src/checks/security-sensitivity.js +69 -0
  119. package/tooling/src/checks/skills.js +111 -0
  120. package/tooling/src/cli.js +31 -20
  121. package/tooling/src/commands/stats.js +161 -0
  122. package/tooling/src/commands/validate.js +5 -1
  123. package/tooling/src/export/compiler.js +33 -37
  124. package/tooling/src/gating/agent.js +145 -0
  125. package/tooling/src/guards/phase-prerequisite-guard.js +185 -0
  126. package/tooling/src/hooks/routing-logic.js +69 -0
  127. package/tooling/src/init/auto-detect.js +258 -0
  128. package/tooling/src/init/command.js +38 -170
  129. package/tooling/src/input/scanner.js +46 -0
  130. package/tooling/src/reports/command.js +103 -0
  131. package/tooling/src/reports/phase-report.js +323 -0
  132. package/tooling/src/state/command.js +160 -0
  133. package/tooling/src/state/db.js +287 -0
  134. package/tooling/src/status/command.js +58 -1
  135. package/tooling/src/verify/proof-collector.js +299 -0
  136. package/wazir.manifest.yaml +26 -14
  137. package/workflows/plan-review.md +3 -1
  138. package/workflows/verify.md +30 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wazir-dev/cli",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "description": "Host-native engineering OS kit for AI coding agents — roles, phases, expertise modules, quality gates for Claude, Codex, Gemini & Cursor",
6
6
  "bin": {
@@ -29,7 +29,7 @@
29
29
  ],
30
30
  "scripts": {
31
31
  "test": "npm run test:active",
32
- "test:active": "node --test tooling/test/cli.test.js tooling/test/validate.test.js tooling/test/index.test.js tooling/test/doctor-status.test.js tooling/test/guard-hooks.test.js tooling/test/export.test.js tooling/test/capture.test.js tooling/test/schema-examples.test.js tooling/test/git-flow-docs.test.js tooling/test/role-contracts.test.js tooling/test/ci-workflow.test.js tooling/test/contributing.test.js tooling/test/author-artifact.test.js tooling/test/capture/usage.test.js tooling/test/docs-drift.test.js tooling/test/init.test.js",
32
+ "test:active": "node --test tooling/test/cli.test.js tooling/test/validate.test.js tooling/test/index.test.js tooling/test/doctor-status.test.js tooling/test/guard-hooks.test.js tooling/test/export.test.js tooling/test/capture.test.js tooling/test/schema-examples.test.js tooling/test/git-flow-docs.test.js tooling/test/role-contracts.test.js tooling/test/ci-workflow.test.js tooling/test/contributing.test.js tooling/test/author-artifact.test.js tooling/test/capture/usage.test.js tooling/test/adapters/composition-engine.test.js tooling/test/docs-drift.test.js tooling/test/init.test.js tooling/test/gating/agent.test.js tooling/test/guards/phase-prerequisite-guard.test.js tooling/test/hooks/context-mode-router.test.js tooling/test/hooks/session-start.test.js tooling/test/input-scanning.test.js tooling/test/init/auto-detect.test.js tooling/test/adapters/model-router.test.js tooling/test/state/db.test.js tooling/test/reports/phase-report.test.js tooling/test/logo-svg.test.js tooling/test/adapters/context-mode.test.js tooling/test/verify/proof-collector.test.js",
33
33
  "test:coverage": "c8 npm run test:active",
34
34
  "prepare": "husky"
35
35
  },
@@ -61,9 +61,7 @@
61
61
  "tdd"
62
62
  ],
63
63
  "dependencies": {
64
- "@inquirer/prompts": "^8.3.2",
65
64
  "ajv": "^8.18.0",
66
- "gray-matter": "^4.0.3",
67
65
  "yaml": "^2.0.0"
68
66
  },
69
67
  "devDependencies": {
@@ -23,7 +23,8 @@
23
23
  "pre_compact_summary",
24
24
  "stop_handoff_harvest",
25
25
  "protected_path_write_guard",
26
- "loop_cap_guard"
26
+ "loop_cap_guard",
27
+ "context_mode_router"
27
28
  ]
28
29
  },
29
30
  "description": { "type": "string", "minLength": 1 },
@@ -0,0 +1,89 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://wazir.dev/schemas/phase-report.schema.json",
4
+ "title": "Phase Report",
5
+ "type": "object",
6
+ "required": ["phase_name", "run_id", "timestamp", "attempted_actions", "drift_analysis", "quality_metrics", "risk_flags", "decisions"],
7
+ "properties": {
8
+ "phase_name": { "type": "string", "minLength": 1 },
9
+ "parent_phase": {
10
+ "type": "string",
11
+ "enum": ["init", "clarifier", "executor", "final_review"],
12
+ "description": "Top-level phase this workflow belongs to"
13
+ },
14
+ "workflow": {
15
+ "type": "string",
16
+ "description": "Specific workflow name within the parent phase (e.g. discover, specify, execute)"
17
+ },
18
+ "run_id": { "type": "string", "minLength": 1 },
19
+ "timestamp": { "type": "string", "format": "date-time" },
20
+ "attempted_actions": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "required": ["description", "outcome", "evidence"],
25
+ "properties": {
26
+ "description": { "type": "string", "minLength": 1 },
27
+ "outcome": { "type": "string", "enum": ["success", "fail", "uncertain"] },
28
+ "evidence": { "type": "string" }
29
+ },
30
+ "additionalProperties": true
31
+ }
32
+ },
33
+ "drift_analysis": {
34
+ "type": "object",
35
+ "required": ["delta"],
36
+ "properties": {
37
+ "delta": { "type": "integer", "minimum": 0 },
38
+ "description": { "type": "string" }
39
+ },
40
+ "additionalProperties": true
41
+ },
42
+ "quality_metrics": {
43
+ "type": "object",
44
+ "properties": {
45
+ "test_pass_count": { "type": "integer", "minimum": 0 },
46
+ "test_fail_count": { "type": "integer", "minimum": 0 },
47
+ "lint_errors": { "type": "integer", "minimum": 0 },
48
+ "type_errors": { "type": "integer", "minimum": 0 }
49
+ },
50
+ "additionalProperties": true
51
+ },
52
+ "risk_flags": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "object",
56
+ "required": ["severity", "description"],
57
+ "properties": {
58
+ "severity": { "type": "string", "enum": ["low", "medium", "high"] },
59
+ "description": { "type": "string", "minLength": 1 },
60
+ "mitigation": { "type": "string" }
61
+ },
62
+ "additionalProperties": true
63
+ }
64
+ },
65
+ "decisions": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "object",
69
+ "required": ["description", "rationale"],
70
+ "properties": {
71
+ "description": { "type": "string", "minLength": 1 },
72
+ "rationale": { "type": "string", "minLength": 1 },
73
+ "alternatives_considered": { "type": "array", "items": { "type": "string" } },
74
+ "source": { "type": "string" }
75
+ },
76
+ "additionalProperties": true
77
+ }
78
+ },
79
+ "verdict_recommendation": {
80
+ "type": "object",
81
+ "properties": {
82
+ "verdict": { "type": "string", "enum": ["continue", "loop_back", "escalate"] },
83
+ "reasoning": { "type": "string" }
84
+ },
85
+ "additionalProperties": true
86
+ }
87
+ },
88
+ "additionalProperties": true
89
+ }
@@ -4,7 +4,7 @@
4
4
  "title": "Usage Report",
5
5
  "description": "Per-run token usage tracking and context savings data.",
6
6
  "type": "object",
7
- "required": ["schema_version", "run_id", "created_at", "updated_at", "phases", "roles", "savings", "totals"],
7
+ "required": ["schema_version", "run_id", "created_at", "updated_at", "phases", "roles", "savings", "routing", "totals"],
8
8
  "properties": {
9
9
  "schema_version": { "type": "integer", "const": 1 },
10
10
  "run_id": { "type": "string", "minLength": 1 },
@@ -81,6 +81,30 @@
81
81
  "post_compaction_tokens_est": { "type": "integer", "minimum": 0 }
82
82
  },
83
83
  "additionalProperties": false
84
+ },
85
+ "index_queries": {
86
+ "type": "object",
87
+ "properties": {
88
+ "count": { "type": "integer", "minimum": 0 },
89
+ "total_raw_bytes": { "type": "integer", "minimum": 0 },
90
+ "total_summary_bytes": { "type": "integer", "minimum": 0 },
91
+ "estimated_tokens_saved": { "type": "integer", "minimum": 0 },
92
+ "bytes_avoided": { "type": "integer", "minimum": 0 }
93
+ },
94
+ "additionalProperties": false
95
+ }
96
+ },
97
+ "additionalProperties": false
98
+ },
99
+ "routing": {
100
+ "type": "object",
101
+ "properties": {
102
+ "total_commands": { "type": "integer", "minimum": 0 },
103
+ "context_mode_routed": { "type": "integer", "minimum": 0 },
104
+ "passthrough": { "type": "integer", "minimum": 0 },
105
+ "by_category": {
106
+ "type": "object",
107
+ "additionalProperties": { "type": "integer", "minimum": 0 }
84
108
  }
85
109
  },
86
110
  "additionalProperties": false
@@ -87,6 +87,25 @@
87
87
  "uniqueItems": true,
88
88
  "minItems": 1
89
89
  },
90
+ "phase_prerequisites": {
91
+ "type": "object",
92
+ "additionalProperties": {
93
+ "type": "object",
94
+ "properties": {
95
+ "required_artifacts": {
96
+ "type": "array",
97
+ "items": { "type": "string", "minLength": 1 },
98
+ "uniqueItems": true
99
+ },
100
+ "required_phase_exits": {
101
+ "type": "array",
102
+ "items": { "type": "string", "minLength": 1 },
103
+ "uniqueItems": true
104
+ }
105
+ },
106
+ "additionalProperties": false
107
+ }
108
+ },
90
109
  "roles": {
91
110
  "type": "array",
92
111
  "items": { "type": "string", "minLength": 1 },
@@ -5,6 +5,24 @@ description: Use before implementation work to turn operator briefings into an a
5
5
 
6
6
  # Brainstorming
7
7
 
8
+ ## Model Annotation
9
+ When multi-model mode is enabled:
10
+ - **Opus** for design exploration (brainstorm)
11
+ - **Opus** for design decisions (design)
12
+
13
+ ## Command Routing
14
+ Follow the Canonical Command Matrix in `hooks/routing-matrix.json`.
15
+ - Large commands (test runners, builds, diffs, dependency trees, linting) → context-mode tools
16
+ - Small commands (git status, ls, pwd, wazir CLI) → native Bash
17
+ - If context-mode unavailable, fall back to native Bash with warning
18
+
19
+ ## Codebase Exploration
20
+ 1. Query `wazir index search-symbols <query>` first
21
+ 2. Use `wazir recall file <path> --tier L1` for targeted reads
22
+ 3. Fall back to direct file reads ONLY for files identified by index queries
23
+ 4. Maximum 10 direct file reads without a justifying index query
24
+ 5. If no index exists: `wazir index build && wazir index summarize --tier all`
25
+
8
26
  Read `input/` first, then inspect only the repo surfaces needed to understand the request.
9
27
 
10
28
  Rules:
@@ -12,8 +30,20 @@ Rules:
12
30
  1. Do not write implementation code before the design is reviewed with the operator.
13
31
  2. Ask clarifying questions only when the ambiguity changes scope, architecture, or acceptance criteria.
14
32
  3. Propose 2-3 approaches with trade-offs and a recommendation.
15
- 4. Write the approved design to `.wazir/runs/latest/clarified/design.md` (if inside a pipeline run) or `docs/plans/YYYY-MM-DD-<topic>-design.md` (if standalone).
16
- 5. After user approves the design concept, the reviewer role runs the design-review loop with `--mode design-review` using canonical design-review dimensions (spec coverage, design-spec consistency, accessibility, visual consistency, exported-code fidelity). See `workflows/design-review.md` and `docs/reference/review-loop-pattern.md`. The designer resolves any findings. If the design-review loop completes all passes clean, hand off to `wz:writing-plans`. Planning does not start until design-review is complete.
33
+ 4. Present the approaches to the user for selection:
34
+
35
+ Ask the user via AskUserQuestion:
36
+ - **Question:** "Which design approach should we implement?"
37
+ - **Options:**
38
+ 1. "Approach A — [one-line summary with key trade-off]" *(Recommended)*
39
+ 2. "Approach B — [one-line summary with key trade-off]"
40
+ 3. "Approach C — [one-line summary with key trade-off]"
41
+ 4. "Modify an approach — let me specify changes"
42
+
43
+ Wait for the user's selection before continuing.
44
+
45
+ 5. Write the approved design to `.wazir/runs/latest/clarified/design.md` (if inside a pipeline run) or `docs/plans/YYYY-MM-DD-<topic>-design.md` (if standalone).
46
+ 6. After user approves the design concept, the reviewer role runs the design-review loop with `--mode design-review` using canonical design-review dimensions (spec coverage, design-spec consistency, accessibility, visual consistency, exported-code fidelity). See `workflows/design-review.md` and `docs/reference/review-loop-pattern.md`. The designer resolves any findings. If the design-review loop completes all passes clean, hand off to `wz:writing-plans`. Planning does not start until design-review is complete.
17
47
 
18
48
  Required outputs:
19
49
 
@@ -21,158 +51,3 @@ Required outputs:
21
51
  - open questions or resolved assumptions
22
52
  - explicit recommendation and rejected alternatives
23
53
 
24
- ---
25
-
26
- ## Team Mode: Agent Teams Structured Dialogue
27
-
28
- **Condition:** Only activate when `team_mode: parallel` in `.wazir/runs/latest/run-config.yaml`. Otherwise, use the default single-agent brainstorming above.
29
-
30
- This mode uses **Agent Teams** (experimental, Claude Code + Opus 4.6) to run a
31
- multi-agent brainstorming session. Your role is the **Arbiter** — you coordinate
32
- the dialogue, evaluate convergence, and signal when to stop. You do NOT generate
33
- design ideas yourself.
34
-
35
- ### Infrastructure: Claude Code Agent Teams
36
-
37
- This skill uses **Agent Teams** — not subagents. The distinction matters:
38
-
39
- | | Subagents (Task tool) | Agent Teams |
40
- |---|---|---|
41
- | **Lifecycle** | Spawn, return result, die | Full independent sessions that persist for team lifetime |
42
- | **Communication** | Report back to parent only | Direct peer-to-peer messaging via `SendMessage` |
43
- | **Coordination** | Parent manages everything | Shared task list with self-coordination |
44
-
45
- **Critical constraint:** Text output from teammates is NOT visible to the team.
46
- Teammates MUST use `SendMessage` to communicate with each other. Regular text
47
- output is only visible in a teammate's own terminal pane.
48
-
49
- ### Prerequisites
50
-
51
- ```bash
52
- # Check if Agent Teams is enabled
53
- echo $CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS
54
- ```
55
-
56
- If not set (empty), tell the user:
57
-
58
- > Agent Teams is not enabled. Run this command and restart Claude Code:
59
- > ```bash
60
- > claude config set env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS 1
61
- > ```
62
-
63
- Then fall back to single-agent brainstorming (rules 1-5 above).
64
-
65
- ### Step 1: Create the Team
66
-
67
- Derive `<concept-slug>` from the briefing topic (lowercased, hyphens for spaces).
68
-
69
- Use `TeamCreate` to initialize the team with the name `wazir-brainstorm-<concept-slug>`.
70
-
71
- ### Step 2: Spawn Teammates
72
-
73
- Spawn three teammates using the `Agent` tool with the `team_name` parameter set
74
- to `wazir-brainstorm-<concept-slug>`. Each agent receives a detailed system
75
- prompt via the `prompt` parameter.
76
-
77
- #### Free Thinker
78
-
79
- ```
80
- Agent(
81
- team_name: "wazir-brainstorm-<concept-slug>",
82
- prompt: "You are the Free Thinker in a Wazir brainstorming session.
83
- Your job is to propose creative design directions without self-censoring.
84
- Open new threads, explore possibilities, make connections. Communicate
85
- ONLY via SendMessage — your text output is not visible to the team.
86
- After proposing a direction, wait for the Grounder's response before
87
- opening a new one."
88
- )
89
- ```
90
-
91
- #### Grounder
92
-
93
- ```
94
- Agent(
95
- team_name: "wazir-brainstorm-<concept-slug>",
96
- prompt: "You are the Grounder in a Wazir brainstorming session. Your
97
- job is to challenge every proposal from the Free Thinker with practical
98
- concerns: feasibility, complexity, risk, alternatives. After 3-5
99
- exchanges on a direction, decide: pursue, park, or redirect.
100
- Communicate ONLY via SendMessage — your text output is not visible to
101
- the team."
102
- )
103
- ```
104
-
105
- #### Synthesizer
106
-
107
- ```
108
- Agent(
109
- team_name: "wazir-brainstorm-<concept-slug>",
110
- prompt: "You are the Synthesizer in a Wazir brainstorming session.
111
- You NEVER participate in dialogue — only observe. Read all SendMessage
112
- traffic between Free Thinker and Grounder. When the Arbiter signals
113
- convergence, write the final design document to
114
- .wazir/runs/latest/clarified/design.md with: design summary, pursued
115
- directions, rejected alternatives, open questions, recommendation."
116
- )
117
- ```
118
-
119
- ### Step 3: Coordinate the Dialogue (You Are the Arbiter)
120
-
121
- 1. Use `SendMessage` to tell the Free Thinker to open the first direction
122
- based on the briefing, research brief, and hardened spec.
123
- 2. Monitor exchanges via `SendMessage`. Do NOT generate ideas — only
124
- coordinate, nudge, and evaluate.
125
- 3. After each direction is explored (3-5 exchanges), the Grounder decides:
126
- **pursue**, **park**, or **redirect**.
127
- 4. After depth-appropriate directions are explored:
128
-
129
- | Depth | Directions to explore | Exchanges per direction |
130
- |-------|-----------------------|------------------------|
131
- | Standard | 3-5 | 3-5 exchanges |
132
- | Deep | 5-8 | 5-8 exchanges |
133
-
134
- 5. **Signal convergence:** Use `SendMessage` to tell the Synthesizer to
135
- produce the final design document.
136
- 6. Wait for the Synthesizer to write the design to
137
- `.wazir/runs/latest/clarified/design.md` (if inside a pipeline run) or
138
- `docs/plans/YYYY-MM-DD-<topic>-design.md` (if standalone).
139
-
140
- ### Step 4: Convergence Criteria
141
-
142
- The dialogue has converged when:
143
-
144
- 1. Enough directions have been explored for the depth level
145
- 2. The pursued directions have genuine range (not variations of the same idea)
146
- 3. The Grounder signals satisfaction
147
- 4. Further dialogue is producing diminishing returns
148
-
149
- Early rounds should be more divergent. Later rounds more convergent.
150
-
151
- ### Step 5: Clean Up
152
-
153
- Use `TeamDelete` to tear down the team after the Synthesizer has written the
154
- design document.
155
-
156
- ### Constraints
157
-
158
- - Text output from teammates is NOT visible to the team — they MUST use
159
- `SendMessage`
160
- - The Arbiter (you) coordinates but does NOT generate ideas
161
- - The Synthesizer NEVER sends messages — only reads and writes files
162
- - Free Thinker and Grounder exchange via broadcast (all agents see every
163
- message)
164
-
165
- ### Output
166
-
167
- The Synthesizer produces the design document following the same format as
168
- single-agent brainstorming:
169
-
170
- - Design summary
171
- - Pursued directions with rationale
172
- - Rejected alternatives with reasons
173
- - Open questions or resolved assumptions
174
- - Explicit recommendation
175
-
176
- After the design is written, submit it for the design-review loop
177
- (`--mode design-review`). After design-review is complete, hand off to
178
- `wz:writing-plans`.