maestro-flow-one 0.2.4 → 0.2.5

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.
@@ -36,7 +36,8 @@ Scope routing, flags, resolution logic, output directory format, artifact regist
36
36
 
37
37
  1. **Codebase docs**: If `.workflow/codebase/doc-index.json` exists, read `ARCHITECTURE.md` for module boundaries. Pass as shared context to executor agents.
38
38
  2. **Wiki knowledge**: Run `maestro wiki search "<phase keywords>" --json 2>/dev/null`. If results found, extract top 5 entries as prior knowledge context for agents.
39
- 3. Both are optional proceed without if unavailable (log warning).
39
+ 3. **Coding specs + tools**: Run `maestro spec load --category coding` to load coding conventions AND discoverable knowhow tools (tool: true entries). Pass as specs context to all executor agents.
40
+ 4. All are optional — proceed without if unavailable (log warning).
40
41
 
41
42
  ### Role Knowledge
42
43
  1. Browse accumulated knowledge for this role:
@@ -17,7 +17,7 @@ Codify reusable business processes as knowhow documents with `tool: true` in `.w
17
17
 
18
18
  When to register: during planning to standardize a business process (e.g. payment reconciliation, OAuth integration steps); after execution to capture a validated procedure (e.g. database migration rollback); before testing to register verification methods for test agents (e.g. E2E checkout flow, API idempotency verification); during retrospective/harvest to extract reusable process knowledge from artifacts.
19
19
 
20
- Three modes: Extract (from code/docs), Generate (from description), Optimize (improve existing).
20
+ Four modes: Extract (from code/docs), Generate (from description), Optimize (improve existing), Promote (existing knowhow → tool in place).
21
21
  Short processes (<10 steps) inline; long processes (>=10 steps) use ref mode with knowhow detail doc.
22
22
  </purpose>
23
23
 
@@ -34,6 +34,8 @@ $ARGUMENTS — Intent description
34
34
  /maestro-tools-register generate Stripe webhook idempotency verification
35
35
  /maestro-tools-register generate E2E checkout flow with payment gateway mock setup
36
36
  /maestro-tools-register optimize e2e-checkout tool
37
+ /maestro-tools-register promote RCP-db-migration-rollback as test tool
38
+ /maestro-tools-register promote knowhow-auth-api to coding tool
37
39
  ```
38
40
  </context>
39
41
 
@@ -44,6 +46,7 @@ $ARGUMENTS — Intent description
44
46
  Parse $ARGUMENTS to determine mode:
45
47
  - Contains "extract" → extract mode
46
48
  - Contains "optimize/improve" → optimize mode
49
+ - Contains "promote" or references existing knowhow doc (path/ID) → promote mode
47
50
  - Other → generate mode
48
51
  - Empty → ask user with AskUserQuestion
49
52
 
@@ -61,16 +64,34 @@ Parse $ARGUMENTS to determine mode:
61
64
  - Load existing tool: `maestro spec load --category coding --keyword <name>`
62
65
  - Analyze improvement points (step splitting, prerequisites, error handling)
63
66
 
