pi-maestro-flow 0.2.0 → 0.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.
- package/README.md +44 -72
- package/agents/cross-role-reviewer.md +1 -1
- package/agents/impeccable-agent.md +1 -1
- package/agents/ralph-executor.md +1 -1
- package/agents/team-worker.md +1 -1
- package/agents/workflow-analyzer.md +1 -1
- package/agents/workflow-codebase-mapper.md +1 -1
- package/agents/workflow-collab-planner.md +1 -1
- package/agents/workflow-debugger.md +1 -1
- package/agents/workflow-executor.md +1 -1
- package/agents/workflow-integration-checker.md +1 -1
- package/agents/workflow-nyquist-auditor.md +1 -1
- package/agents/workflow-phase-researcher.md +1 -1
- package/agents/workflow-planner.md +1 -1
- package/agents/workflow-project-researcher.md +1 -1
- package/agents/workflow-reviewer.md +1 -1
- package/agents/workflow-verifier.md +1 -1
- package/package.json +13 -4
- package/skills/codify-to-knowhow/SKILL.md +1 -1
- package/skills/delegation-check/SKILL.md +1 -1
- package/skills/domain-add/SKILL.md +5 -7
- package/skills/insight-challenge/SKILL.md +1 -1
- package/skills/learn-decompose/SKILL.md +4 -4
- package/skills/learn-follow/SKILL.md +5 -5
- package/skills/learn-investigate/SKILL.md +5 -5
- package/skills/learn-second-opinion/SKILL.md +5 -5
- package/skills/maestro/SKILL.md +9 -10
- package/skills/maestro-amend/SKILL.md +3 -3
- package/skills/maestro-analyze/SKILL.md +10 -13
- package/skills/maestro-blueprint/SKILL.md +8 -11
- package/skills/maestro-brainstorm/SKILL.md +11 -14
- package/skills/maestro-collab/SKILL.md +4 -4
- package/skills/maestro-companion/SKILL.md +3 -3
- package/skills/maestro-composer/SKILL.md +11 -12
- package/skills/maestro-execute/SKILL.md +9 -12
- package/skills/maestro-fork/SKILL.md +8 -11
- package/skills/maestro-grill/SKILL.md +13 -16
- package/skills/maestro-guard/SKILL.md +5 -5
- package/skills/maestro-help/SKILL.md +3 -3
- package/skills/maestro-impeccable/SKILL.md +7 -7
- package/skills/maestro-init/SKILL.md +9 -12
- package/skills/maestro-merge/SKILL.md +6 -8
- package/skills/maestro-milestone-audit/SKILL.md +3 -5
- package/skills/maestro-milestone-complete/SKILL.md +9 -12
- package/skills/maestro-milestone-release/SKILL.md +9 -11
- package/skills/maestro-next/SKILL.md +5 -5
- package/skills/maestro-overlay/SKILL.md +16 -16
- package/skills/maestro-plan/SKILL.md +9 -12
- package/skills/maestro-player/SKILL.md +5 -5
- package/skills/maestro-quick/SKILL.md +5 -7
- package/skills/maestro-ralph/SKILL.md +16 -17
- package/skills/maestro-ralph-cli/SKILL.md +6 -6
- package/skills/maestro-ralph-cli-execute/SKILL.md +2 -2
- package/skills/maestro-ralph-execute/SKILL.md +4 -4
- package/skills/maestro-ralph-v2/SKILL.md +18 -19
- package/skills/maestro-roadmap/SKILL.md +8 -9
- package/skills/maestro-swarm-workflow/SKILL.md +9 -9
- package/skills/maestro-tools-execute/SKILL.md +5 -7
- package/skills/maestro-tools-register/SKILL.md +7 -9
- package/skills/maestro-ui-codify/SKILL.md +9 -10
- package/skills/maestro-universal-workflow/SKILL.md +15 -15
- package/skills/maestro-update/SKILL.md +10 -10
- package/skills/manage-codebase-rebuild/SKILL.md +4 -6
- package/skills/manage-drift-realign/SKILL.md +8 -11
- package/skills/manage-harvest/SKILL.md +6 -9
- package/skills/manage-issue/SKILL.md +5 -8
- package/skills/manage-issue-discover/SKILL.md +8 -11
- package/skills/manage-kg-extractors/SKILL.md +3 -3
- package/skills/manage-knowhow/SKILL.md +3 -5
- package/skills/manage-knowhow-capture/SKILL.md +4 -6
- package/skills/manage-knowledge-audit/SKILL.md +6 -9
- package/skills/manage-status/SKILL.md +3 -5
- package/skills/manage-wiki/SKILL.md +5 -7
- package/skills/odyssey-debug/SKILL.md +13 -13
- package/skills/odyssey-improve/SKILL.md +15 -15
- package/skills/odyssey-planex/SKILL.md +16 -16
- package/skills/odyssey-review-test-fix/SKILL.md +11 -11
- package/skills/odyssey-ui/SKILL.md +10 -10
- package/skills/prompt-generator/SKILL.md +5 -5
- package/skills/quality-auto-test/SKILL.md +3 -5
- package/skills/quality-debug/SKILL.md +3 -5
- package/skills/quality-refactor/SKILL.md +3 -5
- package/skills/quality-retrospective/SKILL.md +10 -13
- package/skills/quality-review/SKILL.md +5 -8
- package/skills/quality-sync/SKILL.md +3 -5
- package/skills/quality-test/SKILL.md +4 -6
- package/skills/scholar-anti-ai-writing/SKILL.md +1 -1
- package/skills/scholar-citation-verify/SKILL.md +1 -1
- package/skills/scholar-experiment/SKILL.md +2 -2
- package/skills/scholar-ideation/SKILL.md +7 -7
- package/skills/scholar-latex-organizer/SKILL.md +1 -1
- package/skills/scholar-publish/SKILL.md +3 -3
- package/skills/scholar-rebuttal-pro/SKILL.md +3 -3
- package/skills/scholar-review/SKILL.md +1 -1
- package/skills/scholar-writing/SKILL.md +1 -1
- package/skills/security-audit/SKILL.md +2 -4
- package/skills/skill-generator/SKILL.md +3 -3
- package/skills/skill-iter-tune/SKILL.md +3 -3
- package/skills/skill-simplify/SKILL.md +1 -1
- package/skills/skill-tuning/SKILL.md +1 -1
- package/skills/spec-add/SKILL.md +5 -7
- package/skills/spec-load/SKILL.md +3 -5
- package/skills/spec-remove/SKILL.md +4 -6
- package/skills/spec-setup/SKILL.md +6 -8
- package/skills/team-adversarial-swarm/SKILL.md +5 -5
- package/skills/team-arch-opt/SKILL.md +2 -2
- package/skills/team-brainstorm/SKILL.md +3 -3
- package/skills/team-coordinate/SKILL.md +4 -4
- package/skills/team-designer/SKILL.md +1 -1
- package/skills/team-executor/SKILL.md +3 -3
- package/skills/team-frontend/SKILL.md +2 -2
- package/skills/team-frontend-debug/SKILL.md +3 -3
- package/skills/team-interactive-craft/SKILL.md +2 -2
- package/skills/team-issue/SKILL.md +3 -3
- package/skills/team-lifecycle-v4/SKILL.md +4 -4
- package/skills/team-motion-design/SKILL.md +2 -2
- package/skills/team-perf-opt/SKILL.md +3 -3
- package/skills/team-planex/SKILL.md +2 -2
- package/skills/team-quality-assurance/SKILL.md +3 -3
- package/skills/team-review/SKILL.md +3 -3
- package/skills/team-roadmap-dev/SKILL.md +3 -3
- package/skills/team-swarm/SKILL.md +4 -4
- package/skills/team-tech-debt/SKILL.md +2 -2
- package/skills/team-testing/SKILL.md +3 -3
- package/skills/team-ui-polish/SKILL.md +2 -2
- package/skills/team-uidesign/SKILL.md +2 -2
- package/skills/team-ultra-analyze/SKILL.md +4 -4
- package/skills/team-ux-improve/SKILL.md +3 -3
- package/skills/team-visual-a11y/SKILL.md +2 -2
- package/skills/workflow-skill-designer/SKILL.md +8 -8
- package/templates/business-test-report.json +68 -0
- package/templates/config.json +48 -0
- package/templates/context.md +16 -0
- package/templates/doc-index.json +11 -0
- package/templates/index.json +68 -0
- package/templates/issue.json +36 -0
- package/templates/plan.json +38 -0
- package/templates/project.md +60 -0
- package/templates/reflection-log.md +20 -0
- package/templates/roadmap.md +45 -0
- package/templates/scratch-index.json +19 -0
- package/templates/search-tool.json +1 -0
- package/templates/search-tools.md +47 -0
- package/templates/state.json +18 -0
- package/templates/task-summary.md +21 -0
- package/templates/task.json +89 -0
- package/templates/terminology-template.json +22 -0
- package/templates/uat.md +21 -0
- package/templates/validation.json +31 -0
- package/templates/verification.json +37 -0
- package/templates/workflow.md +14 -0
- package/templates/worktree-scope.json +9 -0
- package/templates/worktrees.json +26 -0
- package/workflows/agy-instructions.md +156 -0
- package/workflows/analyze.md +768 -0
- package/workflows/auto-test.md +705 -0
- package/workflows/blueprint.md +406 -0
- package/workflows/boundary-grill.md +50 -0
- package/workflows/brainstorm.md +508 -0
- package/workflows/business-test.md +574 -0
- package/workflows/chinese-response.md +25 -0
- package/workflows/claude-instructions.md +167 -0
- package/workflows/codebase-rebuild.md +267 -0
- package/workflows/codebase-refresh.md +168 -0
- package/workflows/codex-instructions.md +156 -0
- package/workflows/coding-philosophy.md +70 -0
- package/workflows/command-authoring.md +823 -0
- package/workflows/debug.md +409 -0
- package/workflows/delegate-usage.md +99 -0
- package/workflows/domain-add.md +121 -0
- package/workflows/drift-realign.md +396 -0
- package/workflows/execute.md +631 -0
- package/workflows/explore-usage.md +93 -0
- package/workflows/finish-work.md +124 -0
- package/workflows/fork.md +162 -0
- package/workflows/grill.md +494 -0
- package/workflows/harvest.md +478 -0
- package/workflows/impeccable.md +168 -0
- package/workflows/init.md +157 -0
- package/workflows/instruction-authoring-guide.md +97 -0
- package/workflows/integration-test.md +186 -0
- package/workflows/interview-mechanics.md +8 -0
- package/workflows/issue-analyze.md +20 -0
- package/workflows/issue-discover.md +238 -0
- package/workflows/issue-execute.md +110 -0
- package/workflows/issue-gaps-analyze.codex.md +256 -0
- package/workflows/issue-gaps-analyze.md +215 -0
- package/workflows/issue-plan.md +110 -0
- package/workflows/issue.md +338 -0
- package/workflows/knowhow.md +429 -0
- package/workflows/knowledge-audit.md +355 -0
- package/workflows/learn.md +271 -0
- package/workflows/maestro-chain-execute.md +20 -0
- package/workflows/maestro-link-coordinate.md +114 -0
- package/workflows/maestro-super.md +120 -0
- package/workflows/maestro.md +501 -0
- package/workflows/map.md +74 -0
- package/workflows/merge.md +122 -0
- package/workflows/milestone-audit.md +155 -0
- package/workflows/milestone-complete.md +167 -0
- package/workflows/milestone-release.md +82 -0
- package/workflows/odyssey-base-codex.md +305 -0
- package/workflows/odyssey-base.md +256 -0
- package/workflows/overlays.md +109 -0
- package/workflows/plan.md +520 -0
- package/workflows/quick.md +350 -0
- package/workflows/ralph-amend-goal.md +177 -0
- package/workflows/refactor.md +87 -0
- package/workflows/retrospective.md +471 -0
- package/workflows/review.md +448 -0
- package/workflows/roadmap-common.md +193 -0
- package/workflows/roadmap.md +106 -0
- package/workflows/shell-exec-protocol.md +30 -0
- package/workflows/skill-authoring.md +265 -0
- package/workflows/spec-generate.md +475 -0
- package/workflows/specs-add.md +123 -0
- package/workflows/specs-load.md +76 -0
- package/workflows/specs-remove.md +104 -0
- package/workflows/specs-setup.md +316 -0
- package/workflows/status.md +149 -0
- package/workflows/sync.md +116 -0
- package/workflows/tdd.md +255 -0
- package/workflows/test-gen.md +226 -0
- package/workflows/test.md +385 -0
- package/workflows/tools-spec.md +70 -0
- package/workflows/ui-codify-extract.md +372 -0
- package/workflows/ui-codify-knowhow.md +258 -0
- package/workflows/ui-codify-package.md +159 -0
- package/workflows/ui-codify.md +227 -0
- package/workflows/ui-design.md +393 -0
- package/workflows/ui-style.md +201 -0
- package/workflows/verify.md +557 -0
- package/workflows/wiki-connect.md +153 -0
- package/workflows/wiki-digest.md +180 -0
- package/workflows/wiki-manage.md +113 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Workflow: init
|
|
2
|
+
|
|
3
|
+
Project initialization with automatic state detection. Creates project infrastructure only — roadmap creation is handled by maestro-roadmap (light or full mode).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Worktree Guard
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
If .workflow/worktree-scope.json exists: error "Cannot run maestro-init inside a worktree." and exit.
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Step 1: State Detection
|
|
14
|
+
|
|
15
|
+
Detect current project state to determine initialization path.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
state.json exists → Path C (existing) | source files exist → Path B (brownfield) | else → Path A (greenfield)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Path A: Empty/Greenfield Project
|
|
22
|
+
|
|
23
|
+
1. **Deep Questioning** -- Gather project context through conversational exploration:
|
|
24
|
+
|
|
25
|
+
Open with: "What do you want to build?"
|
|
26
|
+
Wait for response, then follow the thread:
|
|
27
|
+
- Ask about what excited them, what problem sparked this
|
|
28
|
+
- Challenge vague terms — make abstract concrete
|
|
29
|
+
- Surface assumptions and find edges
|
|
30
|
+
- Probe for: core value (the ONE thing), target users, constraints, tech preferences
|
|
31
|
+
- Weave in coverage checks (don't switch to checklist mode):
|
|
32
|
+
- Project name and vision
|
|
33
|
+
- Core value (if everything else fails, what must work?)
|
|
34
|
+
- Primary goals (2-5)
|
|
35
|
+
- Tech stack preferences
|
|
36
|
+
- Constraints and non-goals
|
|
37
|
+
- Target users / stakeholders
|
|
38
|
+
- Success criteria
|
|
39
|
+
|
|
40
|
+
Decision gate: When ≥3 research dimensions gathered, ask "Ready to create project.md?"
|
|
41
|
+
- "Create project.md" → proceed
|
|
42
|
+
- "Keep exploring" → continue questioning
|
|
43
|
+
|
|
44
|
+
If `--auto` flag: skip interactive questioning, extract from @ referenced document.
|
|
45
|
+
If `--from <source>` (alias: `--from-brainstorm`):
|
|
46
|
+
- Locate source directory (`.workflow/scratch/*-brainstorm-*/`, `.workflow/scratch/*-import-*/`, etc.)
|
|
47
|
+
- Load `context-package.json` (preferred) or fall back to `guidance-specification.md`:
|
|
48
|
+
- `domain` (name, description, problem_statement) → project vision + core value
|
|
49
|
+
- `requirements[]` → project goals (Active requirements)
|
|
50
|
+
- `constraints[locked]` → key decisions
|
|
51
|
+
- `non_goals[]` → constraints + Out of Scope requirements
|
|
52
|
+
- `domain.terminology[]` → project glossary context
|
|
53
|
+
- Skip interactive questioning (context already gathered)
|
|
54
|
+
|
|
55
|
+
2. **Workflow Preferences** -- Configure project workflow settings:
|
|
56
|
+
|
|
57
|
+
Single round (AskUserQuestion):
|
|
58
|
+
- Research: Research before planning each phase? (`workflow.research`)
|
|
59
|
+
- Reflection: Reflect on results after each phase? (`workflow.reflection`)
|
|
60
|
+
- Git Tracking: Commit planning docs to git? (`git.commit_docs`)
|
|
61
|
+
- Auto-sync: Sync codebase docs after execute? (`codebase.auto_sync_after_execute`)
|
|
62
|
+
|
|
63
|
+
Write `.workflow/config.json` from template + user selections.
|
|
64
|
+
Other segments (`execution`, `gates`, `guard`, `collab`, `specInjection`, `dashboard`)
|
|
65
|
+
stay at template defaults; user can edit later or configure via dedicated commands
|
|
66
|
+
(`/maestro-guard`, `maestro spec injection set`).
|
|
67
|
+
|
|
68
|
+
If `--auto`: use template defaults (all the above on).
|
|
69
|
+
|
|
70
|
+
3. **Research** (conditional, triggered when `config.workflow.research == true`) -- MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep when triggered: Spawn 4 parallel `workflow-project-researcher` agents writing to `.workflow/research/`: STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md.
|
|
71
|
+
|
|
72
|
+
4. **Synthesize** -- MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Spawn `workflow-research-synthesizer` agent:
|
|
73
|
+
- Input: all `.workflow/research/` documents
|
|
74
|
+
- Output: `.workflow/research/SUMMARY.md` with consolidated findings
|
|
75
|
+
|
|
76
|
+
5. **Create project files:**
|
|
77
|
+
- `.workflow/project.md` from @templates/project.md + user answers (include Core Value, Requirements, Key Decisions)
|
|
78
|
+
- `.workflow/state.json` from template (status: "idle")
|
|
79
|
+
- `.workflow/config.json` already created in step 2
|
|
80
|
+
|
|
81
|
+
### Path B: Brownfield (has code, no .workflow/)
|
|
82
|
+
|
|
83
|
+
1. Create `.workflow/` directory structure
|
|
84
|
+
2. Create `.workflow/state.json` (status: "idle")
|
|
85
|
+
3. Offer codebase mapping:
|
|
86
|
+
- "Map codebase first" → execute `/manage-codebase-rebuild` to understand existing architecture, then return
|
|
87
|
+
- "Skip mapping" → proceed
|
|
88
|
+
4. Run Workflow Preferences (same as Path A step 2) → `.workflow/config.json`
|
|
89
|
+
5. Ask user for project vision, goals, constraints (same deep questioning as Path A step 1)
|
|
90
|
+
- If `--from <source>` (alias: `--from-brainstorm`): load context-package.json (skip questioning)
|
|
91
|
+
- For brownfield: infer Validated requirements from existing code (what does codebase already do?)
|
|
92
|
+
6. Create `.workflow/project.md` (include inferred Validated requirements + new Active requirements)
|
|
93
|
+
|
|
94
|
+
### Path C: Existing Project (has .workflow/)
|
|
95
|
+
|
|
96
|
+
1. Read `.workflow/state.json`
|
|
97
|
+
2. Display: "Project already initialized. Current status: {status}"
|
|
98
|
+
3. Route to `/workflow:status`
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Step 2: Specs Init (first-run only)
|
|
103
|
+
|
|
104
|
+
If `.workflow/specs/` does not exist:
|
|
105
|
+
|
|
106
|
+
1. MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Run `Bash("maestro spec init")` — creates empty seed files (skeleton only, no codebase scan)
|
|
107
|
+
|
|
108
|
+
2. If project has existing source files (package.json, tsconfig.json, pyproject.toml, go.mod, etc.):
|
|
109
|
+
- MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: auto-trigger `Skill({ skill: "spec-setup" })` — scan codebase and populate specs with detected conventions
|
|
110
|
+
- Note: Specs are further enriched by analyze, plan, and execute stages via `maestro spec add`
|
|
111
|
+
|
|
112
|
+
3. If greenfield project (no source files):
|
|
113
|
+
- Skip spec-setup (nothing to scan)
|
|
114
|
+
- Note: Specs will be progressively populated as pipeline stages produce knowledge
|
|
115
|
+
|
|
116
|
+
## Step 2.5: Domain Init (first-run only)
|
|
117
|
+
|
|
118
|
+
If `.workflow/domain/` does not exist:
|
|
119
|
+
|
|
120
|
+
1. MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: Run `Bash("maestro domain init")` — creates `.workflow/domain/glossary.yaml` with empty terms array
|
|
121
|
+
2. If brownfield project (has source files): MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep: run `maestro domain discover --auto` to scan codebase for initial term candidates, present top 5 for confirmation
|
|
122
|
+
3. If greenfield project: skip discovery (no codebase to scan); domain terms will be populated by grill/brainstorm sessions via finish-work extraction
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Step 3: Directory Structure Verification
|
|
128
|
+
|
|
129
|
+
Verify all required directories and files exist:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
.workflow/
|
|
133
|
+
project.md ✓
|
|
134
|
+
state.json ✓
|
|
135
|
+
config.json ✓
|
|
136
|
+
specs/ ✓
|
|
137
|
+
domain/ ✓ (glossary.yaml)
|
|
138
|
+
research/ ✓ (if research enabled)
|
|
139
|
+
scratch/ ✓ (create empty)
|
|
140
|
+
milestones/ ✓ (create empty)
|
|
141
|
+
codebase/ ✓ (create empty)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Step 4: Commit and Route
|
|
147
|
+
|
|
148
|
+
1. If git repo and config.git.commit_docs: commit all `.workflow/` files with message `"chore: initialize project workflow"`
|
|
149
|
+
2. Display initialization summary:
|
|
150
|
+
- Project name and core value
|
|
151
|
+
- Config highlights (research/reflection/commit_docs/auto_sync_after_execute toggles)
|
|
152
|
+
- Research summary (if research was run)
|
|
153
|
+
3. Route next steps:
|
|
154
|
+
- "Run `/maestro-roadmap --mode full` to create full spec package with roadmap (heavy path)"
|
|
155
|
+
- "Run `/maestro-roadmap` to create interactive roadmap directly (light path)"
|
|
156
|
+
- "Run `/manage-status` to view project dashboard"
|
|
157
|
+
- "Run `/maestro-brainstorm` to explore ideas first"
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Instruction File Authoring Guide
|
|
2
|
+
|
|
3
|
+
## Core Principle
|
|
4
|
+
|
|
5
|
+
**Only write what changes the model's behavior.** If removing a line doesn't change what the model does, delete it.
|
|
6
|
+
|
|
7
|
+
## Protected Content — NEVER Remove
|
|
8
|
+
|
|
9
|
+
### P1. Structural Tags
|
|
10
|
+
|
|
11
|
+
**ALWAYS preserve ALL XML-style tags** (open AND close) in command files. These serve overlay targeting, system parsing, or state machine definition. Never remove tags — only trim content inside them.
|
|
12
|
+
|
|
13
|
+
Common tags: `<purpose>`, `<context>`, `<execution>`, `<required_reading>`, `<deferred_reading>`, `<success_criteria>`, `<completion>`, `<error_codes>`, `<interview_protocol>`, `<on_complete>`.
|
|
14
|
+
|
|
15
|
+
Odyssey-specific: `<boundary>`, `<execution_discipline>`, `<self_iteration>`, `<state_machine>`, `<states>`, `<transitions>`, `<actions>`, `<appendix>`, `<next_step_routing>`.
|
|
16
|
+
|
|
17
|
+
Rule: if it has `<` and `>` wrapping a section — keep it.
|
|
18
|
+
|
|
19
|
+
### P2. Data Structure Schemas
|
|
20
|
+
|
|
21
|
+
JSON/NDJSON templates that define write formats:
|
|
22
|
+
- `state.json.artifacts[]` registration blocks — keep all field names and value patterns
|
|
23
|
+
- `evidence.ndjson` / `decisions.ndjson` schema definitions
|
|
24
|
+
- Any `Append to ...` with field structure
|
|
25
|
+
|
|
26
|
+
Allowed: JSON code block → bullet-point field list. NOT allowed: compress to one narrative sentence.
|
|
27
|
+
|
|
28
|
+
### P3. Completion Status Blocks
|
|
29
|
+
|
|
30
|
+
`--- COMPLETION STATUS ---` blocks enable downstream command chaining. NEVER remove.
|
|
31
|
+
|
|
32
|
+
### P4. Routing Tables
|
|
33
|
+
|
|
34
|
+
`success_criteria` → next command mapping tables enable workflow transitions. NEVER remove.
|
|
35
|
+
|
|
36
|
+
### P5. Cross-File Reference Integrity
|
|
37
|
+
|
|
38
|
+
When removing content from command file because "workflow file has it":
|
|
39
|
+
- VERIFY the workflow file actually contains the referenced content
|
|
40
|
+
- If command says "X is defined in Y.md", Y.md MUST have X with matching identifiers
|
|
41
|
+
- Missing target = broken reference = FAIL
|
|
42
|
+
|
|
43
|
+
## Anti-Patterns — Fix These
|
|
44
|
+
|
|
45
|
+
### 1. Passive Dependency Assumptions
|
|
46
|
+
|
|
47
|
+
"hooks handle it" / "auto-loaded" → "ALWAYS search before acting."
|
|
48
|
+
|
|
49
|
+
### 2. Flat Tables With Equal Weight
|
|
50
|
+
|
|
51
|
+
7 equal triggers → L0 (unconditional) / L1 (conditional) / L2 (deep analysis).
|
|
52
|
+
|
|
53
|
+
### 3. Implementation Details
|
|
54
|
+
|
|
55
|
+
"BM25 full-text", "broker-managed lifecycle" → Delete. Model needs WHEN, not HOW.
|
|
56
|
+
|
|
57
|
+
### 4. Teaching-Style Explanations
|
|
58
|
+
|
|
59
|
+
"Not X but Y" pedagogy → Show template, drop explanation.
|
|
60
|
+
|
|
61
|
+
### 5. Duplicate Sections
|
|
62
|
+
|
|
63
|
+
Same info in summary + steps → Single source. Schemas are reference, NOT duplication of steps.
|
|
64
|
+
|
|
65
|
+
### 6. Soft Language for Hard Rules
|
|
66
|
+
|
|
67
|
+
"should" / "recommended" → `ALWAYS` / `NEVER`.
|
|
68
|
+
|
|
69
|
+
### 7. Verbose Descriptions
|
|
70
|
+
|
|
71
|
+
Purpose in ≤10 words. Trim `<purpose>` content but keep the tag.
|
|
72
|
+
|
|
73
|
+
### 8. Phase Gates Without BLOCKED
|
|
74
|
+
|
|
75
|
+
Every Phase Gate MUST have both `REQUIRED` conditions AND `BLOCKED if missing` consequence. A Gate with only REQUIRED is unenforceable.
|
|
76
|
+
|
|
77
|
+
### 9. Missing Structural Sections
|
|
78
|
+
|
|
79
|
+
Commands with `<execution>` logic MUST also have:
|
|
80
|
+
- `<completion>` — standalone report + ralph completion + next-step routing table
|
|
81
|
+
- `<error_codes>` — error/warning code table with recovery actions
|
|
82
|
+
Do NOT embed completion/routing logic inside `<execution>`. Keep them in their own tags.
|
|
83
|
+
|
|
84
|
+
## Checklist
|
|
85
|
+
|
|
86
|
+
- [ ] ALL structural tags preserved (P1)
|
|
87
|
+
- [ ] ALL data schemas preserved with field-level detail (P2)
|
|
88
|
+
- [ ] ALL completion status blocks preserved (P3)
|
|
89
|
+
- [ ] ALL routing tables preserved (P4)
|
|
90
|
+
- [ ] No line explains HOW a tool works internally
|
|
91
|
+
- [ ] No duplicate info across sections
|
|
92
|
+
- [ ] Strong constraints use ALWAYS/NEVER
|
|
93
|
+
- [ ] High-frequency actions visually prominent (L0 / top of list)
|
|
94
|
+
- [ ] Command descriptions ≤10 words
|
|
95
|
+
- [ ] No "fallback" framing implying automatic primary path
|
|
96
|
+
- [ ] Phase Gates have REQUIRED + BLOCKED pairs
|
|
97
|
+
- [ ] Commands with `<execution>` have matching `<completion>` and `<error_codes>`
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Integration Test Workflow
|
|
2
|
+
|
|
3
|
+
Self-iterating integration test cycle that combines exploration, test design, execution, reflection, and adaptive strategy adjustment. Runs automated tests in a closed loop that self-corrects until convergence.
|
|
4
|
+
|
|
5
|
+
6-phase cycle: Explore -> Design -> Develop -> Test -> Reflect -> Adjust
|
|
6
|
+
Adaptive strategy: Conservative -> Aggressive -> Surgical -> Reflective
|
|
7
|
+
L0-L3 progressive layers: Static Analysis -> Unit -> Integration -> E2E
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
### Step 1: Parse Input and Initialize
|
|
12
|
+
|
|
13
|
+
**Parse arguments:**
|
|
14
|
+
|
|
15
|
+
| Input | Result |
|
|
16
|
+
|-------|--------|
|
|
17
|
+
| No arguments | Error E001 |
|
|
18
|
+
| Phase number | Resolve phase dir from artifact registry |
|
|
19
|
+
| `--max-iter N` | Set MAX_ITER = N (default 5) |
|
|
20
|
+
| `--layer L2` | Start from L2 layer |
|
|
21
|
+
|
|
22
|
+
**Resolve phase dir:** from state.json artifact registry (type='execute', matching phase). Error if not found.
|
|
23
|
+
|
|
24
|
+
If existing session at `${PHASE_DIR}/.tests/integration/state.json`: offer resume or restart.
|
|
25
|
+
|
|
26
|
+
**Initialize session:** create `.tests/integration/` directory, write initial `state.json` (iteration=0, strategy=conservative, layer=L0, threshold=95, status=running), initialize `reflection-log.md`.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### Step 1.3: Load Project Specs
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
# MANDATORY, NOT SUBSTITUTABLE by manual Read/Grep
|
|
34
|
+
specs_content = maestro spec load --category test
|
|
35
|
+
arch_content = maestro spec load --category arch
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`specs_content` for test conventions; `arch_content` for module boundaries in Step 2-3.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
### Step 1.5: Load Previously Generated Tests
|
|
43
|
+
|
|
44
|
+
Load pre-generated integration/e2e tests from `${PHASE_DIR}/.tests/test-gen-report.json` (if exists).
|
|
45
|
+
These are merged into the test plan in Step 3 -- executed but not re-generated.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
### Step 2: Explore
|
|
50
|
+
|
|
51
|
+
**Phase 1: Explore codebase for testable integration points.**
|
|
52
|
+
|
|
53
|
+
Discover:
|
|
54
|
+
- Module boundaries and cross-module calls
|
|
55
|
+
- API endpoints and their handlers
|
|
56
|
+
- Database interactions and queries
|
|
57
|
+
- External service integrations
|
|
58
|
+
- Event flows and message passing
|
|
59
|
+
|
|
60
|
+
Scan for cross-module imports, API route definitions, and database calls.
|
|
61
|
+
Map integration points: which modules communicate through what interfaces.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### Step 3: Design
|
|
66
|
+
|
|
67
|
+
**Phase 2: Design integration test plan.**
|
|
68
|
+
|
|
69
|
+
**Merge pre-generated tests** (from Step 1.5):
|
|
70
|
+
If `generated_tests` is not empty, incorporate them into the test plan directly — mark as "pre-existing" so Step 4 (Develop) skips writing them and Step 5 (Test Execute) includes them in the run.
|
|
71
|
+
|
|
72
|
+
Based on exploration (and pre-generated tests if available), design tests per layer:
|
|
73
|
+
|
|
74
|
+
**L0 - Static Analysis:**
|
|
75
|
+
- Type check command
|
|
76
|
+
- Lint command
|
|
77
|
+
- Dead code detection
|
|
78
|
+
|
|
79
|
+
**L1 - Unit Tests (isolation):**
|
|
80
|
+
- Critical functions identified in explore
|
|
81
|
+
- Edge cases for core logic
|
|
82
|
+
|
|
83
|
+
**L2 - Integration Tests:**
|
|
84
|
+
- API endpoint tests (request -> response)
|
|
85
|
+
- Cross-module interaction tests
|
|
86
|
+
- Database query tests (with fixtures)
|
|
87
|
+
|
|
88
|
+
**L3 - E2E Tests:**
|
|
89
|
+
- Critical user flows
|
|
90
|
+
- Happy path + error path
|
|
91
|
+
|
|
92
|
+
Write test plan to `.tests/integration/test-plan.json`:
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"layers": {
|
|
96
|
+
"L0": { "commands": ["tsc --noEmit", "eslint src/"], "expected_pass": true },
|
|
97
|
+
"L1": { "test_files": [...], "test_count": N },
|
|
98
|
+
"L2": { "test_files": [...], "test_count": N },
|
|
99
|
+
"L3": { "test_files": [...], "test_count": N }
|
|
100
|
+
},
|
|
101
|
+
"total_tests": M
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
### Step 4: Develop
|
|
108
|
+
|
|
109
|
+
**Phase 3: Develop/write test code.**
|
|
110
|
+
|
|
111
|
+
For each layer (current and below), write tests following existing patterns.
|
|
112
|
+
Use auto-test's RED-GREEN methodology for test writing.
|
|
113
|
+
|
|
114
|
+
For integration tests (L2) specifically:
|
|
115
|
+
- Set up test fixtures (DB seeds, mock services)
|
|
116
|
+
- Write request/response assertions
|
|
117
|
+
- Test error handling paths
|
|
118
|
+
- Verify cross-module data flow
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### Step 5: Test Execute
|
|
123
|
+
|
|
124
|
+
**Phase 4: Execute tests for current layer.**
|
|
125
|
+
|
|
126
|
+
Run tests progressively (L0 must pass before L1, etc.):
|
|
127
|
+
- L0: `tsc --noEmit` + `eslint src/`
|
|
128
|
+
- L1: unit tests (`--testPathPattern="unit|__tests__"`)
|
|
129
|
+
- L2: integration tests (`--testPathPattern="integration"`)
|
|
130
|
+
- L3: E2E tests (`--testPathPattern="e2e"`)
|
|
131
|
+
|
|
132
|
+
Record per-layer results (status, total/passed/failed/pass_rate) and overall_pass_rate in `test-results-iter-{N}.json`.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### Step 6: Reflect
|
|
137
|
+
|
|
138
|
+
**Phase 5: Reflect on iteration results.**
|
|
139
|
+
|
|
140
|
+
Analyze: which tests failed, is pass rate improving/plateauing/regressing, are failures clustered, is strategy working.
|
|
141
|
+
|
|
142
|
+
Append to `reflection-log.md`: iteration strategy, pass rate delta, what worked/failed, detected patterns, strategy assessment (effective/ineffective + recommendation).
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### Step 7: Adjust
|
|
147
|
+
|
|
148
|
+
**Phase 6: Adjust strategy based on reflection.**
|
|
149
|
+
|
|
150
|
+
**Adaptive Strategy Engine:**
|
|
151
|
+
|
|
152
|
+
| Condition | Strategy | Behavior |
|
|
153
|
+
|-----------|----------|----------|
|
|
154
|
+
| Iteration 1-2 | Conservative | Fix obvious failures, don't refactor |
|
|
155
|
+
| Pass rate >80% AND failures similar to previous | Aggressive | Batch-fix related failures together |
|
|
156
|
+
| New regressions appeared | Surgical | Revert last changes, fix regression only |
|
|
157
|
+
| Stuck 3+ iterations (rate not improving) | Reflective | Step back, re-analyze root cause pattern |
|
|
158
|
+
|
|
159
|
+
**Strategy transitions:** Conservative --(>80%)--> Aggressive --(regression)--> Surgical --(fixed)--> Aggressive. Any --(stuck 3+ iters)--> Reflective --(insight)--> Conservative.
|
|
160
|
+
|
|
161
|
+
Update state.json. **Convergence:** pass_rate >= 95% -> Step 8. max_iterations reached -> Step 8. Otherwise -> Step 4.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### Step 8: Complete
|
|
166
|
+
|
|
167
|
+
Update state.json status to "complete" or "max_iter_reached".
|
|
168
|
+
Write `.tests/integration/summary.json`: iterations, final_pass_rate, converged flag, strategy_history, per-layer results, bugs_discovered, regressions_fixed.
|
|
169
|
+
Update index.json with integration test results.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### Step 9: Report
|
|
174
|
+
|
|
175
|
+
Display summary: iterations, convergence status, per-layer pass rates, overall rate, strategy transitions, bugs/regressions found.
|
|
176
|
+
|
|
177
|
+
List output files: state.json, reflection-log.md, summary.json.
|
|
178
|
+
|
|
179
|
+
**Next step routing:**
|
|
180
|
+
|
|
181
|
+
| Result | Suggestion |
|
|
182
|
+
|--------|------------|
|
|
183
|
+
| Converged (>=95%) | Skill({ skill: "quality-review", args: "{phase}" }) to update validation |
|
|
184
|
+
| Max iter, >80% | Skill({ skill: "quality-test", args: "{phase}" }) for manual UAT on remaining gaps |
|
|
185
|
+
| Max iter, <80% | Skill({ skill: "quality-debug" }) for deep investigation |
|
|
186
|
+
| Bugs discovered | Skill({ skill: "maestro-plan", args: "{phase} --gaps" }) to plan fixes |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Interview Interaction Mechanics
|
|
2
|
+
|
|
3
|
+
- **One decision per turn** via AskUserQuestion, 2-4 options, first marked `(Recommended)`. User can redirect via `Other`.
|
|
4
|
+
- **Search-first**: resolve via state.json → session artifacts → `maestro spec/wiki` → Glob/Grep/Read → Agent(Explore) / delegate. Never ask what code can answer.
|
|
5
|
+
- **Writeback**: each decision **immediately written to disk** before the next question. No batching.
|
|
6
|
+
- **Skip**: auto mode (`-y`) → 逐问题 Search-first 代答(不跳过整段 interview);仅当代码给出高置信答案时跳过该问题。**例外**:broad intent 的边界澄清永不跳过(即使 `-y`);phase 歧义永不跳过。resume (`-c`) → 跳过已答问题。unambiguous 单一答案输入 → 仅跳过该问题。
|
|
7
|
+
- **Decision table**: `| # | Decision | Choice | Source (user / code / default) | Confidence (high / medium / LOW) |`
|
|
8
|
+
- `code` source:Search-first 派生(state.json / spec / Glob / Grep)。`code` + 非 broad → 可自动定;`code` + broad → 标 `LOW CONFIDENCE` 需用户确认;`default` source → 一律标 `LOW CONFIDENCE`。
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Workflow: Issue Analysis
|
|
2
|
+
|
|
3
|
+
> **DEPRECATED**: Superseded by `issue-gaps-analyze.md` which adds batch support and context.md output.
|
|
4
|
+
> Use `maestro-analyze --gaps [ISS-ID]` instead.
|
|
5
|
+
|
|
6
|
+
## Migration
|
|
7
|
+
|
|
8
|
+
| Old usage | New usage |
|
|
9
|
+
|-----------|-----------|
|
|
10
|
+
| `manage-issue-analyze ISS-ID` | `/maestro-analyze --gaps ISS-ID` |
|
|
11
|
+
| `manage-issue-analyze` (batch) | `/maestro-analyze --gaps` |
|
|
12
|
+
| `manage-issue-plan ISS-ID` (follow-up) | `/maestro-plan --gaps ISS-ID` |
|
|
13
|
+
|
|
14
|
+
## See Also
|
|
15
|
+
|
|
16
|
+
- `issue-gaps-analyze.md` — current implementation (single + batch, classification, parallel exploration, context.md)
|
|
17
|
+
- `issue-gaps-analyze.codex.md` — codex variant using `spawn_agents_on_csv` waves
|
|
18
|
+
- `issue-execute.md` — downstream execution after planning
|
|
19
|
+
|
|
20
|
+
## Notes
|