By artifact type+ID
July 26, 2026 · View on GitHub
1. Global Overview
Scopes
| Path | Scope | Description |
|---|---|---|
.workflow/ | Project-level | All workflow state for the current project |
~/.maestro/ | Global-level | Cross-project templates, configs, overlays |
.workflow/collab/ | Team-level | Human team collaboration, strictly isolated from .workflow/.team/ (Agent bus) |
Core Principles
.workflow/is added to.gitignoreand excluded from version control (project.mdas optional exception)- All artifact paths are relative to the
.workflow/root directory - Each directory/file has a single responsibility with no overlapping storage
- All command outputs are registered through
state.json.artifacts[], enabling cross-phase tracking
2. Directory Tree
Full Directory Structure
.workflow/
├── state.json # Project state machine + Artifact Registry
├── config.json # User workflow configuration
├── project.md # Project definition (Core Value, Requirements, Key Decisions)
├── roadmap.md # Milestone/phase roadmap
├── wiki-index.json # Wiki unified index (auto-generated by WikiIndexer)
│
├── specs/ # Specification files (6 types, project-level)
│ ├── coding-conventions.md # Coding conventions (core)
│ ├── architecture-constraints.md # Architecture constraints (core)
│ ├── knowhow.md # Knowledge index (core)
│ ├── quality-rules.md # Quality rules (optional)
│ ├── test-conventions.md # Test conventions (optional)
│ ├── debug-notes.md # Debug notes (optional)
│ ├── review-standards.md # Review standards (optional)
│ └── learnings.md # Learning records (optional)
│
├── knowhow/ # Knowledge documents (9 prefixes + learn special prefixes)
│ ├── .maestro-learn/ # maestro-learn session state
│ ├── KNW-*.md # session
│ ├── TIP-*.md # tip
│ ├── TPL-*.md # template
│ ├── RCP-*.md # recipe
│ ├── REF-*.md # reference
│ ├── DCS-*.md # decision
│ ├── AST-*.md # asset
│ ├── BLP-*.md # blueprint
│ ├── DOC-*.md # document
│ ├── KNW-follow-*.md # maestro-learn follow
│ ├── KNW-decompose-*.md # maestro-learn decompose
│ ├── KNW-retro-*.md/json # retrospective step
│ ├── KNW-opinion-*.md # maestro-learn consult
│ ├── KNW-investigate-*/ # maestro-learn investigate
│ ├── KNW-digest-*.md # wiki-digest
│ └── wiki-connections-*.md # wiki-connect
│
├── scratch/ # Execution artifacts ({YYYYMMDD}-{type}[-P{N}]-{slug})
│ ├── *-analyze-*/ # Analysis: discussion.md, analysis.md, conclusions.json, context.md, context-package.json
│ ├── *-plan-*/ # Planning: plan.json, .task/TASK-*.json
│ │ └── .summaries/ # Execution: TASK-{NNN}-summary.md
│ ├── *-verify-*/ # Verification: verification.json
│ ├── *-review-*/ # Review: review.json
│ ├── *-debug-*/ # Debug: understanding.md, evidence.ndjson
│ ├── *-test-*/ # Test: uat.md, test-results.json, coverage-report.json
│ ├── *-auto-test-*/ # Auto-test: report.json
│ ├── *-brainstorm-*/ # Brainstorm: guidance-specification.md, {role}/, context-package.json
│ ├── *-collab-*/ # Collab: collab-report.md, context.md, context-package.json, per-tool/
│ ├── *-import-*/ # Document import: source.{ext}, context-package.json
│ └── *-ui-design-*/ # UI design: MASTER.md, design-tokens.json
│
├── issues/ # Issue tracking
│ ├── issues.jsonl # Active issues
│ ├── issue-history.jsonl # Archived issues
│ └── discoveries/ # Discovery sessions
│
├── milestones/ # Milestone archives
│ └── {M}/
│ ├── artifacts/ # Archived artifacts
│ ├── audit-report.md
│ ├── summary.md
│ └── roadmap-snapshot.md
│
├── codebase/ # Codebase documentation (generated by mapper agent)
│ ├── doc-index.json
│ ├── tech-stack.md
│ ├── architecture.md
│ ├── features.md
│ └── concerns.md
│
├── blueprint/ # Specification blueprint (blueprint step)
│ ├── blueprint-config.json
│ ├── product-brief.md
│ ├── glossary.json
│ ├── requirements/REQ-*.md, NFR-*.md
│ ├── architecture/ADR-*.md
│ ├── epics/EPIC-*.md
│ ├── readiness-report.md
│ └── blueprint-summary.md
│
├── collab/ # Human team collaboration
│ ├── specs/ # Team-level specs
│ └── specs/{uid}/ # Personal-level specs
│
├── .maestro/ # Agent session state (internal)
│ ├── maestro-*/status.json
│ ├── ralph-*/status.json
│ └── coord-*/walker-state.json
│
├── .team/{session-id}/.msg/ # Agent team message bus
│ └── messages.jsonl
│
├── templates/design-drafts/ # Workflow template design drafts
├── reference_style/ # UI design system reference
├── impeccable/ # Impeccable UI design context
│ ├── PRODUCT.md
│ ├── DESIGN.md
│ ├── design.json
│ ├── critique/
│ └── live/config.json, sessions/
│
├── worktrees.json # Worktree registry
├── worktree-scope.json # Worktree scope marker
├── harvest-log.jsonl # Harvest log
└── harvest-report-{date}.md # Harvest report
3. Core File Details
| File | Purpose | Key Fields |
|---|---|---|
state.json | Project state machine + Artifact Registry | version, status, current_milestone, current_phase, artifacts[], milestones[], milestone_history[] |
config.json | User workflow config (created by maestro-init + extended by per-command segments) | workflow.{research,reflection}, execution.{method,auto_commit,default_executor}, git.commit_docs, gates.{confirm_roadmap,confirm_plan}, codebase.auto_sync_after_execute, worktree.{root,branch_prefix}, guard.*, collab.*, specInjection.*, dashboard.port |
project.md | Project definition (created by maestro-init) | Core Value, Requirements, Key Decisions, Context |
roadmap.md | Milestone/phase roadmap (created by the roadmap step) | Milestone list, success criteria, dependencies, Phase Progress Table |
wiki-index.json | Wiki unified index (auto-generated by WikiIndexer) | Indexes project/specs/knowhow/issues/roadmap |
state.json Schema
{
"version": "3.0",
"status": "idle|active",
"current_milestone": "M1",
"current_phase": 1,
"milestones": [{ "id": "M1", "status": "active|completed|forked", "phases": [1, 2] }],
"milestone_history": [{ "milestone_id": "M1", "completed_at": "ISO-8601" }],
"artifacts": [{ "id": "ANL-001", "type": "analyze", "path": "scratch/...", "status": "completed" }],
"artifact_archive": [{ "id": "ANL-000", "type": "analyze", "milestone": "M0", "graduated_at": "ISO-8601", "knowhow_ref": "graduated-analyze-ANL-000", "summary": "..." }],
"accumulated_context": {
"key_decisions": [{ "decision": "...", "rationale": "...", "source": "analyze:ANL-001", "locked_at": "ISO-8601" }],
"deferred": [{ "title": "...", "reason": "...", "status": "open|resolved|cancelled|superseded", "source": "..." }],
"blockers": [{ "title": "...", "severity": "...", "status": "open|investigating|resolved", "source": "..." }]
},
"last_pruned": "ISO-8601"
}
artifacts[] Schema
{
"id": "ANL-001",
"type": "analyze",
"milestone": "M1",
"phase": 1,
"scope": "phase|milestone|adhoc|standalone",
"path": "scratch/20260513-analyze-P1-auth",
"status": "created|completed|failed",
"depends_on": null,
"harvested": false,
"context_package": "scratch/20260513-analyze-P1-auth/context-package.json",
"created_at": "ISO-8601",
"completed_at": "ISO-8601"
}
| Field | Description |
|---|---|
context_package | Path to the Context Package produced by this artifact (relative to .workflow/). null if not generated (e.g., plan/execute/verify). Used for --from resolution. |
artifact_archive[] Schema
harvest --prune migrates graduated artifacts from artifacts[] to this array. Files remain on disk; only the state.json reference moves.
{
"id": "ANL-001",
"type": "analyze",
"milestone": "M1",
"path": "scratch/20260315-analyze-P2-security",
"graduated_at": "ISO-8601",
"knowhow_ref": "graduated-analyze-ANL-001",
"summary": "Security audit P2 — 8 fragments → 3 wiki, 2 spec, 3 issue"
}
| Field | Description |
|---|---|
graduated_at | Archival timestamp |
knowhow_ref | Corresponding wiki knowhow entry slug (retrievable via maestro wiki load) |
summary | One-line summary: source + fragment routing stats |
accumulated_context Management
accumulated_context grows over the project lifecycle. harvest --prune cleans it with these rules:
| Field | Keep | Prune |
|---|---|---|
key_decisions[] | Decisions not yet in specs | Already exists verbatim in architecture-constraints.md |
deferred[] | status ∈ {open, deferred} | status ∈ {resolved, cancelled, superseded} |
blockers[] | status ∈ {open, investigating} | status == resolved |
Artifact Lifecycle
created → completed → harvested → archived
↘ failed
4. Knowledge System
specs/ — Specification Files
Uses <spec-entry> closed-tag format, automatically indexed by WikiIndexer.
| File | Category | Core | Created When |
|---|---|---|---|
coding-conventions.md | coding | Yes | Always |
architecture-constraints.md | arch | Yes | Always |
knowhow.md | — | Yes | Always |
quality-rules.md | review | No | Linter/CI detected |
test-conventions.md | test | No | Test framework detected |
debug-notes.md | debug | No | On demand |
review-standards.md | review | No | On demand |
learnings.md | learning | No | On demand |
Spec Scopes:
| Scope | Directory | ID Prefix |
|---|---|---|
| project | .workflow/specs/ | spec:project: |
| global | ~/.maestro/specs/ | spec:global: |
| team | .workflow/collab/specs/ | spec:team: |
| personal | .workflow/collab/specs/{uid}/ | spec:personal:{uid}: |
<spec-entry category="coding" keywords="exports,naming" date="2026-05-13" source="manual">
Specification content...
</spec-entry>
knowhow/ — Knowledge Document Prefixes
Filename format: {PREFIX}-{YYYYMMDD}-{HHMM}.md
| Prefix | Type | Description |
|---|---|---|
| KNW- | session | Session state compression |
| TIP- | tip | Quick tips |
| TPL- | template | Code/config templates |
| RCP- | recipe | Step-by-step guides |
| REF- | reference | External document summaries |
| DCS- | decision | Architecture decision records (proposed/accepted/superseded) |
| AST- | asset | Reusable assets (api-contract/data-model/prompt/config) |
| BLP- | blueprint | Architecture blueprints |
| DOC- | document | General documents |
Learn special prefixes: KNW-follow-, KNW-decompose-, KNW-retro-, KNW-opinion-, KNW-investigate-, KNW-digest-
5. Issue Tracking
issues/issues.jsonl — one JSON object per line:
{
"id": "ISS-XXXXXXXX-NNN",
"title": "Issue description",
"severity": "blocker|critical|major|minor|cosmetic",
"status": "open|registered|planned|in_progress|resolved|closed",
"source": "discover|review|verify|retrospective|harvest",
"phase": 1,
"tags": [], "related_files": [], "task_refs": [],
"analysis": { "root_cause": "...", "fix_direction": "...", "confidence": "high|medium|low" },
"history": [{ "action": "created|analyzed|planned|executed|closed", "at": "ISO-8601" }]
}
issues/issue-history.jsonl— archived closed issuesissues/discoveries/—issue-discoverstep session artifacts
6. Milestone Archives
Created by /maestro-session-seal when a milestone is completed:
- Verifies all runs are complete →
audit-report.md - Scratch artifacts moved into
milestones/{M}/artifacts/ state.json.artifacts[]entries moved tomilestone_history[]- Final knowhow extracted, workflow advances to next milestone
7. Global Paths (~/.maestro/)
~/.maestro/
├── cli-tools.json # CLI tool config (delegate routing)
├── workflows/ # Workflow definitions (maestro.md, plan.md, execute.md, 40+ files)
├── templates/ # Template system (state.json, plan.json, task.json, workflows/, etc.)
├── overlays/ # Command extensions (*.json, docs/, _shipped/)
└── specs/ # Global specifications (*.md)
8. Naming Convention Quick Reference
Scratch Directories
Format: {YYYYMMDD}-{type}[-P{N}|-M{N}]-{slug}
| Component | Values | Description |
|---|---|---|
{YYYYMMDD} | Date | Chronological sorting |
{type} | analyze, plan, verify, review, debug, test, auto-test, brainstorm, collab, ui-design | Artifact type |
P{N} / M{N} | P1, M1, etc. | Phase / Milestone scope (omitted for adhoc/standalone) |
{slug} | kebab-case | Content summary |
Artifact Types and Commands
| Type | ID Prefix | Scope | Producer |
|---|---|---|---|
| analyze | ANL-{NNN} | phase, adhoc, standalone | analyze step |
| plan | PLN-{NNN} | phase, adhoc | plan step |
| execute | EXC-{NNN} | phase | execute step |
| verify | VRF-{NNN} | phase, milestone | execute (E2.7) |
| review | REV-{NNN} | phase | review step |
| debug | DBG-{NNN} | phase, standalone | debug step |
| test | TST-{NNN} | phase | test step |
| brainstorm | BRN-{NNN} | adhoc | brainstorm step |
| collab | CLB-{NNN} | adhoc | collab step |
| import | IMP-{NNN} | standalone | Auto-created by --from @file |
| ui-design | — | phase, scratch | maestro-impeccable --chain build |
Session ID Formats
| Type | Format | Example |
|---|---|---|
| maestro main session | maestro-{YYYYMMDD-HHmmss} | maestro-20260513-143022 |
| ralph session | ralph-{YYYYMMDD-HHmmss} | ralph-20260513-143022 |
| delegate ID | {prefix}-{HHmmss}-{rand4} | gem-143022-a7f2 |
| Issue ID | ISS-XXXXXXXX-NNN | ISS-a1b2c3d4-001 |
9. Context Package System
Motivation
Downstream commands (roadmap / analyze / plan / blueprint) consuming upstream outputs suffer from three issues:
- Format coupling — each consumer hardcodes upstream file structure (e.g., roadmap knows guidance-specification.md §10 is features)
- Closed input — only
--from-brainstormis supported; no way to feed arbitrary user documents (PRDs, RFCs, meeting notes) - Value leakage — brainstorm role analyses (Decision Digests) are underutilized by roadmap/plan
Context Package is the standard data contract across commands — upstream outputs in a unified schema, downstream consumes via a unified interface.
Placement
Each context-producing session generates context-package.json within its directory. The artifact entry in state.json points to it via the context_package field.
.workflow/scratch/20260521-brainstorm-cache/
├── guidance-specification.md # Original output (preserved)
├── system-architect/analysis.md # Original output (preserved)
├── context.md # Human-readable summary (preserved)
└── context-package.json # Standardized machine contract (new)
Not placed at root — avoids multi-session overwrite conflicts, preserves provenance.
Context Package Schema
{
"$schema": "context-package/1.0",
// ── Provenance ──
"source": {
"type": "brainstorm|analyze|collab|import",
"artifact_id": "BRN-001",
"session_path": "scratch/20260521-brainstorm-cache/",
"generated_at": "2026-05-21T12:00:00Z"
},
// ── Requirements ── Primary consumer: roadmap, spec-gen
"requirements": [
{
"id": "F-001",
"title": "User authentication system",
"description": "Support OAuth2 + local password login",
"priority": "must|should|may",
"acceptance": "Users can log in via Google/GitHub OAuth",
"ref": "guidance-specification.md#§10"
}
],
// ── Constraints ── Primary consumer: plan, execute
"constraints": [
{
"id": "C-001",
"area": "authentication",
"constraint": "MUST use stateless JWT tokens",
"rationale": "Cannot share sessions across microservices",
"status": "locked|open|deferred",
"ref": "system-architect/analysis.md#§2-Decisions"
}
],
// ── Domain Knowledge ──
"domain": {
"problem_statement": "...",
"terminology": [
{ "term": "Tenant", "definition": "Multi-tenant isolation unit", "ref": "guidance-specification.md#§5" }
],
"audience": "Enterprise users",
"industry": "SaaS"
},
// ── Exclusions ──
"non_goals": [
{ "title": "Mobile adaptation", "rationale": "V2 scope", "ref": "guidance-specification.md#§6" }
],
// ── Role Insights ── Direct use by plan (optional, brainstorm only)
"insights": [
{
"role": "system-architect",
"area": "data-model",
"summary": "Recommend PostgreSQL JSONB for tenant config storage",
"ref": "system-architect/analysis.md#§3-Data-Model"
}
],
// ── Open Questions ── Primary consumer: analyze
"open_questions": [
{
"area": "caching",
"question": "Redis vs Memcached for session cache?",
"options": ["Redis (feature-rich)", "Memcached (simpler)"],
"ref": "guidance-specification.md#§8"
}
],
// ── Source File References ── For deep reads on demand
"references": [
{ "type": "guidance", "path": "guidance-specification.md" },
{ "type": "role-analysis", "path": "system-architect/analysis.md" },
{ "type": "role-analysis", "path": "ux-expert/analysis.md" }
]
}
Field Reference:
| Field | Required | Producers | Primary Consumers | Description |
|---|---|---|---|---|
source | Yes | All | All | Provenance metadata |
requirements | Yes | brainstorm, import | roadmap, spec-gen | Feature list; priority maps from RFC 2119 |
constraints | Yes | brainstorm, analyze | plan, execute | status drives plan routing: locked=immutable, open=discretion, deferred=excluded |
domain | No | brainstorm, import | All | Domain knowledge background |
non_goals | No | brainstorm, import | roadmap, spec-gen | Explicit exclusions to prevent scope creep |
insights | No | brainstorm | plan | Role analysis insights (data models, state machines, etc.) |
open_questions | No | brainstorm, import | analyze | Unresolved questions for focused analysis |
references | No | All | harvest, deep-read scenarios | File-level reference index |
Per-item ref format: {file}#{section-anchor}, paths relative to session directory. Used for:
- Locating provenance during multi-source merge conflicts
- Deep-reading full context behind a specific constraint
- Annotating original source when harvest extracts knowledge fragments
Source Adapter Mappings
| Source Type | → requirements | → constraints | → domain | → non_goals | → insights | → open_questions |
|---|---|---|---|---|---|---|
| brainstorm guidance-spec | §10 features | §4-N MUST/MUST NOT → locked | §1-3 problem/terms/audience | §non-goals | — | §4-N SHOULD/MAY → open |
| brainstorm {role}/analysis.md §2 | — | Decisions[locked] | — | — | Cross-Cutting → insights | Decisions[open] |
| analyze context.md | — | Locked → locked | — | Deferred → non_goals | — | Free → open_questions |
| analyze conclusions.json | implementation_scope → requirements | — | — | — | recommendations → insights | — |
| collab conclusions.json | — | consensus → locked | — | — | unique findings → insights | conflicts → open |
| import (@file) | LLM extraction | LLM extraction | LLM extraction | LLM extraction | — | LLM extraction |
Unified Input: --from Flag
Replaces --from-brainstorm (retained as alias), supporting multiple input sources:
# --from argument patterns accepted by the roadmap / plan / analyze steps (dispatched within a Session chain):
# By artifact type+ID
roadmap --from brainstorm:BRN-001
plan --from analyze:ANL-002
# By session path
plan --from .workflow/scratch/20260521-brainstorm-cache/
# Import external documents (auto-creates import session)
roadmap --from @requirements.md
analyze --from @competitor-analysis.pdf
# Multi-source merge
plan --from brainstorm:BRN-001 --from @tech-constraints.md
# Backward compatible alias
roadmap --from-brainstorm SESSION-ID # equivalent to --from brainstorm:{resolve(SESSION-ID)}
Resolution Priority:
| Priority | Pattern | Action |
|---|---|---|
| 1 | @file | Document adapter: create import session → delegate extraction → context-package.json |
| 2 | type:ID | Query state.json artifacts[type+id].context_package → load |
| 3 | Directory path | Check path/context-package.json → load; generate on-the-fly if missing |
| 4 | Bare ID | Fuzzy match state.json artifacts (by id / session slug) |
Multi-source Merge Strategy:
| Field Type | Merge Rule |
|---|---|
| Arrays (requirements, constraints, non_goals, insights, open_questions) | Append and deduplicate (by id or title) |
| Object (domain) | Later source overrides scalar fields; terminology merges with dedup |
| Conflicting constraints (same area + contradictory constraint) | Mark status: "conflicted"; consumer resolves |
| open_questions | After merge: if constraints already locks same area → auto-remove question |
| source | Becomes sources[] array (records multiple origins) |
External Document Import Flow
roadmap --from @prd.md
│
├── 1. Create import session: .workflow/scratch/{date}-import-prd/
├── 2. Copy original document → source.{ext}
├── 3. Delegate extraction (analysis mode) → context-package.json
├── 4. Register artifact: { type: "import", context_package: "..." }
└── 5. Return package for consumption (reuse later: --from import:IMP-001)
Extraction happens once — subsequent commands read the existing context-package.json without re-extraction.
Relationship with accumulated_context
| Dimension | context-package | accumulated_context |
|---|---|---|
| Lifecycle | Single session output, immutable snapshot | Grows across project lifetime |
| Trigger | Loaded explicitly via --from | Auto-inherited by every command |
| Content | Full context (requirements/constraints/domain/insights) | Curated summaries (key_decisions/blockers/deferred) |
| Writers | brainstorm / analyze / collab / import | analyze / roadmap / milestone completion |
| Relationship | constraints[locked] promotes to accumulated_context.key_decisions[] |
Linkage: When analyze completes, it both generates a context-package (for future --from queries) and incrementally syncs locked decisions into accumulated_context.key_decisions[] to ensure global constraint propagation.
Command Consumption Changes
| Command | Previous | After |
|---|---|---|
| roadmap | --from-brainstorm → hardcoded guidance-spec §10 parsing | --from → reads context-package.requirements[] |
| analyze | state.json auto-discovery → hardcoded guidance-spec §4-N | --from or auto-discovery → reads constraints[locked] to skip decided areas |
| plan | Reads analyze's context.md | --from → reads constraints[] + insights[]; fallback to context.md |
| spec-gen | --from-brainstorm → full guidance-spec read | --from → reads all fields (requirements/domain/non_goals etc.) |
| init | --from-brainstorm → guidance-spec read | --from → reads domain + requirements |
| harvest | Scans raw files to extract fragments | Adds context-package as optional input (more efficient extraction); --prune manages state.json bloat (graduated → knowhow → archive) |
Anti-Patterns
| Must NOT go in context-package | Reason |
|---|---|
| Full document content / large code blocks | Use ref to point to source files; consumers deep-read on demand |
| Execution status / progress tracking | Belongs in plan.json / state.json |
Consumer-specific fields (e.g., roadmap_hints) | Violates semantic neutrality |
| LLM reasoning processes | Belongs in discussion.md |
| Git history / diffs | Use git commands for real-time retrieval |
| Confidence scores / ratings | Belongs in analysis.md; consumers don't need upstream self-assessment |
| Intermediate process files (exploration.json etc.) | Unstructured non-decisions, not part of the contract |
| plan → execute task structures | Already has a strong typed contract (plan.json); no abstraction layer needed |