67
+ **Promote mode** (existing knowhow → tool):
68
+ - Locate document: `maestro wiki list --keyword <name>` or by path in `.workflow/knowhow/`
69
+ - Read document, verify it contains actionable steps (numbered list or ## Steps section)
70
+ - If no actionable steps, suggest extract mode instead
71
+ - Determine category (Step 3) and summary ("Use when ...")
72
+ - Update frontmatter via: `maestro wiki update <id> --frontmatter '{"tool": true, "category": "<cat>", "summary": "<summary>"}'`
73
+ - Do NOT recreate the document — modify in place
74
+
64
75
  **For all modes** — identify the usage timing: when should an agent or user invoke this tool? This becomes the first line of the entry description (see Step 5).
65
76
 
66
77
  ### Step 3: Determine Category
67
78
 
68
- Infer applicable category from context, or ask user:
69
- - coding — execution tools (build, deploy, integrate)
70
- - test testing tools (test flows, verification steps)
71
- - review — review tools (checklists, audit standards)
72
- - arch planning tools (design flows, analysis steps)
73
- - debug analysis tools (diagnostic flows, investigation steps)
79
+ **Core principle**: `category` = **who consumes this tool** (which agent type discovers and uses it), not what the content is about.
80
+
81
+ | Category | Consumer Agent | Decision Question | Signal Words |
82
+ |---|---|---|---|
83
+ | `coding` | code-developer, workflow-executor | 开发者实现时需要这个流程吗? | build, deploy, integrate, configure, setup, migrate, api-contract |
84
+ | `test` | tdd-developer, test-fix-agent | 测试者验证行为时需要这个流程吗? | verify, validate, assert, e2e, regression, coverage, idempotency |
85
+ | `review` | workflow-reviewer | 审查者需要这个作为 checklist 吗? | audit, checklist, compliance, quality-gate, standard |
86
+ | `arch` | workflow-planner | 规划者设计方案时需要这个吗? | design, architecture, decompose, trade-off, migration-strategy |
87
+ | `debug` | debug-explore-agent | 调试者排查问题时需要这个吗? | diagnose, trace, investigate, root-cause, reproduce |
88
+
89
+ **Multi-consumer split**: If content serves multiple consumers (e.g., API doc for both dev and test), split into separate documents:
90
+ - API contract (what endpoints look like) → `category: coding` (AST-*, tool: false)
91
+ - API verification steps (how to test) → `category: test` (RCP-*, tool: true)
92
+ - Ask user when ambiguous: "This tool content serves both developers and testers. Split into separate documents?"
93
+
94
+ **Ambiguous cases**: Choose the **primary consumer** — the agent that would fail without this knowledge.
74
95
 
75
96
  ### Step 4: Decide Inline vs Ref
76
97
 
@@ -34,6 +34,9 @@ Arguments: $ARGUMENTS
34
34
  | `reference` | REF- | External doc / API quick-ref | source URL, key points, scenarios |
35
35
  | `decision` | DCS- | Design decision record | context, alternatives, rationale, consequences |
36
36
  | `tip` | TIP- | Quick note / reminder | content, tags |
37
+ | `asset` | AST- | Code asset (API contract, data model) | assetType, codePaths, category |
38
+ | `blueprint` | BLP- | Architecture design with code paths | codePaths, category |
39
+ | `document` | DOC- | General long-form (fallback) | — |
37
40
 
38
41
  No arguments: auto-detect type or ask user via AskUserQuestion.
39
42
 
@@ -42,6 +45,9 @@ No arguments: auto-detect type or ask user via AskUserQuestion.
42
45
  - `--source <url>` — Source URL for references
43
46
  - `--tag tag1,tag2` — Categorization tags
44
47
  - `--title <title>` — Explicit title (auto-generated if omitted)
48
+ - `--asset-type <type>` — Asset subtype: api-contract, data-model, prompt, config, etc.
49
+ - `--code-paths <paths>` — Related source paths for asset/blueprint (comma-separated)
50
+ - `--category <cat>` — Spec category for agent discovery (coding, arch, test, debug, review, learning)
45
51
  </context>
46
52
 
47
53
  <execution>
@@ -58,8 +64,11 @@ Parse first token as type. If ambiguous, AskUserQuestion with options:
58
64
  | `reference`, `ref`, `参考`, `引用` | reference |
59
65
  | `decision`, `dcs`, `决策`, `adr` | decision |
60
66
  | `tip`, `note`, `记录`, `快速` | tip |
67
+ | `asset`, `ast`, `资产`, `契约` | asset |
68
+ | `blueprint`, `blp`, `蓝图` | blueprint |
69
+ | `document`, `doc`, `文档` | document |
61
70
  | No match, short text, `--tag` present | tip |
62
- | No arguments | AskUserQuestion (6 options) |
71
+ | No arguments | AskUserQuestion (9 options) |
63
72
 
64
73
  ### Step 2: Generate Content by Type
65
74
 
@@ -47,7 +47,8 @@ Extract conclusions from related artifacts that may affect this debug session
47
47
 
48
48
  1. **Codebase docs**: If `.workflow/codebase/ARCHITECTURE.md` exists, load module boundaries to scope impact analysis and inform hypothesis formation.
49
49
  2. **Wiki prior knowledge**: Run `maestro wiki search "<symptom keywords>" --json 2>/dev/null`. If results found, check for prior investigations on similar issues to avoid re-investigation.
50
- 3. Both are optional proceed without if unavailable.
50
+ 3. **Debug specs + tools**: Run `maestro spec load --category debug --keyword "<symptom keywords>"`. If tools found, extract known issues, workarounds, and root-cause notes to inform hypotheses.
51
+ 4. All are optional — proceed without if unavailable.
51
52
 
52
53
  ### Role Knowledge
53
54
  1. Browse accumulated knowledge for this role:
@@ -52,7 +52,8 @@ Extract conclusions from related artifacts that may affect this review. Pass as
52
52
 
53
53
  1. **Codebase docs**: If `.workflow/codebase/ARCHITECTURE.md` exists, load component boundaries and layer rules. Pass as `codebase_context` to reviewer agents (especially architecture dimension).
54
54
  2. **Wiki constraints**: Run `maestro wiki search "architecture constraint" --json 2>/dev/null`. If results found, pass as `wiki_context` to reviewer agents for evaluating code against documented decisions.
55
- 3. Both are optional proceed without if unavailable.
55
+ 3. **Review specs + tools**: Run `maestro spec load --category review` to load review standards, checklists, AND discoverable knowhow tools. Pass as `specs_content` to all reviewer agents.
56
+ 4. All are optional — proceed without if unavailable.
56
57
 
57
58
  ### Role Knowledge
58
59
  1. Browse accumulated knowledge for this role:
@@ -40,6 +40,11 @@ Follow '~/.maestro/workflows/test.md' completely.
40
40
 
41
41
  **Command-specific extensions (not in workflow):**
42
42
 
43
+ **Test tool discovery** (knowhow tools as scenario source):
44
+ - Load registered test tools: `maestro spec load --category test --keyword <feature>`
45
+ - If tools found, extract their steps as additional test scenarios marked `source: "tool"`
46
+ - Each numbered step in a tool becomes a UAT test with its assertion as `expected` behavior
47
+
43
48
  **Review findings integration** (from related review artifacts):
44
49
  - Extract critical/high findings as additional test scenarios, marked `source: "review_finding"`
45
50
  - When review verdict is "BLOCK" and review-finding tests fail, auto-enter gap-fix loop
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maestro-flow-one",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "All Maestro workflow commands as a single Claude Code skill — intent routing, decision gates, minimal closed-loop chains",
5
5
  "bin": {
6
6
  "maestro-flow": "bin/maestro-flow.js"
@@ -1,71 +0,0 @@
1
- ---
2
- name: maestro-link-coordinate
3
- description: Execute command chain nodes step by step
4
- argument-hint: "\"intent text\" [--list] [-c [sessionId]] [--chain <name>] [--tool <tool>] [-y]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Edit
9
- - Bash
10
- - Glob
11
- - Grep
12
- - Agent
13
- ---
14
- <purpose>
15
- Step-mode workflow coordinator using `maestro coordinate` CLI subcommands (start/next/status).
16
- Walks chain graphs node by node — each command node executed via `maestro delegate` internally.
17
- Decision/gate/eval nodes auto-resolve between steps. Session persisted for resume.
18
- </purpose>
19
-
20
- <required_reading>
21
- @~/.maestro/workflows/maestro-link-coordinate.md
22
- </required_reading>
23
-
24
- <context>
25
- $ARGUMENTS — user intent text, or flags.
26
-
27
- **Flags:**
28
- - `--list` — List all available chain graphs
29
- - `-c` / `--continue [sessionId]` — Resume step_paused session via `coordinate next`
30
- - `--chain <name>` — Force a specific chain graph
31
- - `--tool <tool>` — CLI tool override (default: claude)
32
- - `-y` / `--yes` — Auto mode
33
-
34
- **CLI endpoints used:**
35
- - `maestro coordinate list` — enumerate chains
36
- - `maestro coordinate start "intent" --chain X` — begin step-mode session
37
- - `maestro coordinate next [sessionId]` — advance one step
38
- - `maestro coordinate status [sessionId]` — query state
39
- - `maestro coordinate run "intent"` — autonomous full run
40
- - `maestro coordinate watch <sessionId> [--follow]` — read-only event tail (separate from driver loop)
41
- - `maestro coordinate report` — agent-invoked command-node result writer (authoritative result channel)
42
-
43
- **Internal walker capabilities (invisible to driver loop):**
44
- - Prompt assembly owned by the walker (main flow) for both command and decision nodes
45
- - Decision nodes auto-resolve via `strategy: 'expr'` (fast path) with LLM decider fallback when expr has no match and no default edge, or explicit `strategy: 'llm'`
46
- - Walker events published to a file/SQLite broker for `watch` observers
47
- - LLM decision in step mode is synchronous — avoid tight per-step deadlines
48
- </context>
49
-
50
- <execution>
51
- Follow '~/.maestro/workflows/maestro-link-coordinate.md' completely.
52
- </execution>
53
-
54
- <error_codes>
55
- | Code | Severity | Description | Recovery |
56
- |------|----------|-------------|----------|
57
- | E001 | error | No intent and no --list/--chain | Suggest --list |
58
- | E002 | error | Chain graph not found | Show list output |
59
- | E003 | error | Step execution failed | Check status, retry next |
60
- | E004 | error | Resume session not found | List sessions |
61
- | E005 | error | CLI endpoint unavailable | Check maestro installation |
62
- </error_codes>
63
-
64
- <success_criteria>
65
- - [ ] Chain graph loaded via `maestro coordinate start`
66
- - [ ] Each step executed via `maestro coordinate next` loop
67
- - [ ] JSON output parsed for session tracking
68
- - [ ] Decision nodes auto-resolved between steps
69
- - [ ] Session persisted and resumable via `-c`
70
- - [ ] Completion summary displayed
71
- </success_criteria>