maestro-flow-one 0.2.34 → 0.2.35
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/maestro-flow/commands/learn/investigate.md +151 -152
- package/maestro-flow/commands/learn/second-opinion.md +118 -122
- package/maestro-flow/commands/lifecycle/analyze.md +215 -266
- package/maestro-flow/commands/lifecycle/blueprint.md +189 -204
- package/maestro-flow/commands/lifecycle/brainstorm.md +209 -213
- package/maestro-flow/commands/lifecycle/companion.md +531 -531
- package/maestro-flow/commands/lifecycle/composer.md +188 -179
- package/maestro-flow/commands/lifecycle/execute.md +183 -184
- package/maestro-flow/commands/lifecycle/fork.md +111 -110
- package/maestro-flow/commands/lifecycle/grill.md +175 -176
- package/maestro-flow/commands/lifecycle/guard.md +103 -102
- package/maestro-flow/commands/lifecycle/impeccable.md +311 -268
- package/maestro-flow/commands/lifecycle/init.md +130 -131
- package/maestro-flow/commands/lifecycle/merge.md +87 -80
- package/maestro-flow/commands/lifecycle/next.md +253 -257
- package/maestro-flow/commands/lifecycle/overlay.md +188 -178
- package/maestro-flow/commands/lifecycle/plan.md +225 -211
- package/maestro-flow/commands/lifecycle/quick.md +83 -77
- package/maestro-flow/commands/lifecycle/roadmap.md +173 -186
- package/maestro-flow/commands/lifecycle/swarm-workflow.md +243 -264
- package/maestro-flow/commands/lifecycle/tools-execute.md +122 -117
- package/maestro-flow/commands/lifecycle/tools-register.md +162 -157
- package/maestro-flow/commands/lifecycle/ui-codify.md +117 -100
- package/maestro-flow/commands/lifecycle/universal-workflow.md +548 -561
- package/maestro-flow/commands/lifecycle/update.md +122 -119
- package/maestro-flow/commands/manage/codebase-rebuild.md +87 -85
- package/maestro-flow/commands/manage/harvest.md +97 -95
- package/maestro-flow/commands/manage/issue-discover.md +83 -81
- package/maestro-flow/commands/manage/issue.md +72 -73
- package/maestro-flow/commands/manage/kg-extractors.md +128 -0
- package/maestro-flow/commands/manage/knowhow-capture.md +92 -82
- package/maestro-flow/commands/manage/knowhow.md +83 -79
- package/maestro-flow/commands/manage/knowledge-audit.md +105 -88
- package/maestro-flow/commands/manage/status.md +62 -52
- package/maestro-flow/commands/manage/wiki.md +82 -71
- package/maestro-flow/commands/milestone/audit.md +4 -10
- package/maestro-flow/commands/milestone/complete.md +6 -7
- package/maestro-flow/commands/milestone/release.md +136 -145
- package/maestro-flow/commands/quality/auto-test.md +153 -136
- package/maestro-flow/commands/quality/debug.md +159 -120
- package/maestro-flow/commands/quality/refactor.md +105 -67
- package/maestro-flow/commands/quality/retrospective.md +123 -77
- package/maestro-flow/commands/quality/review.md +155 -128
- package/maestro-flow/commands/quality/sync.md +88 -52
- package/maestro-flow/commands/quality/test.md +147 -117
- package/maestro-flow/commands/spec/add.md +77 -70
- package/maestro-flow/commands/spec/setup.md +49 -52
- package/package.json +1 -1
- package/maestro-flow/commands/lifecycle/odyssey-debug.md +0 -473
- package/maestro-flow/commands/lifecycle/odyssey-improve.md +0 -505
- package/maestro-flow/commands/lifecycle/odyssey-planex.md +0 -601
- package/maestro-flow/commands/lifecycle/odyssey-review-test-fix.md +0 -427
- package/maestro-flow/commands/lifecycle/odyssey-ui.md +0 -462
- package/maestro-flow/commands/lifecycle/security-audit.md +0 -179
|
@@ -1,81 +1,83 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: manage-issue-discover
|
|
3
|
-
description: Discover issues via multi-perspective analysis
|
|
4
|
-
argument-hint: "[multi-perspective | by-prompt <prompt>] [-y] [--scope <glob>] [--depth standard|deep]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Bash
|
|
9
|
-
- Glob
|
|
10
|
-
- Grep
|
|
11
|
-
- Agent
|
|
12
|
-
- AskUserQuestion
|
|
13
|
-
---
|
|
14
|
-
<purpose>
|
|
15
|
-
Automated issue discovery
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- `
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</
|
|
65
|
-
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
1
|
+
---
|
|
2
|
+
name: manage-issue-discover
|
|
3
|
+
description: Discover issues via multi-perspective analysis
|
|
4
|
+
argument-hint: "[multi-perspective | by-prompt <prompt>] [-y] [--scope <glob>] [--depth standard|deep]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- Agent
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
---
|
|
14
|
+
<purpose>
|
|
15
|
+
Automated issue discovery: multi-perspective (8 perspectives) or prompt-driven. Deduplicates and records to `issues.jsonl`. For CRUD operations, use `/manage-issue`.
|
|
16
|
+
</purpose>
|
|
17
|
+
|
|
18
|
+
<required_reading>
|
|
19
|
+
@~/.maestro/workflows/issue-discover.md
|
|
20
|
+
</required_reading>
|
|
21
|
+
|
|
22
|
+
<deferred_reading>
|
|
23
|
+
- [issue.json template](~/.maestro/templates/issue.json) — read when creating issue records from findings (Step 6/11)
|
|
24
|
+
- [search-tools](~/.maestro/templates/search-tools.md) — search tool priority, passed to agents via workflow
|
|
25
|
+
</deferred_reading>
|
|
26
|
+
|
|
27
|
+
<context>
|
|
28
|
+
$ARGUMENTS -- optional. Parse first token to determine mode.
|
|
29
|
+
|
|
30
|
+
**Modes:**
|
|
31
|
+
- _(empty)_ -- interactive mode selection (AskUserQuestion)
|
|
32
|
+
- `multi-perspective` -- 8-perspective parallel agent scan
|
|
33
|
+
- `by-prompt "..."` -- prompt-driven iterative agent exploration (CLI-planned)
|
|
34
|
+
|
|
35
|
+
**Flags:**
|
|
36
|
+
- `-y` / `--yes` -- auto mode, skip confirmations
|
|
37
|
+
- `--scope=<pattern>` -- file scope (default: `**/*`)
|
|
38
|
+
- `--depth=standard|deep` -- exploration depth (by-prompt only, default: `standard`)
|
|
39
|
+
|
|
40
|
+
**State files:**
|
|
41
|
+
- `.workflow/issues/issues.jsonl` -- issues appended here (set `source: "discover"` on each row so concurrent writers like `manage-harvest` with `source: "harvest"` can be distinguished and deduplicated)
|
|
42
|
+
- `.workflow/issues/discoveries/{SESSION_ID}/` -- session artifacts
|
|
43
|
+
|
|
44
|
+
### Pre-load specs
|
|
45
|
+
1. **Debug specs**: Run `maestro spec load --category debug` to load known antipatterns, root causes, and gotchas. Informs discovery perspectives with prior findings.
|
|
46
|
+
2. Optional — proceed without if unavailable.
|
|
47
|
+
</context>
|
|
48
|
+
|
|
49
|
+
<execution>
|
|
50
|
+
Determine mode from $ARGUMENTS:
|
|
51
|
+
- No arguments or empty → interactive selection via AskUserQuestion
|
|
52
|
+
- First token is `multi-perspective` → multi-perspective mode
|
|
53
|
+
- First token is `by-prompt` → prompt-driven mode, remaining tokens are the user prompt
|
|
54
|
+
|
|
55
|
+
Follow '~/.maestro/workflows/issue-discover.md' completely.
|
|
56
|
+
</execution>
|
|
57
|
+
|
|
58
|
+
<error_codes>
|
|
59
|
+
| Code | Severity | Condition | Recovery |
|
|
60
|
+
|------|----------|-----------|----------|
|
|
61
|
+
| E_NO_PROJECT | error | `.workflow/` does not exist | Prompt user to run `/maestro-init` first |
|
|
62
|
+
| E_DISCOVERY_FAILED | error | CLI analysis returned no results | Retry with different tool or report partial findings |
|
|
63
|
+
| E_EMPTY_PROMPT | warning | `by-prompt` used without prompt text | Interactive prompt with suggested options |
|
|
64
|
+
</error_codes>
|
|
65
|
+
|
|
66
|
+
<success_criteria>
|
|
67
|
+
- [ ] Discovery mode correctly determined from arguments
|
|
68
|
+
- [ ] All perspectives analyzed (multi-perspective) or dimensions explored (by-prompt)
|
|
69
|
+
- [ ] Findings deduplicated before issue creation
|
|
70
|
+
- [ ] Issues appended to issues.jsonl with correct schema
|
|
71
|
+
- [ ] Discovery session fully traceable via session directory
|
|
72
|
+
- [ ] Next step routed
|
|
73
|
+
</success_criteria>
|
|
74
|
+
|
|
75
|
+
<completion>
|
|
76
|
+
### Next-step routing
|
|
77
|
+
|
|
78
|
+
| Condition | Suggestion |
|
|
79
|
+
|-----------|-----------|
|
|
80
|
+
| Issues discovered | `/manage-issue list` to review |
|
|
81
|
+
| Need root cause analysis | `/maestro-analyze --gaps <ISS-ID>` |
|
|
82
|
+
| Want to plan fixes | `/maestro-plan --gaps` |
|
|
83
|
+
</completion>
|
|
@@ -1,73 +1,72 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: manage-issue
|
|
3
|
-
description: Create, query, update, close, and link issues
|
|
4
|
-
argument-hint: "<subcommand: create|list|status|update|close|link> [--title text] [--severity S] [--status S] [--resolution text]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- AskUserQuestion
|
|
13
|
-
---
|
|
14
|
-
<purpose>
|
|
15
|
-
Issue lifecycle management
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
</
|
|
25
|
-
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- `
|
|
35
|
-
- `
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- `
|
|
39
|
-
- `
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
|
60
|
-
|
|
61
|
-
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- [ ]
|
|
68
|
-
- [ ]
|
|
69
|
-
- [ ]
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: manage-issue
|
|
3
|
+
description: Create, query, update, close, and link issues
|
|
4
|
+
argument-hint: "<subcommand: create|list|status|update|close|link> [--title text] [--severity S] [--status S] [--resolution text]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
---
|
|
14
|
+
<purpose>
|
|
15
|
+
Issue lifecycle management: create, list, status, update, close, link. Stored in `.workflow/issues/issues.jsonl`. For automated discovery, use `/manage-issue-discover`.
|
|
16
|
+
</purpose>
|
|
17
|
+
|
|
18
|
+
<required_reading>
|
|
19
|
+
@~/.maestro/workflows/issue.md
|
|
20
|
+
</required_reading>
|
|
21
|
+
|
|
22
|
+
<deferred_reading>
|
|
23
|
+
- [issue.json template](~/.maestro/templates/issue.json) — read when creating or updating issue records (create, update, close)
|
|
24
|
+
</deferred_reading>
|
|
25
|
+
|
|
26
|
+
<context>
|
|
27
|
+
$ARGUMENTS -- subcommand + options. Parse first token as subcommand.
|
|
28
|
+
|
|
29
|
+
**Valid subcommands:**
|
|
30
|
+
- `create` -- create a new issue (--title, --severity, --source, --phase, --description)
|
|
31
|
+
- `list` -- list issues with optional filters (--status, --phase, --severity, --source)
|
|
32
|
+
- `status` -- show full detail for a specific issue (ISS-XXXXXXXX-NNN)
|
|
33
|
+
- `update` -- update issue fields (ISS-XXXXXXXX-NNN --status, --priority, --severity, --tags, ...)
|
|
34
|
+
- `close` -- close an issue with resolution (ISS-XXXXXXXX-NNN --resolution)
|
|
35
|
+
- `link` -- link issue to a task (ISS-XXXXXXXX-NNN --task TASK-NNN)
|
|
36
|
+
|
|
37
|
+
**State files:**
|
|
38
|
+
- `.workflow/issues/issues.jsonl` -- active issues (one JSON per line)
|
|
39
|
+
- `.workflow/issues/issue-history.jsonl` -- archived/closed issues
|
|
40
|
+
</context>
|
|
41
|
+
|
|
42
|
+
<execution>
|
|
43
|
+
Parse subcommand from first token of $ARGUMENTS.
|
|
44
|
+
Follow '~/.maestro/workflows/issue.md' completely.
|
|
45
|
+
|
|
46
|
+
</execution>
|
|
47
|
+
|
|
48
|
+
<completion>
|
|
49
|
+
### Next-step routing
|
|
50
|
+
|
|
51
|
+
| Subcommand | Suggestion |
|
|
52
|
+
|-----------|-----------|
|
|
53
|
+
| create | `/maestro-analyze --gaps <ISS-ID>` or `/maestro-plan --gaps` |
|
|
54
|
+
| list | `/maestro-analyze --gaps <ISS-ID>` for open issues |
|
|
55
|
+
| close | `/manage-status` |
|
|
56
|
+
</completion>
|
|
57
|
+
|
|
58
|
+
<error_codes>
|
|
59
|
+
| Code | Severity | Condition | Recovery |
|
|
60
|
+
|------|----------|-----------|----------|
|
|
61
|
+
| E_NO_SUBCOMMAND | error | No subcommand provided in $ARGUMENTS | Display valid subcommands, prompt user to select |
|
|
62
|
+
| E_INVALID_SUBCOMMAND | error | Unrecognized subcommand | Display valid subcommands with usage hints |
|
|
63
|
+
| E_ISSUES_DIR_MISSING | warning | `.workflow/issues/` directory does not exist | Auto-create directory and empty issues.jsonl |
|
|
64
|
+
</error_codes>
|
|
65
|
+
|
|
66
|
+
<success_criteria>
|
|
67
|
+
- [ ] Subcommand parsed and routed to correct handler
|
|
68
|
+
- [ ] Issue data read/written to correct JSONL file
|
|
69
|
+
- [ ] Output displayed in appropriate format (table for list, detail for status)
|
|
70
|
+
- [ ] Cross-references maintained (link creates bidirectional references)
|
|
71
|
+
- [ ] Next step routed by subcommand
|
|
72
|
+
</success_criteria>
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: manage-kg-extractors
|
|
3
|
+
description: Analyze codebase patterns and generate .workflow/kg/extractors.yaml for custom symbol extraction
|
|
4
|
+
argument-hint: "[--scan-only] [--append] [--language <lang>]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<purpose>
|
|
17
|
+
Analyze current repository's code patterns to auto-generate `.workflow/kg/extractors.yaml` — a declarative config that teaches MaestroGraph's codegraph extractor to recognize project-specific symbols beyond standard function/class/method declarations.
|
|
18
|
+
|
|
19
|
+
Detects: builder/factory API registrations, domain constant patterns, custom decorator conventions, framework-specific patterns, module-level constants.
|
|
20
|
+
</purpose>
|
|
21
|
+
|
|
22
|
+
<context>
|
|
23
|
+
$ARGUMENTS -- optional flags.
|
|
24
|
+
|
|
25
|
+
**Flags:**
|
|
26
|
+
- `--scan-only` — Only report detected patterns, don't write extractors.yaml
|
|
27
|
+
- `--append` — Append new rules to existing extractors.yaml (default: overwrite)
|
|
28
|
+
- `--language <lang>` — Limit analysis to specific language (python, typescript, java, etc.)
|
|
29
|
+
|
|
30
|
+
**Analysis targets (per language):**
|
|
31
|
+
|
|
32
|
+
| Language | Pattern Types |
|
|
33
|
+
|----------|--------------|
|
|
34
|
+
| Python | `define_*()` builder APIs, ALL_CAPS constants, `Final[...]` annotations, dataclass/pydantic fields |
|
|
35
|
+
| TypeScript | const enum, namespace exports, decorator factories, config objects |
|
|
36
|
+
| Java | static final constants, @Bean/@Component annotations, builder patterns |
|
|
37
|
+
| Go | exported constants (const blocks), interface registrations |
|
|
38
|
+
| All | Custom factory/builder call patterns with string-literal first args |
|
|
39
|
+
|
|
40
|
+
**Output:** `.workflow/kg/extractors.yaml` — declarative rules for PluginEngine.
|
|
41
|
+
|
|
42
|
+
**Rule format:**
|
|
43
|
+
```yaml
|
|
44
|
+
version: 1
|
|
45
|
+
defaults:
|
|
46
|
+
onError: warn
|
|
47
|
+
conflictPolicy: merge-metadata
|
|
48
|
+
plugins:
|
|
49
|
+
- id: <project>.<pattern>
|
|
50
|
+
languages: [<lang>]
|
|
51
|
+
mode: declarative
|
|
52
|
+
declarative:
|
|
53
|
+
rules:
|
|
54
|
+
- id: <rule-id>
|
|
55
|
+
match:
|
|
56
|
+
type: call | assignment | regex
|
|
57
|
+
pattern: "<pattern>"
|
|
58
|
+
nameRegex: "<optional filter>"
|
|
59
|
+
scope: module | class | any
|
|
60
|
+
extract:
|
|
61
|
+
kind: constant | variable | property | field
|
|
62
|
+
decorators: ["<semantic_tag>"]
|
|
63
|
+
metadata:
|
|
64
|
+
semanticKind: "<domain_kind>"
|
|
65
|
+
```
|
|
66
|
+
</context>
|
|
67
|
+
|
|
68
|
+
<execution>
|
|
69
|
+
|
|
70
|
+
### Phase 1: Discover patterns
|
|
71
|
+
|
|
72
|
+
Spawn **3 parallel agents** to scan the codebase:
|
|
73
|
+
|
|
74
|
+
| Agent | Focus | Method |
|
|
75
|
+
|-------|-------|--------|
|
|
76
|
+
| Agent 1 | **Builder/factory calls** | Grep for patterns like `define_*("`, `register_*("`, `add_*("` where first arg is a string literal |
|
|
77
|
+
| Agent 2 | **Constants & annotations** | Grep for ALL_CAPS assignments, Final[], static final, const enum, exported const |
|
|
78
|
+
| Agent 3 | **Framework patterns** | Detect framework (from package.json/setup.py/go.mod) → grep framework-specific registration patterns |
|
|
79
|
+
|
|
80
|
+
Each agent returns: `[{pattern_type, regex_evidence, file_count, sample_matches: [{file, line, code}]}]`
|
|
81
|
+
|
|
82
|
+
### Phase 2: Generate rules
|
|
83
|
+
|
|
84
|
+
For each discovered pattern with ≥3 occurrences:
|
|
85
|
+
1. Determine match type (call/assignment/regex)
|
|
86
|
+
2. Build pattern string and optional nameRegex
|
|
87
|
+
3. Assign appropriate kind and semanticKind
|
|
88
|
+
4. Generate rule entry
|
|
89
|
+
|
|
90
|
+
### Phase 3: Validate & write
|
|
91
|
+
|
|
92
|
+
1. Show discovered patterns summary to user
|
|
93
|
+
2. AskUserQuestion: confirm/edit/skip each pattern group
|
|
94
|
+
3. Write `.workflow/kg/extractors.yaml`
|
|
95
|
+
4. Run `maestro kg index` to verify new symbols are extracted
|
|
96
|
+
|
|
97
|
+
If `--scan-only`: stop after Phase 2 summary.
|
|
98
|
+
|
|
99
|
+
</execution>
|
|
100
|
+
|
|
101
|
+
<completion>
|
|
102
|
+
### Next-step routing
|
|
103
|
+
|
|
104
|
+
| Condition | Suggestion |
|
|
105
|
+
|-----------|-----------|
|
|
106
|
+
| Verify new symbols | `maestro kg search "<pattern_name>"` |
|
|
107
|
+
| Re-index after changes | `maestro kg index` |
|
|
108
|
+
| View KG stats | `maestro kg stats` |
|
|
109
|
+
| Edit rules manually | Edit `.workflow/kg/extractors.yaml` |
|
|
110
|
+
| Add script plugin | Create `.workflow/kg/extractors/<name>.mjs` |
|
|
111
|
+
</completion>
|
|
112
|
+
|
|
113
|
+
<error_codes>
|
|
114
|
+
| Code | Severity | Condition | Recovery |
|
|
115
|
+
|------|----------|-----------|----------|
|
|
116
|
+
| E001 | error | .workflow/ not initialized | Run maestro-init first |
|
|
117
|
+
| W001 | warning | No patterns detected for language | Try broader scan or different language |
|
|
118
|
+
| W002 | warning | Pattern has < 3 occurrences | Skipped by default, include with --min-count 1 |
|
|
119
|
+
| W003 | warning | Existing extractors.yaml will be overwritten | Use --append to preserve |
|
|
120
|
+
</error_codes>
|
|
121
|
+
|
|
122
|
+
<success_criteria>
|
|
123
|
+
- [ ] At least 1 pattern detected in the codebase
|
|
124
|
+
- [ ] extractors.yaml generated with valid rules
|
|
125
|
+
- [ ] Each rule has match.type, match.pattern, extract.kind
|
|
126
|
+
- [ ] Re-index succeeds with new extractors.yaml active
|
|
127
|
+
- [ ] New symbols searchable via `maestro kg search`
|
|
128
|
+
</success_criteria>
|
|
@@ -1,82 +1,92 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: manage-knowhow-capture
|
|
3
|
-
description: Capture reusable knowledge as templates, recipes, or tips
|
|
4
|
-
argument-hint: "[<type>] [<description>] [--lang <lang>] [--source <url>] [--tag t1,t2]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- AskUserQuestion
|
|
13
|
-
---
|
|
14
|
-
<purpose>
|
|
15
|
-
Capture reusable knowledge into `.workflow/knowhow/` with type-specific structured fields.
|
|
16
|
-
Auto-indexed by WikiIndexer (type=knowhow), searchable via `maestro search --type knowhow`.
|
|
17
|
-
</purpose>
|
|
18
|
-
|
|
19
|
-
<required_reading>
|
|
20
|
-
@~/.maestro/workflows/knowhow.md
|
|
21
|
-
</required_reading>
|
|
22
|
-
|
|
23
|
-
<context>
|
|
24
|
-
$ARGUMENTS — type token + description + optional flags.
|
|
25
|
-
|
|
26
|
-
**Flags**: `--lang <lang>`, `--source <url>`, `--tag tag1,tag2`, `--title <title>`, `--description <desc>`, `--asset-type <type>`, `--code-paths <paths>`, `--category <cat>`
|
|
27
|
-
|
|
28
|
-
**Type routing** (first token match):
|
|
29
|
-
|
|
30
|
-
| Token | Type | Prefix | Key fields |
|
|
31
|
-
|-------|------|--------|------------|
|
|
32
|
-
| `compact`/`session`/`压缩`/`保存` | compact | KNW- | objective, files, decisions, plan, pending |
|
|
33
|
-
| `template`/`tpl`/`模板` | template | TPL- | language, code block, usage, parameters |
|
|
34
|
-
| `recipe`/`rcp`/`配方`/`步骤` | recipe | RCP- | prerequisites, steps, expected outcome, pitfalls |
|
|
35
|
-
| `reference`/`ref`/`参考`/`引用` | reference | REF- | source URL, key points, scenarios, examples |
|
|
36
|
-
| `decision`/`dcs`/`决策`/`adr` | decision | DCS- | context, alternatives table, rationale, consequences |
|
|
37
|
-
| `tip`/`note`/`记录`/`快速` | tip | TIP- | content, tags |
|
|
38
|
-
| `asset`/`ast`/`资产`/`契约` | asset | AST- | assetType, codePaths, category |
|
|
39
|
-
| `blueprint`/`blp`/`蓝图` | blueprint | BLP- | codePaths, category |
|
|
40
|
-
| `document`/`doc`/`文档` | document | DOC- | (general fallback) |
|
|
41
|
-
| `insight`/`ins`/`洞察`/`经验` | insight | INS- | content, tags, phase (replaces former manage-learn) |
|
|
42
|
-
| Short text + `--tag` | tip | TIP- | — |
|
|
43
|
-
| No args | — | — | AskUserQuestion (10 options) |
|
|
44
|
-
|
|
45
|
-
**Output**: `.workflow/knowhow/{PREFIX}-{YYYYMMDD}-{slug}.md` with YAML frontmatter (title, description, type, category, created, tags, source, lang, status)
|
|
46
|
-
</context>
|
|
47
|
-
|
|
48
|
-
<execution>
|
|
49
|
-
Follow '~/.maestro/workflows/knowhow.md' completely.
|
|
50
|
-
|
|
51
|
-
**Description rule**: Every entry MUST have a `description` field in frontmatter — a one-line summary (under 120 chars) for search results. WikiIndexer uses priority chain: `description > content[:240]`. Use `--description` flag value if provided; otherwise auto-generate from content.
|
|
52
|
-
|
|
53
|
-
**Tags language rule**: Tags must match content language. Chinese content → Chinese tags (如 `认证,令牌,刷新`). English content → English tags. Mixed → bilingual.
|
|
54
|
-
|
|
55
|
-
**Type-specific content rules**:
|
|
56
|
-
|
|
57
|
-
| Type | Content extraction |
|
|
58
|
-
|------|-------------------|
|
|
59
|
-
| compact | Extract from conversation: session ID, objective, execution plan (verbatim), working files (3-8), decisions, constraints, pending. Plan priority: workflow IMPL_PLAN.md > TodoWrite > user-stated > inferred. |
|
|
60
|
-
| template | Ask for: language, code block, parameters (placeholders), usage context, dependencies |
|
|
61
|
-
| recipe | Ask for: goal, prerequisites, numbered steps, expected outcome, common pitfalls |
|
|
62
|
-
| reference | From --source URL or ask. Key points, applicable scenarios, quick examples. Offer WebFetch if URL provided. |
|
|
63
|
-
| decision | Context, alternatives (table: alt/pros/cons/rejected-because), rationale, consequences. Status: proposed/accepted/superseded. |
|
|
64
|
-
| tip | Content = everything after type token. Auto-detect context from recent files. |
|
|
65
|
-
| asset | assetType (api-contract/data-model/prompt/config), codePaths, category for agent discovery |
|
|
66
|
-
| blueprint | Architecture design with codePaths and category |
|
|
67
|
-
</execution>
|
|
68
|
-
|
|
69
|
-
<error_codes>
|
|
70
|
-
| Code | Condition | Recovery |
|
|
71
|
-
|------|-----------|----------|
|
|
72
|
-
| E002 | Template: no code provided after prompt | Ask again or cancel |
|
|
73
|
-
| E003 | Recipe: no steps provided after prompt | Ask again or cancel |
|
|
74
|
-
| W001 | No active workflow session (compact) | Captures conversation only |
|
|
75
|
-
| W002 | Plan detection found no explicit plan (compact) | Uses inferred plan |
|
|
76
|
-
</error_codes>
|
|
77
|
-
|
|
78
|
-
<success_criteria>
|
|
79
|
-
- [ ] Type detected or selected, all type-specific fields populated
|
|
80
|
-
- [ ] File written to .workflow/knowhow/ with correct prefix and YAML frontmatter
|
|
81
|
-
- [ ] Confirmation displayed with ID, type, path
|
|
82
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: manage-knowhow-capture
|
|
3
|
+
description: Capture reusable knowledge as templates, recipes, or tips
|
|
4
|
+
argument-hint: "[<type>] [<description>] [--lang <lang>] [--source <url>] [--tag t1,t2]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
---
|
|
14
|
+
<purpose>
|
|
15
|
+
Capture reusable knowledge into `.workflow/knowhow/` with type-specific structured fields.
|
|
16
|
+
Auto-indexed by WikiIndexer (type=knowhow), searchable via `maestro search --type knowhow`.
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<required_reading>
|
|
20
|
+
@~/.maestro/workflows/knowhow.md
|
|
21
|
+
</required_reading>
|
|
22
|
+
|
|
23
|
+
<context>
|
|
24
|
+
$ARGUMENTS — type token + description + optional flags.
|
|
25
|
+
|
|
26
|
+
**Flags**: `--lang <lang>`, `--source <url>`, `--tag tag1,tag2`, `--title <title>`, `--description <desc>`, `--asset-type <type>`, `--code-paths <paths>`, `--category <cat>`
|
|
27
|
+
|
|
28
|
+
**Type routing** (first token match):
|
|
29
|
+
|
|
30
|
+
| Token | Type | Prefix | Key fields |
|
|
31
|
+
|-------|------|--------|------------|
|
|
32
|
+
| `compact`/`session`/`压缩`/`保存` | compact | KNW- | objective, files, decisions, plan, pending |
|
|
33
|
+
| `template`/`tpl`/`模板` | template | TPL- | language, code block, usage, parameters |
|
|
34
|
+
| `recipe`/`rcp`/`配方`/`步骤` | recipe | RCP- | prerequisites, steps, expected outcome, pitfalls |
|
|
35
|
+
| `reference`/`ref`/`参考`/`引用` | reference | REF- | source URL, key points, scenarios, examples |
|
|
36
|
+
| `decision`/`dcs`/`决策`/`adr` | decision | DCS- | context, alternatives table, rationale, consequences |
|
|
37
|
+
| `tip`/`note`/`记录`/`快速` | tip | TIP- | content, tags |
|
|
38
|
+
| `asset`/`ast`/`资产`/`契约` | asset | AST- | assetType, codePaths, category |
|
|
39
|
+
| `blueprint`/`blp`/`蓝图` | blueprint | BLP- | codePaths, category |
|
|
40
|
+
| `document`/`doc`/`文档` | document | DOC- | (general fallback) |
|
|
41
|
+
| `insight`/`ins`/`洞察`/`经验` | insight | INS- | content, tags, phase (replaces former manage-learn) |
|
|
42
|
+
| Short text + `--tag` | tip | TIP- | — |
|
|
43
|
+
| No args | — | — | AskUserQuestion (10 options) |
|
|
44
|
+
|
|
45
|
+
**Output**: `.workflow/knowhow/{PREFIX}-{YYYYMMDD}-{slug}.md` with YAML frontmatter (title, description, type, category, created, tags, source, lang, status)
|
|
46
|
+
</context>
|
|
47
|
+
|
|
48
|
+
<execution>
|
|
49
|
+
Follow '~/.maestro/workflows/knowhow.md' completely.
|
|
50
|
+
|
|
51
|
+
**Description rule**: Every entry MUST have a `description` field in frontmatter — a one-line summary (under 120 chars) for search results. WikiIndexer uses priority chain: `description > content[:240]`. Use `--description` flag value if provided; otherwise auto-generate from content.
|
|
52
|
+
|
|
53
|
+
**Tags language rule**: Tags must match content language. Chinese content → Chinese tags (如 `认证,令牌,刷新`). English content → English tags. Mixed → bilingual.
|
|
54
|
+
|
|
55
|
+
**Type-specific content rules**:
|
|
56
|
+
|
|
57
|
+
| Type | Content extraction |
|
|
58
|
+
|------|-------------------|
|
|
59
|
+
| compact | Extract from conversation: session ID, objective, execution plan (verbatim), working files (3-8), decisions, constraints, pending. Plan priority: workflow IMPL_PLAN.md > TodoWrite > user-stated > inferred. |
|
|
60
|
+
| template | Ask for: language, code block, parameters (placeholders), usage context, dependencies |
|
|
61
|
+
| recipe | Ask for: goal, prerequisites, numbered steps, expected outcome, common pitfalls |
|
|
62
|
+
| reference | From --source URL or ask. Key points, applicable scenarios, quick examples. Offer WebFetch if URL provided. |
|
|
63
|
+
| decision | Context, alternatives (table: alt/pros/cons/rejected-because), rationale, consequences. Status: proposed/accepted/superseded. |
|
|
64
|
+
| tip | Content = everything after type token. Auto-detect context from recent files. |
|
|
65
|
+
| asset | assetType (api-contract/data-model/prompt/config), codePaths, category for agent discovery |
|
|
66
|
+
| blueprint | Architecture design with codePaths and category |
|
|
67
|
+
</execution>
|
|
68
|
+
|
|
69
|
+
<error_codes>
|
|
70
|
+
| Code | Condition | Recovery |
|
|
71
|
+
|------|-----------|----------|
|
|
72
|
+
| E002 | Template: no code provided after prompt | Ask again or cancel |
|
|
73
|
+
| E003 | Recipe: no steps provided after prompt | Ask again or cancel |
|
|
74
|
+
| W001 | No active workflow session (compact) | Captures conversation only |
|
|
75
|
+
| W002 | Plan detection found no explicit plan (compact) | Uses inferred plan |
|
|
76
|
+
</error_codes>
|
|
77
|
+
|
|
78
|
+
<success_criteria>
|
|
79
|
+
- [ ] Type detected or selected, all type-specific fields populated
|
|
80
|
+
- [ ] File written to .workflow/knowhow/ with correct prefix and YAML frontmatter
|
|
81
|
+
- [ ] Confirmation displayed with ID, type, path
|
|
82
|
+
</success_criteria>
|
|
83
|
+
|
|
84
|
+
<completion>
|
|
85
|
+
### Next-step routing
|
|
86
|
+
|
|
87
|
+
| Condition | Suggestion |
|
|
88
|
+
|-----------|-----------|
|
|
89
|
+
| Entry captured | `/manage-knowhow list` to view library |
|
|
90
|
+
| Want to connect entries | `/manage-wiki connect` |
|
|
91
|
+
| Want to bridge to specs | `/spec-add <category>` with `--spec-category` |
|
|
92
|
+
</completion>
|