/** * Canonical phase definitions for the scaffold pipeline. * This is the single source of truth for phase slugs, display names, and ordering. * All other references (docs, skills, commands) must match these definitions. */ export declare const PHASES: readonly [{ readonly number: 0; readonly slug: "vision"; readonly displayName: "Product Vision"; readonly description: "Transforms your idea into a strategic vision document covering who it's for, what makes it different, and what success looks like. The review step stress-tests the vision for gaps, and the innovate step explores market positioning opportunities. Without this, later steps lack a clear North Star and features drift."; }, { readonly number: 1; readonly slug: "pre"; readonly displayName: "Product Definition"; readonly description: "Translates your vision into a detailed product requirements document (PRD) with features, user personas, constraints, and success criteria, then breaks the PRD into user stories with testable acceptance criteria. Review and innovation steps audit for gaps and suggest enhancements. Without this, you're building without a spec."; }, { readonly number: 2; readonly slug: "foundation"; readonly displayName: "Project Foundation"; readonly description: "Researches and documents your technology choices with rationale, creates coding standards tailored to your stack with actual linter configs, defines your testing strategy and test pyramid, and designs a directory layout optimized for parallel AI agent work. Without this, agents guess at conventions and produce inconsistent code."; }, { readonly number: 3; readonly slug: "environment"; readonly displayName: "Development Environment"; readonly description: "Sets up your local dev environment with one-command startup and live reload, creates a design system (web apps only), configures your git branching strategy with CI pipeline and worktree scripts for parallel agents, optionally sets up automated PR review, and configures AI memory so conventions persist across sessions."; }, { readonly number: 4; readonly slug: "integration"; readonly displayName: "Testing Integration"; readonly description: "Auto-detects your platform (web or mobile) and configures end-to-end testing — Playwright for web apps, Maestro for mobile/Expo. Skips automatically for backend-only projects. Without this, your test pyramid has no top level."; }, { readonly number: 5; readonly slug: "modeling"; readonly displayName: "Domain Modeling"; readonly description: "Analyzes your user stories to identify the core concepts in your project — entities, their relationships, invariants, and domain events. Establishes a shared vocabulary that all docs and code will use. Without this, different docs use different names for the same concept and agents create duplicate logic."; }, { readonly number: 6; readonly slug: "decisions"; readonly displayName: "Architecture Decisions"; readonly description: "Documents every significant technology and design decision as an Architecture Decision Record — what was decided, what alternatives were considered, and why. The review catches contradictions and missing decisions. Without this, future contributors don't know why things are the way they are."; }, { readonly number: 7; readonly slug: "architecture"; readonly displayName: "System Architecture"; readonly description: "Designs the system blueprint — which components exist, how data flows between them, where each piece of code lives, and how the system can be extended. Translates your domain model and decisions into a concrete structure that implementation will follow. Without this, agents make conflicting structural assumptions."; }, { readonly number: 8; readonly slug: "specification"; readonly displayName: "Specifications"; readonly description: "Creates detailed interface specifications for each layer of your system. Database schema enforces business rules via constraints. API contracts define every endpoint with request/response shapes, error codes, and auth requirements. UX spec maps user flows, interaction states, and accessibility. Each is conditional — only generated if your project has that layer."; }, { readonly number: 9; readonly slug: "quality"; readonly displayName: "Quality Gates"; readonly description: "Reviews your testing strategy for coverage gaps, generates test skeletons from acceptance criteria, creates automated eval checks that verify code meets documented standards, designs your deployment pipeline with monitoring and incident response, and conducts a security review covering OWASP Top 10 and threat modeling. Without this, quality is an afterthought."; }, { readonly number: 10; readonly slug: "parity"; readonly displayName: "Platform Parity"; readonly description: "For projects targeting multiple platforms, audits all documentation for platform-specific gaps — features that work on one platform but aren't specified for another, input pattern differences, and platform-specific testing coverage. Skips automatically for single-platform projects."; }, { readonly number: 11; readonly slug: "consolidation"; readonly displayName: "Consolidation"; readonly description: "Optimizes your CLAUDE.md to stay under 200 lines with critical patterns front-loaded, then audits all workflow documentation for consistency — making sure commit formats, branch naming, PR workflows, and key commands match across every doc. Without this, agents encounter conflicting instructions."; }, { readonly number: 12; readonly slug: "planning"; readonly displayName: "Planning"; readonly description: "Decomposes your user stories and architecture into concrete, implementable tasks — each scoped to ~150 lines of code, limited to 3 files, with clear acceptance criteria and no ambiguous decisions. The review validates coverage, checks the dependency graph for cycles, and runs multi-model validation at higher depths."; }, { readonly number: 13; readonly slug: "validation"; readonly displayName: "Validation"; readonly description: "Seven cross-cutting audits that catch problems before implementation begins: scope creep, dependency graph cycles, implementability ambiguities, decision completeness, traceability gaps, cross-phase naming drift, and critical path broken handoffs. Without this phase, hidden spec problems surface during implementation as expensive rework."; }, { readonly number: 14; readonly slug: "finalization"; readonly displayName: "Finalization"; readonly description: "Applies all findings from the validation phase, freezes documentation, creates a developer onboarding guide for anyone joining the project, and writes the implementation playbook — the operational document agents reference during every coding session. Without this, there's no bridge between planning and building."; }, { readonly number: 15; readonly slug: "build"; readonly displayName: "Build"; readonly description: "Stateless execution steps that can be run repeatedly. Single-agent and multi-agent modes start the TDD implementation loop. Resume commands restore session context after breaks. Quick-task handles one-off bug fixes outside the main plan. New-enhancement adds a feature to an existing project with full planning rigor."; }]; /** Valid phase slug values derived from the PHASES constant. */ export type PhaseSlug = typeof PHASES[number]['slug']; /** Lookup map from phase slug to phase metadata. */ export declare const PHASE_BY_SLUG: Record; /** * Machine-readable detection contract (D4) mirroring a step's Mode Detection * prose. `cmd` strings are fixed values shipped in the package's pipeline * files only — never read from project-local files (trust boundary). */ export interface DetectCheck { /** Filesystem existence check (file or directory), relative to project root. */ path?: string; /** Command that must exit 0 within the timeout. Executed with cwd = project root. */ cmd?: string; /** Per-cmd timeout in seconds. Default 10. */ timeout?: number; } export interface DetectSpec { /** Every entry must pass. */ all?: DetectCheck[]; /** At least one entry must pass. */ any?: DetectCheck[]; } /** * Parsed YAML frontmatter from a meta-prompt .md file. * See frontmatter-schema.md (authoritative source). * Note: kebab-case YAML keys are converted to camelCase on parse. */ export interface MetaPromptFrontmatter { /** Step identifier matching the filename stem. Kebab-case pattern ^[a-z][a-z0-9-]*$ */ name: string; /** One-line purpose. Max 200 chars. */ description: string; /** User-facing summary of what the step does and what it produces. Optional, max 500 chars. */ summary?: string | null; /** Pipeline phase slug. See PHASES constant for valid values. Null for tools. */ phase: string | null; /** Unique position. Phase-aligned: Phase N → N00-N99. Primary tiebreaker in topological sort. Null for tools. */ order: number | null; /** Step slugs that must complete before this step can run. */ dependencies: string[]; /** Artifact paths this step produces (relative to project root). */ outputs: string[]; /** When 'if-needed', step is conditionally evaluated during init. */ conditional: 'if-needed' | null; /** Knowledge base entry names to load during assembly. */ knowledgeBase: string[]; /** Cross-cutting artifact references beyond the dependency chain. */ reads: string[]; /** Cross-service artifact references — each entry points at a foreign service:step pair (Wave 3c). */ crossReads?: Array<{ service: string; step: string; }>; /** When true, step has no completion state tracking (on-demand, always available). */ stateless: boolean; /** Source category: 'pipeline' for sequential steps, 'tool' for utility commands. */ category: 'pipeline' | 'tool'; /** Machine-readable detection contract (D4). Null when the step declares none. */ detect?: DetectSpec | null; [key: string]: unknown; } /** A loaded meta-prompt file with parsed frontmatter and body. */ export interface MetaPromptFile { /** The filename stem (matches frontmatter name). */ stepName: string; /** Absolute file path. */ filePath: string; /** Validated frontmatter. */ frontmatter: MetaPromptFrontmatter; /** Raw markdown body (everything after closing ---). */ body: string; /** Parsed level-2 heading sections from the body. */ sections: Record; } //# sourceMappingURL=frontmatter.d.ts.map