@garygentry/feature-forge 0.1.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/LICENSE +21 -0
- package/adapters/GENERATION-REPORT.md +128 -0
- package/adapters/claude/agents/forge-researcher.md +137 -0
- package/adapters/claude/agents/forge-spec-writer.md +115 -0
- package/adapters/claude/agents/forge-verifier.md +121 -0
- package/adapters/claude/references/epic-manifest-schema.json +120 -0
- package/adapters/claude/references/forge-config-schema.json +166 -0
- package/adapters/claude/references/pipeline-state-schema.json +110 -0
- package/adapters/claude/references/portable-root.md +56 -0
- package/adapters/claude/references/process-overview.md +123 -0
- package/adapters/claude/references/ralph-loop-contract.md +221 -0
- package/adapters/claude/references/shared-conventions.md +144 -0
- package/adapters/claude/references/skill-frontmatter.schema.json +17 -0
- package/adapters/claude/references/stack-resolution.md +51 -0
- package/adapters/claude/references/stacks/_generic.md +90 -0
- package/adapters/claude/references/stacks/go.md +138 -0
- package/adapters/claude/references/stacks/python.md +163 -0
- package/adapters/claude/references/stacks/rust.md +151 -0
- package/adapters/claude/references/stacks/typescript.md +111 -0
- package/adapters/claude/references/vendor-construct-inventory.md +49 -0
- package/adapters/claude/scripts/forge-root.sh +50 -0
- package/adapters/claude/skills/forge/SKILL.md +165 -0
- package/adapters/claude/skills/forge-0-epic/SKILL.md +303 -0
- package/adapters/claude/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/claude/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/claude/skills/forge-1-prd/SKILL.md +121 -0
- package/adapters/claude/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/claude/skills/forge-2-tech/SKILL.md +198 -0
- package/adapters/claude/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/claude/skills/forge-3-specs/SKILL.md +154 -0
- package/adapters/claude/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/claude/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/claude/skills/forge-4-backlog/SKILL.md +146 -0
- package/adapters/claude/skills/forge-5-loop/SKILL.md +303 -0
- package/adapters/claude/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/claude/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/claude/skills/forge-6-docs/SKILL.md +179 -0
- package/adapters/claude/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/claude/skills/forge-fix/SKILL.md +65 -0
- package/adapters/claude/skills/forge-init/SKILL.md +29 -0
- package/adapters/claude/skills/forge-verify/SKILL.md +219 -0
- package/adapters/claude/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/codex/agents/forge-researcher.md +133 -0
- package/adapters/codex/agents/forge-spec-writer.md +112 -0
- package/adapters/codex/agents/forge-verifier.md +115 -0
- package/adapters/codex/agents/openai.yaml +10 -0
- package/adapters/codex/references/epic-manifest-schema.json +120 -0
- package/adapters/codex/references/forge-config-schema.json +166 -0
- package/adapters/codex/references/pipeline-state-schema.json +110 -0
- package/adapters/codex/references/portable-root.md +56 -0
- package/adapters/codex/references/process-overview.md +123 -0
- package/adapters/codex/references/ralph-loop-contract.md +221 -0
- package/adapters/codex/references/shared-conventions.md +144 -0
- package/adapters/codex/references/skill-frontmatter.schema.json +17 -0
- package/adapters/codex/references/stack-resolution.md +51 -0
- package/adapters/codex/references/stacks/_generic.md +90 -0
- package/adapters/codex/references/stacks/go.md +138 -0
- package/adapters/codex/references/stacks/python.md +163 -0
- package/adapters/codex/references/stacks/rust.md +151 -0
- package/adapters/codex/references/stacks/typescript.md +111 -0
- package/adapters/codex/references/vendor-construct-inventory.md +49 -0
- package/adapters/codex/scripts/forge-root.sh +50 -0
- package/adapters/codex/skills/forge/forge.md +164 -0
- package/adapters/codex/skills/forge-0-epic/forge-0-epic.md +302 -0
- package/adapters/codex/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/codex/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/codex/skills/forge-1-prd/forge-1-prd.md +120 -0
- package/adapters/codex/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/codex/skills/forge-2-tech/forge-2-tech.md +197 -0
- package/adapters/codex/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/codex/skills/forge-3-specs/forge-3-specs.md +153 -0
- package/adapters/codex/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/codex/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/codex/skills/forge-4-backlog/forge-4-backlog.md +145 -0
- package/adapters/codex/skills/forge-5-loop/forge-5-loop.md +302 -0
- package/adapters/codex/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/codex/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/codex/skills/forge-6-docs/forge-6-docs.md +178 -0
- package/adapters/codex/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/codex/skills/forge-fix/forge-fix.md +64 -0
- package/adapters/codex/skills/forge-init/forge-init.md +29 -0
- package/adapters/codex/skills/forge-verify/forge-verify.md +218 -0
- package/adapters/codex/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/copilot/agents/forge-researcher.md +133 -0
- package/adapters/copilot/agents/forge-spec-writer.md +112 -0
- package/adapters/copilot/agents/forge-verifier.md +115 -0
- package/adapters/copilot/references/epic-manifest-schema.json +120 -0
- package/adapters/copilot/references/forge-config-schema.json +166 -0
- package/adapters/copilot/references/pipeline-state-schema.json +110 -0
- package/adapters/copilot/references/portable-root.md +56 -0
- package/adapters/copilot/references/process-overview.md +123 -0
- package/adapters/copilot/references/ralph-loop-contract.md +221 -0
- package/adapters/copilot/references/shared-conventions.md +144 -0
- package/adapters/copilot/references/skill-frontmatter.schema.json +17 -0
- package/adapters/copilot/references/stack-resolution.md +51 -0
- package/adapters/copilot/references/stacks/_generic.md +90 -0
- package/adapters/copilot/references/stacks/go.md +138 -0
- package/adapters/copilot/references/stacks/python.md +163 -0
- package/adapters/copilot/references/stacks/rust.md +151 -0
- package/adapters/copilot/references/stacks/typescript.md +111 -0
- package/adapters/copilot/references/vendor-construct-inventory.md +49 -0
- package/adapters/copilot/scripts/forge-root.sh +50 -0
- package/adapters/copilot/skills/forge/forge.md +164 -0
- package/adapters/copilot/skills/forge-0-epic/forge-0-epic.md +302 -0
- package/adapters/copilot/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/copilot/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/copilot/skills/forge-1-prd/forge-1-prd.md +120 -0
- package/adapters/copilot/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/copilot/skills/forge-2-tech/forge-2-tech.md +197 -0
- package/adapters/copilot/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/copilot/skills/forge-3-specs/forge-3-specs.md +153 -0
- package/adapters/copilot/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/copilot/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/copilot/skills/forge-4-backlog/forge-4-backlog.md +145 -0
- package/adapters/copilot/skills/forge-5-loop/forge-5-loop.md +302 -0
- package/adapters/copilot/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/copilot/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/copilot/skills/forge-6-docs/forge-6-docs.md +178 -0
- package/adapters/copilot/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/copilot/skills/forge-fix/forge-fix.md +64 -0
- package/adapters/copilot/skills/forge-init/forge-init.md +29 -0
- package/adapters/copilot/skills/forge-verify/forge-verify.md +218 -0
- package/adapters/copilot/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/cursor/agents/forge-researcher.mdc +134 -0
- package/adapters/cursor/agents/forge-spec-writer.mdc +113 -0
- package/adapters/cursor/agents/forge-verifier.mdc +116 -0
- package/adapters/cursor/references/epic-manifest-schema.json +120 -0
- package/adapters/cursor/references/forge-config-schema.json +166 -0
- package/adapters/cursor/references/pipeline-state-schema.json +110 -0
- package/adapters/cursor/references/portable-root.md +56 -0
- package/adapters/cursor/references/process-overview.md +123 -0
- package/adapters/cursor/references/ralph-loop-contract.md +221 -0
- package/adapters/cursor/references/shared-conventions.md +144 -0
- package/adapters/cursor/references/skill-frontmatter.schema.json +17 -0
- package/adapters/cursor/references/stack-resolution.md +51 -0
- package/adapters/cursor/references/stacks/_generic.md +90 -0
- package/adapters/cursor/references/stacks/go.md +138 -0
- package/adapters/cursor/references/stacks/python.md +163 -0
- package/adapters/cursor/references/stacks/rust.md +151 -0
- package/adapters/cursor/references/stacks/typescript.md +111 -0
- package/adapters/cursor/references/vendor-construct-inventory.md +49 -0
- package/adapters/cursor/scripts/forge-root.sh +50 -0
- package/adapters/cursor/skills/forge/forge.mdc +165 -0
- package/adapters/cursor/skills/forge-0-epic/forge-0-epic.mdc +303 -0
- package/adapters/cursor/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/cursor/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/cursor/skills/forge-1-prd/forge-1-prd.mdc +121 -0
- package/adapters/cursor/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/cursor/skills/forge-2-tech/forge-2-tech.mdc +198 -0
- package/adapters/cursor/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/cursor/skills/forge-3-specs/forge-3-specs.mdc +154 -0
- package/adapters/cursor/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/cursor/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/cursor/skills/forge-4-backlog/forge-4-backlog.mdc +146 -0
- package/adapters/cursor/skills/forge-5-loop/forge-5-loop.mdc +303 -0
- package/adapters/cursor/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/cursor/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/cursor/skills/forge-6-docs/forge-6-docs.mdc +179 -0
- package/adapters/cursor/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/cursor/skills/forge-fix/forge-fix.mdc +65 -0
- package/adapters/cursor/skills/forge-init/forge-init.mdc +30 -0
- package/adapters/cursor/skills/forge-verify/forge-verify.mdc +219 -0
- package/adapters/cursor/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/gemini/agents/forge-researcher.md +133 -0
- package/adapters/gemini/agents/forge-spec-writer.md +112 -0
- package/adapters/gemini/agents/forge-verifier.md +115 -0
- package/adapters/gemini/gemini-extension.json +54 -0
- package/adapters/gemini/references/epic-manifest-schema.json +120 -0
- package/adapters/gemini/references/forge-config-schema.json +166 -0
- package/adapters/gemini/references/pipeline-state-schema.json +110 -0
- package/adapters/gemini/references/portable-root.md +56 -0
- package/adapters/gemini/references/process-overview.md +123 -0
- package/adapters/gemini/references/ralph-loop-contract.md +221 -0
- package/adapters/gemini/references/shared-conventions.md +144 -0
- package/adapters/gemini/references/skill-frontmatter.schema.json +17 -0
- package/adapters/gemini/references/stack-resolution.md +51 -0
- package/adapters/gemini/references/stacks/_generic.md +90 -0
- package/adapters/gemini/references/stacks/go.md +138 -0
- package/adapters/gemini/references/stacks/python.md +163 -0
- package/adapters/gemini/references/stacks/rust.md +151 -0
- package/adapters/gemini/references/stacks/typescript.md +111 -0
- package/adapters/gemini/references/vendor-construct-inventory.md +49 -0
- package/adapters/gemini/scripts/forge-root.sh +50 -0
- package/adapters/gemini/skills/forge/forge.md +164 -0
- package/adapters/gemini/skills/forge-0-epic/forge-0-epic.md +302 -0
- package/adapters/gemini/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/gemini/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/gemini/skills/forge-1-prd/forge-1-prd.md +120 -0
- package/adapters/gemini/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/gemini/skills/forge-2-tech/forge-2-tech.md +197 -0
- package/adapters/gemini/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/gemini/skills/forge-3-specs/forge-3-specs.md +153 -0
- package/adapters/gemini/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/gemini/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/gemini/skills/forge-4-backlog/forge-4-backlog.md +145 -0
- package/adapters/gemini/skills/forge-5-loop/forge-5-loop.md +302 -0
- package/adapters/gemini/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/gemini/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/gemini/skills/forge-6-docs/forge-6-docs.md +178 -0
- package/adapters/gemini/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/gemini/skills/forge-fix/forge-fix.md +64 -0
- package/adapters/gemini/skills/forge-init/forge-init.md +29 -0
- package/adapters/gemini/skills/forge-verify/forge-verify.md +218 -0
- package/adapters/gemini/skills/forge-verify/references/verification-checklists.md +379 -0
- package/dist/agent-targets.d.ts +70 -0
- package/dist/agent-targets.js +111 -0
- package/dist/apply.d.ts +49 -0
- package/dist/apply.js +246 -0
- package/dist/cli.d.ts +94 -0
- package/dist/cli.js +508 -0
- package/dist/detect.d.ts +45 -0
- package/dist/detect.js +72 -0
- package/dist/fsutil.d.ts +56 -0
- package/dist/fsutil.js +175 -0
- package/dist/hash.d.ts +50 -0
- package/dist/hash.js +107 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -0
- package/dist/manifest.d.ts +72 -0
- package/dist/manifest.js +222 -0
- package/dist/plan.d.ts +66 -0
- package/dist/plan.js +166 -0
- package/dist/rauf.d.ts +83 -0
- package/dist/rauf.js +118 -0
- package/dist/report.d.ts +35 -0
- package/dist/report.js +110 -0
- package/dist/source.d.ts +69 -0
- package/dist/source.js +164 -0
- package/dist/types.d.ts +264 -0
- package/dist/types.js +57 -0
- package/package.json +42 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Rust Stack Profile
|
|
2
|
+
|
|
3
|
+
Stack-specific guidance for Rust projects (stable channel).
|
|
4
|
+
|
|
5
|
+
## Stack Identity
|
|
6
|
+
|
|
7
|
+
- **Language**: Rust (stable channel, edition 2021 or later)
|
|
8
|
+
- **Build system**: Cargo (`cargo build`, `cargo test`, `cargo run`)
|
|
9
|
+
- **Package registry**: crates.io (dependencies declared in `Cargo.toml`)
|
|
10
|
+
- **Philosophy**: Zero-cost abstractions, ownership model for memory safety, fearless concurrency
|
|
11
|
+
|
|
12
|
+
## Discovery Checklist
|
|
13
|
+
|
|
14
|
+
When examining a Rust project, check for:
|
|
15
|
+
|
|
16
|
+
- **Project manifest**: `Cargo.toml` (package metadata, dependencies, features, workspace config)
|
|
17
|
+
- **Dependency lock**: `Cargo.lock` (exact dependency versions for reproducible builds)
|
|
18
|
+
- **Library entry**: `src/lib.rs` (library crate root)
|
|
19
|
+
- **Binary entry**: `src/main.rs` (binary crate root), or `src/bin/` for multiple binaries
|
|
20
|
+
- **Build script**: `build.rs` (compile-time code generation, native library linking)
|
|
21
|
+
- **Cargo config**: `.cargo/config.toml` (target-specific settings, linker config, aliases)
|
|
22
|
+
- **Workspace**: `[workspace]` table in root `Cargo.toml` with `members` list
|
|
23
|
+
- **Framework**: Check `Cargo.toml` dependencies for actix-web, axum, rocket (web), clap (CLI), tokio (async)
|
|
24
|
+
- **Async runtime**: tokio, async-std, smol
|
|
25
|
+
- **Serialization**: serde, serde_json, serde_yaml
|
|
26
|
+
|
|
27
|
+
## Archetype Conventions
|
|
28
|
+
|
|
29
|
+
### 00-core-definitions.md (Rust)
|
|
30
|
+
|
|
31
|
+
- **Structs**: Use `struct` types with derive macros (`#[derive(Debug, Clone, Serialize, Deserialize)]`). Document every public field with `///` doc comments.
|
|
32
|
+
- **Enums**: Use for sum types / discriminated unions. Each variant documents its purpose. Exhaustive `match` for control flow.
|
|
33
|
+
- **Traits**: Define shared behavior contracts. Keep focused (single responsibility). Use associated types for output types, generics for input types.
|
|
34
|
+
- **Error types**: `thiserror::Error` for library errors (typed, specific), `anyhow::Error` for application errors (erased, convenient). Define `type Result<T> = std::result::Result<T, MyError>` aliases per module.
|
|
35
|
+
- **Type aliases**: Use `type` for complex generic instantiations (e.g., `type DbPool = Pool<Postgres>`)
|
|
36
|
+
- **Newtypes**: Single-field tuple structs for type safety (e.g., `struct UserId(Uuid)`)
|
|
37
|
+
- **Constants**: `const` for compile-time values, `static` for global state (rarely needed), `lazy_static!` or `std::sync::LazyLock` for runtime-initialized globals
|
|
38
|
+
|
|
39
|
+
### 01-architecture-layout.md (Rust)
|
|
40
|
+
|
|
41
|
+
- **Single crate structure**:
|
|
42
|
+
- `src/lib.rs` — library root, declares modules with `mod` statements
|
|
43
|
+
- `src/main.rs` — binary entry point, imports from library crate
|
|
44
|
+
- `src/<module>.rs` or `src/<module>/mod.rs` — submodules
|
|
45
|
+
- `tests/` — integration tests (each file is a separate crate)
|
|
46
|
+
- `examples/` — runnable examples (`cargo run --example name`)
|
|
47
|
+
- `benches/` — benchmarks (`cargo bench`)
|
|
48
|
+
- **Cargo workspace** (multi-crate):
|
|
49
|
+
- Root `Cargo.toml` with `[workspace]` and `members = ["crates/*"]`
|
|
50
|
+
- Shared dependencies via `[workspace.dependencies]` with `{ workspace = true }` in member crates
|
|
51
|
+
- Internal crate references as path dependencies
|
|
52
|
+
- **Cargo.toml**: `[package]` (name, version, edition), `[dependencies]`, `[dev-dependencies]`, `[build-dependencies]`, `[features]` for conditional compilation
|
|
53
|
+
- **Module visibility**: `pub`, `pub(crate)`, `pub(super)` for fine-grained access control. Re-exports via `pub use` in parent modules.
|
|
54
|
+
|
|
55
|
+
### NN-testing-strategy.md (Rust)
|
|
56
|
+
|
|
57
|
+
- **Framework**: Built-in `#[test]` attribute (no external framework required)
|
|
58
|
+
- **Unit tests**: `#[cfg(test)] mod tests { ... }` at bottom of each source file (white-box, access to private items)
|
|
59
|
+
- **Integration tests**: `tests/` directory, each `.rs` file is a separate test crate (black-box, only public API)
|
|
60
|
+
- **Test assertions**: `assert!`, `assert_eq!`, `assert_ne!` macros; custom messages as format string arguments
|
|
61
|
+
- **Doc tests**: Code blocks in `///` doc comments run as tests with `cargo test`
|
|
62
|
+
- **Examples**: `examples/` directory, verified to compile with `cargo test`, runnable with `cargo run --example`
|
|
63
|
+
- **Test fixtures**: Builder pattern structs, helper functions in `tests/common/mod.rs`
|
|
64
|
+
- **Async tests**: `#[tokio::test]` attribute for async test functions
|
|
65
|
+
- **Property testing**: `proptest` or `quickcheck` crates for generative testing
|
|
66
|
+
- **Snapshot testing**: `insta` crate for snapshot/approval testing
|
|
67
|
+
|
|
68
|
+
## Spec Quality Rules
|
|
69
|
+
|
|
70
|
+
- All Rust code must be valid syntax with complete type annotations — not pseudocode
|
|
71
|
+
- Follow Rust idioms:
|
|
72
|
+
- `Result<T, E>` for fallible operations — never panic for expected failures
|
|
73
|
+
- `Option<T>` for nullable/optional values — never use sentinel values
|
|
74
|
+
- Ownership and borrowing: specify whether a function takes ownership (`T`), borrows (`&T`), or mutably borrows (`&mut T`). Note when `Clone` is required.
|
|
75
|
+
- Lifetime annotations when the compiler cannot infer them — document why a lifetime relationship exists
|
|
76
|
+
- Derive macros for common traits (`Debug`, `Clone`, `PartialEq`, `Eq`, `Hash`, `Serialize`, `Deserialize`)
|
|
77
|
+
- `impl` blocks for methods — group inherent methods and trait implementations separately
|
|
78
|
+
- Pattern matching with `match` for control flow over enums and `Result`/`Option`
|
|
79
|
+
- `?` operator for error propagation — avoid manual `match` on `Result` when `?` suffices
|
|
80
|
+
- Document every public item with `///` doc comments including `# Examples` sections for non-trivial APIs
|
|
81
|
+
- Use `#[must_use]` on functions whose return values should not be ignored
|
|
82
|
+
- Include complete `use` statements in all code examples
|
|
83
|
+
|
|
84
|
+
## Verification Specifics
|
|
85
|
+
|
|
86
|
+
- **Type checking**: `cargo check` (fast compile without codegen — catches all type errors)
|
|
87
|
+
- **Linting**: `cargo clippy` (idiomatic Rust lints, catches common mistakes)
|
|
88
|
+
- **Testing**: `cargo test` (unit tests, integration tests, doc tests, examples)
|
|
89
|
+
- **Documentation**: `cargo doc --no-deps` (ensures documentation compiles, catches broken links)
|
|
90
|
+
- **Formatting**: `cargo fmt --check` (ensures code matches `rustfmt` style)
|
|
91
|
+
- **Unsafe audit**: `cargo geiger` (if security-sensitive — counts unsafe blocks)
|
|
92
|
+
|
|
93
|
+
## Testing
|
|
94
|
+
|
|
95
|
+
- **Framework**: Built-in test harness (`#[test]`, `#[cfg(test)]`)
|
|
96
|
+
- **Test command**: `cargo test` for all, `cargo test test_name` for specific, `cargo test --lib` for unit only
|
|
97
|
+
- **Unit tests**: `#[cfg(test)] mod tests` at bottom of source files
|
|
98
|
+
- **Integration tests**: `tests/` directory, each file is a separate crate
|
|
99
|
+
- **Doc tests**: Code in `///` comments, verified by `cargo test --doc`
|
|
100
|
+
- **Assertions**: `assert!`, `assert_eq!`, `assert_ne!` with optional format messages
|
|
101
|
+
- **Async tests**: `#[tokio::test]` macro for async test functions
|
|
102
|
+
- **Snapshot testing**: `insta` crate with `assert_snapshot!` / `assert_debug_snapshot!`
|
|
103
|
+
- **Coverage**: `cargo llvm-cov` or `cargo tarpaulin`
|
|
104
|
+
- **Benchmarks**: `criterion` crate or built-in `#[bench]` (nightly)
|
|
105
|
+
|
|
106
|
+
## Common Frameworks
|
|
107
|
+
|
|
108
|
+
| Category | Options |
|
|
109
|
+
|----------|---------|
|
|
110
|
+
| Web (async) | axum, actix-web, rocket, warp |
|
|
111
|
+
| Serialization | serde, serde_json, serde_yaml, toml |
|
|
112
|
+
| Async runtime | tokio, async-std, smol |
|
|
113
|
+
| Database | sqlx, diesel, sea-orm |
|
|
114
|
+
| Migrations | sqlx-cli, diesel-cli, refinery |
|
|
115
|
+
| CLI | clap, argh, structopt (legacy) |
|
|
116
|
+
| Observability | tracing, tracing-subscriber, metrics |
|
|
117
|
+
| HTTP client | reqwest, hyper, ureq (blocking) |
|
|
118
|
+
| Middleware | tower, tower-http, actix middleware |
|
|
119
|
+
| Error handling | thiserror (library), anyhow (application), eyre |
|
|
120
|
+
|
|
121
|
+
## Example: Project-Level Override
|
|
122
|
+
|
|
123
|
+
Create `.claude/references/stack-decisions.md` in your project root:
|
|
124
|
+
|
|
125
|
+
```markdown
|
|
126
|
+
# Stack Decisions
|
|
127
|
+
|
|
128
|
+
## Runtime & Build
|
|
129
|
+
- Rust stable (edition 2021)
|
|
130
|
+
- Cargo workspace with crates/ directory
|
|
131
|
+
|
|
132
|
+
## Backend
|
|
133
|
+
- axum for HTTP framework
|
|
134
|
+
- sqlx with PostgreSQL (compile-time query checking)
|
|
135
|
+
- tokio as async runtime
|
|
136
|
+
|
|
137
|
+
## Serialization & Validation
|
|
138
|
+
- serde for serialization/deserialization
|
|
139
|
+
- Custom validation via trait implementations
|
|
140
|
+
|
|
141
|
+
## Testing
|
|
142
|
+
- Built-in #[test] with assert macros
|
|
143
|
+
- Integration tests in tests/ directory
|
|
144
|
+
- insta for snapshot testing
|
|
145
|
+
|
|
146
|
+
## Conventions
|
|
147
|
+
- thiserror for library error types, anyhow in binary
|
|
148
|
+
- tracing for structured logging
|
|
149
|
+
- cargo clippy must pass with no warnings
|
|
150
|
+
- All public APIs documented with /// and examples
|
|
151
|
+
```
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# TypeScript Stack Profile
|
|
2
|
+
|
|
3
|
+
Stack-specific guidance for TypeScript projects (Node.js/Bun, monorepo or single-package).
|
|
4
|
+
|
|
5
|
+
## Stack Identity
|
|
6
|
+
|
|
7
|
+
- **Language**: TypeScript
|
|
8
|
+
- **Runtime**: Node.js or Bun (check `package.json` `engines` field and lock files)
|
|
9
|
+
- **Package management**: npm, pnpm, yarn, or bun (check for respective lock files)
|
|
10
|
+
- **Common monorepo tools**: Turborepo (`turbo.json`), Nx (`nx.json`), Lerna (`lerna.json`)
|
|
11
|
+
|
|
12
|
+
## Discovery Checklist
|
|
13
|
+
|
|
14
|
+
When examining a TypeScript project, check for:
|
|
15
|
+
|
|
16
|
+
- **Runtime**: Bun or Node.js (check `package.json` for which)
|
|
17
|
+
- **Package management**: Check for `bun.lockb`, `pnpm-lock.yaml`, `package-lock.json`, or `yarn.lock`
|
|
18
|
+
- **Monorepo**: Check for `turbo.json` (Turborepo), `nx.json` (Nx), or `lerna.json` (Lerna)
|
|
19
|
+
- **Framework**: Check existing packages for Hono, Express, Fastify, etc.
|
|
20
|
+
- **Frontend**: Check for React, Vue, Svelte, etc.
|
|
21
|
+
- **Routing**: Check for TanStack Router, React Router, Next.js, etc.
|
|
22
|
+
- **Database**: Check for Drizzle, Prisma, TypeORM, etc.
|
|
23
|
+
- **Validation**: Check for Zod, Yup, io-ts, etc.
|
|
24
|
+
- **UI Components**: Check for shadcn/ui, Radix, MUI, etc.
|
|
25
|
+
- **Styling**: Check for Tailwind (v3 or v4), CSS Modules, styled-components, etc.
|
|
26
|
+
|
|
27
|
+
## Archetype Conventions
|
|
28
|
+
|
|
29
|
+
### 00-core-definitions.md (TypeScript)
|
|
30
|
+
|
|
31
|
+
- **Type aliases and union types**: Use `type` declarations for unions, intersections, utility types
|
|
32
|
+
- **Core interfaces**: Define with `interface` keyword, JSDoc on every field
|
|
33
|
+
- **Error class hierarchy**: Base error class extending `Error` with `code: string` property; domain-specific subclasses with typed properties
|
|
34
|
+
- **Constants and enums**: Use `const` declarations and `as const` assertions; prefer string union types over `enum`
|
|
35
|
+
- **Utility types**: Generic helpers like `Result<T, E>`, `Optional<T>`, etc.
|
|
36
|
+
- **Barrel exports**: Export everything from `src/index.ts`
|
|
37
|
+
|
|
38
|
+
### 01-architecture-layout.md (TypeScript)
|
|
39
|
+
|
|
40
|
+
- **Package.json**: `name`, `exports` map (subpath exports like `.`, `./server`, `./client`, `./react`), `dependencies`, `devDependencies`, `scripts`
|
|
41
|
+
- **tsconfig.json**: Key compiler options, extends root config
|
|
42
|
+
- **Barrel export structure**: What each `index.ts` re-exports
|
|
43
|
+
- **Build considerations**: Bundle vs unbundled, ESM vs CJS
|
|
44
|
+
|
|
45
|
+
### Monorepo conventions
|
|
46
|
+
|
|
47
|
+
- **Package naming**: `@repo/{name}` for shared packages, `@starter/{name}` for app-specific (adapt to project convention)
|
|
48
|
+
- **Internal dependencies**: Reference as `@repo/{package}` in `package.json`
|
|
49
|
+
- **Workspace protocol**: `"@repo/config": "workspace:*"` in pnpm, `"@repo/config": "*"` in bun
|
|
50
|
+
|
|
51
|
+
## Spec Quality Rules
|
|
52
|
+
|
|
53
|
+
- All TypeScript must be valid syntax — not pseudocode
|
|
54
|
+
- Include complete interfaces with generics where applicable
|
|
55
|
+
- Use discriminated unions for result types (e.g., `{ success: true; data: T } | { success: false; error: E }`)
|
|
56
|
+
- Every interface field must have JSDoc explaining its purpose
|
|
57
|
+
- Include explicit import paths in all code examples
|
|
58
|
+
- Use `async/await` for asynchronous operations (not raw Promises)
|
|
59
|
+
|
|
60
|
+
## Verification Specifics
|
|
61
|
+
|
|
62
|
+
- **Type checking**: `bun run typecheck`, `tsc --noEmit`, or `npx tsc --noEmit`
|
|
63
|
+
- **Barrel export validation**: Every `index.ts` re-exports what the spec says
|
|
64
|
+
- **Cross-package type checks**: `bun run typecheck` (or equivalent) passes for both the feature package AND packages that depend on it
|
|
65
|
+
- **Import path validation**: All import paths resolve correctly per the `exports` map in `package.json`
|
|
66
|
+
|
|
67
|
+
## Testing
|
|
68
|
+
|
|
69
|
+
- **Framework**: Vitest (most common in modern TS), Jest, or testing-library
|
|
70
|
+
- **Test file location**: Co-located (`*.test.ts` next to source) or in `__tests__/` directories
|
|
71
|
+
- **Fixture patterns**: Factory functions, test builders
|
|
72
|
+
- **Type testing**: `expectTypeOf` from vitest for type-level assertions
|
|
73
|
+
|
|
74
|
+
## Common Frameworks
|
|
75
|
+
|
|
76
|
+
| Category | Options |
|
|
77
|
+
|----------|---------|
|
|
78
|
+
| Backend | Hono, Express, Fastify, Koa |
|
|
79
|
+
| Frontend | React, Vue, Svelte, Solid |
|
|
80
|
+
| Routing | TanStack Router, React Router, Next.js App Router |
|
|
81
|
+
| Database | Drizzle, Prisma, TypeORM, Kysely |
|
|
82
|
+
| Validation | Zod, Valibot, Yup, io-ts |
|
|
83
|
+
| UI Components | shadcn/ui, Radix, MUI, Mantine |
|
|
84
|
+
| Styling | Tailwind CSS, CSS Modules, styled-components, vanilla-extract |
|
|
85
|
+
|
|
86
|
+
## Example: Project-Level Override
|
|
87
|
+
|
|
88
|
+
Create `.claude/references/stack-decisions.md` in your project root:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
# Stack Decisions
|
|
92
|
+
|
|
93
|
+
## Runtime & Build
|
|
94
|
+
- Bun 1.x for runtime and package management
|
|
95
|
+
- Turborepo for monorepo orchestration
|
|
96
|
+
|
|
97
|
+
## Backend
|
|
98
|
+
- Hono for HTTP framework
|
|
99
|
+
- Drizzle ORM with PostgreSQL
|
|
100
|
+
- Zod for runtime validation
|
|
101
|
+
|
|
102
|
+
## Frontend
|
|
103
|
+
- React 19 with TanStack Router (SPA-first)
|
|
104
|
+
- shadcn/ui component library
|
|
105
|
+
- Tailwind CSS v4 with oklch color theming
|
|
106
|
+
|
|
107
|
+
## Conventions
|
|
108
|
+
- Barrel exports from index.ts in every package
|
|
109
|
+
- Package naming: @repo/{name} for shared, @starter/{name} for app-specific
|
|
110
|
+
- Vitest for testing
|
|
111
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Vendor-Construct Inventory
|
|
2
|
+
|
|
3
|
+
> Feature: `forge-skill-spec-purity` (epic `agent-agnostic`, target repo **feature-forge**).
|
|
4
|
+
> Source of truth: `PRD.md` (v1) + `tech-spec.md` (v1).
|
|
5
|
+
> This file is the REQ-VND-03 audit output — the single, exhaustive record of every vendor-specific
|
|
6
|
+
> construct found across all 11 skills and their `references/`, each with exactly one disposition.
|
|
7
|
+
|
|
8
|
+
## Disposition Legend
|
|
9
|
+
|
|
10
|
+
Every disposition cell in the inventory below is exactly one member of the closed `Disposition`
|
|
11
|
+
vocabulary defined in `00-core-definitions.md` §8. No free-form values are permitted.
|
|
12
|
+
|
|
13
|
+
| Disposition | Meaning |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `relocated` | Moved to a spec-allowed location (e.g. `metadata`). |
|
|
16
|
+
| `removed` | Deleted from canon (none expected in this tree). |
|
|
17
|
+
| `preserved-as-spec-allowed` | Kept as-is; already spec-legal. |
|
|
18
|
+
| `out-of-canon` | Kept but documented as non-canonical (e.g. `hooks/hooks.json`). |
|
|
19
|
+
| `routed-through-resolver` | `${CLAUDE_PLUGIN_ROOT}` replaced by the bootstrap prelude + `scripts/forge-root.sh`. |
|
|
20
|
+
|
|
21
|
+
## Inventory
|
|
22
|
+
|
|
23
|
+
| Construct | Locations / count | Disposition | Rationale / notes |
|
|
24
|
+
|---|---|---|---|
|
|
25
|
+
| `argument-hint` (top-level frontmatter key) | 10 `skills/*/SKILL.md` (all skills **except** `forge-init`) | `relocated` | Claude-specific vendor key (constraint C-2). Moved verbatim to `metadata.argument-hint` per REQ-VND-01 (see `02-frontmatter-purity-and-inventory.md` §2). Value byte-identical; `description` untouched. |
|
|
26
|
+
| `${CLAUDE_PLUGIN_ROOT}` — canonical invocations + prose | 23 occurrences across 9 canonical surfaces: `skills/forge-0-epic/SKILL.md` (12), `skills/forge/SKILL.md` (3), `skills/forge-5-loop/SKILL.md` (1), `skills/forge-6-docs/SKILL.md` (1), `skills/forge-init/SKILL.md` (1), `skills/forge-verify/SKILL.md` (1), `skills/forge-verify/references/verification-checklists.md` (1), `references/shared-conventions.md` (2), `agents/forge-verifier.md` (1) | `routed-through-resolver` | Claude-only env var. Routed through the byte-identical bootstrap prelude + `scripts/forge-root.sh` per REQ-RES-03. Mechanics owned by `03-portable-root-resolver.md`; recorded here for audit completeness. |
|
|
27
|
+
| `${CLAUDE_PLUGIN_ROOT}` — sanctioned residual | 1 occurrence in `scripts/forge-root.sh` (env-fallback, REQ-RES-02 step 3) | `preserved-as-spec-allowed` | The single sanctioned residual: the resolver's documented Claude-compat fallback (REQ-RES-03 / REQ-RES-05). Exempt from the residual-var scan (`00-core-definitions.md` §6 `RESIDUAL_VAR_EXEMPT`). |
|
|
28
|
+
| `${CLAUDE_PLUGIN_ROOT}` — in `hooks/hooks.json` | 1 occurrence in `hooks/hooks.json` | `out-of-canon` | Non-canonical Claude artifact (REQ-VND-04). Not a canonical surface; exempt from the REQ-RES-03 scan. Left in place. |
|
|
29
|
+
| `hooks/hooks.json` SessionStart wiring | 1 file (`hooks/hooks.json`) — Claude `SessionStart` → `bash ${CLAUDE_PLUGIN_ROOT}/scripts/session-check.sh` | `out-of-canon` | Claude-specific plugin hook wiring (REQ-VND-04, decision D3). Preserved + documented so `forge-agent-adapters-build` treats it as a Claude artifact, not portable canon. |
|
|
30
|
+
| (contingency) any other vendor invocation directive | none found in the audit | — | REQ-VND-02 contingency did not fire (see Notes). If one is later surfaced, add a row with `removed` or `out-of-canon` per `02-frontmatter-purity-and-inventory.md` §3. |
|
|
31
|
+
|
|
32
|
+
## Notes
|
|
33
|
+
|
|
34
|
+
- **REQ-VND-02 contingency did not fire.** The exhaustive audit found **no** Codex / Copilot /
|
|
35
|
+
Cursor / Gemini invocation directive — and no other agent-specific run-this command block — in any
|
|
36
|
+
skill body or frontmatter. The only vendor constructs in scope across the suite are the three
|
|
37
|
+
recorded above: `argument-hint`, `${CLAUDE_PLUGIN_ROOT}`, and the `hooks/hooks.json` SessionStart
|
|
38
|
+
wiring. Treating REQ-VND-02 as a contingency rather than an action item is therefore correct.
|
|
39
|
+
- **`${CLAUDE_PLUGIN_ROOT}` relocation mechanics** — the prelude replacement, the resolver, and the
|
|
40
|
+
canonical-surface routing — are owned by `03-portable-root-resolver.md`; this file only records the
|
|
41
|
+
inventory dispositions.
|
|
42
|
+
- **The closed `Disposition` vocabulary** is defined in `00-core-definitions.md` §8; the legend above
|
|
43
|
+
reproduces it so this file is self-contained for a downstream reader.
|
|
44
|
+
- The two surviving `${CLAUDE_PLUGIN_ROOT}` instances (the `forge-root.sh` env fallback and the
|
|
45
|
+
`hooks/hooks.json` literal) are written here as descriptive text in code spans so they are not
|
|
46
|
+
routable invocations and do not trip the spec-purity checker's residual-var rule, consistent with
|
|
47
|
+
how `02-frontmatter-purity-and-inventory.md` §5 records them.
|
|
48
|
+
</content>
|
|
49
|
+
</invoke>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# scripts/forge-root.sh — the portable skill/plugin-root resolver
|
|
3
|
+
# (exposed contract: portable-skill-root-resolver; REQ-RES-01..05, REQ-SEC-01).
|
|
4
|
+
#
|
|
5
|
+
# Prints the absolute feature-forge plugin root to stdout and exits 0, or writes an
|
|
6
|
+
# actionable error to stderr and exits 1. Takes no arguments. Idempotent and
|
|
7
|
+
# side-effect-free: it NEVER sources or executes a discovered path — it only prints a
|
|
8
|
+
# directory (REQ-SEC-01). Resolution is bounded to the candidate roots below plus this
|
|
9
|
+
# script's own on-disk location.
|
|
10
|
+
#
|
|
11
|
+
# This file is copied VERBATIM into per-agent script mirrors by the downstream adapter
|
|
12
|
+
# generator (REQ-RES-05); keep it dependency-free beyond POSIX/Bash + the sentinel files.
|
|
13
|
+
set -euo pipefail
|
|
14
|
+
|
|
15
|
+
# Sentinel predicate (00-core-definitions.md §2 / SENTINEL_FILES). A directory is a valid
|
|
16
|
+
# plugin root iff BOTH sentinel files exist. Content-based, so it identifies a feature-forge
|
|
17
|
+
# install under ANY agent's directory layout.
|
|
18
|
+
is_root() { # $1 = candidate dir
|
|
19
|
+
[ -f "$1/scripts/epic-manifest.py" ] && [ -f "$1/.claude-plugin/plugin.json" ]
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
# ── Step 1: self-location — parent of this script's dir is the plugin root. ──────────────
|
|
23
|
+
self_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
24
|
+
root="$(cd -- "$self_dir/.." && pwd -P)"
|
|
25
|
+
if is_root "$root"; then
|
|
26
|
+
printf '%s\n' "$root"
|
|
27
|
+
exit 0
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# ── Step 2: candidate-root probe (authoritative multi-root list; extend here first). ─────
|
|
31
|
+
# Globs that match nothing expand to themselves; the is_root test rejects such literals.
|
|
32
|
+
for candidate in \
|
|
33
|
+
"$HOME/.claude/skills/feature-forge" \
|
|
34
|
+
"$HOME"/.claude/plugins/*/feature-forge \
|
|
35
|
+
; do
|
|
36
|
+
if is_root "$candidate"; then
|
|
37
|
+
printf '%s\n' "$candidate"
|
|
38
|
+
exit 0
|
|
39
|
+
fi
|
|
40
|
+
done
|
|
41
|
+
|
|
42
|
+
# ── Step 3: env fallback — the SINGLE sanctioned residual ${CLAUDE_PLUGIN_ROOT} (C-4). ───
|
|
43
|
+
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && is_root "$CLAUDE_PLUGIN_ROOT"; then
|
|
44
|
+
printf '%s\n' "$CLAUDE_PLUGIN_ROOT"
|
|
45
|
+
exit 0
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# ── Step 4: failure — actionable message to stderr, exit 1 (REQ-RES-04). ─────────────────
|
|
49
|
+
echo "feature-forge: cannot locate plugin root. Set CLAUDE_PLUGIN_ROOT or run from an installed skill dir." >&2
|
|
50
|
+
exit 1
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
# GENERATED — DO NOT EDIT. Source: skills/forge/SKILL.md. Regenerate: python3 scripts/build-adapters.py
|
|
3
|
+
name: forge
|
|
4
|
+
description: Feature-forge pipeline navigator and status dashboard. Use when the user references the forge pipeline, asks about forge status or progress, types /feature-forge:forge, or wants to check what stage a feature is at in the forge pipeline. Do NOT use for general feature requests, project status, or tasks unrelated to the forge development pipeline.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Feature Forge — Pipeline Navigator
|
|
8
|
+
|
|
9
|
+
You are the navigator for the feature-forge development pipeline. Your job is to orient the user: show where they are, what's been done, and what's next.
|
|
10
|
+
|
|
11
|
+
## Behavior
|
|
12
|
+
|
|
13
|
+
### 1. Read Configuration
|
|
14
|
+
|
|
15
|
+
Read and follow `references/shared-conventions.md` for configuration reading (feature name validation, config defaults, force mode).
|
|
16
|
+
|
|
17
|
+
For pipeline architecture details, read `references/process-overview.md`.
|
|
18
|
+
|
|
19
|
+
### 2. Determine Context
|
|
20
|
+
|
|
21
|
+
**If a feature name is provided** (e.g., `/feature-forge:forge auth`):
|
|
22
|
+
- **First test whether the name is an epic:** if `{specsDir}/{name}/epic-manifest.json` exists, render the **Epic Dashboard** (see format below) and stop — do not treat it as a feature.
|
|
23
|
+
- Otherwise, resolve the name via the **Feature Directory Resolution** block in `references/shared-conventions.md` (so a nested epic-member name finds its dashboard too). On a resolution failure (`not-found` / `ambiguous` at exit 1; `unsafe-name` or a path-containment escape at exit 2), surface it verbatim.
|
|
24
|
+
- On `not-found` for a never-started feature, ask: "No pipeline exists for '{feature}'. Want to start one? Run `/feature-forge:forge-1-prd {feature}` to begin."
|
|
25
|
+
- If resolution succeeds, display the per-feature pipeline status dashboard (see format below) from `{resolvedFeatureDir}/`.
|
|
26
|
+
|
|
27
|
+
**If no feature name is provided:** list in two tiers.
|
|
28
|
+
|
|
29
|
+
1. **Epics first.** Identify epic directories as any `{specsDir}/*/` that directly contains an `epic-manifest.json` **and no `.pipeline-state.json` of its own** (an epic root is never itself a feature). For each epic, run:
|
|
30
|
+
```bash
|
|
31
|
+
R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
|
|
32
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
33
|
+
python3 "$R/scripts/epic-manifest.py" render-status "{epic}" --specs-dir "{specsDir}" --json
|
|
34
|
+
```
|
|
35
|
+
and show one rollup line: `{epic} — {complete}/{total} complete, next: {nextCommand}`.
|
|
36
|
+
2. **Standalone features below.** Scan the remaining `{specsDir}/*/` that directly contain a `.pipeline-state.json` **without** an `epic` back-pointer. A nested member's `.pipeline-state.json` is **attributed to its epic (Tier 1), never listed as a standalone feature**.
|
|
37
|
+
- Within this standalone tier the existing logic still applies: if exactly one active (non-complete) standalone pipeline exists, show its dashboard; if multiple exist, list them with a one-line summary each and use `AskUserQuestion` to ask which to focus on.
|
|
38
|
+
|
|
39
|
+
If no epics and no standalone features exist, say: "No active feature pipelines found. Start one with `/feature-forge:forge-1-prd <feature-name>` or group several with `/feature-forge:forge-0-epic <epic-name>`."
|
|
40
|
+
|
|
41
|
+
The feature name must be a single kebab-case token. If the user provides multiple words (e.g., "user auth flow"), convert to kebab-case: `user-auth-flow`.
|
|
42
|
+
|
|
43
|
+
### 3. Pipeline Status Dashboard
|
|
44
|
+
|
|
45
|
+
Write pipeline state conforming to `references/pipeline-state-schema.json`.
|
|
46
|
+
|
|
47
|
+
Display a clear, scannable status for the feature:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Feature: {feature} [active]
|
|
51
|
+
Stage: {currentStage} ({status}, started {relative time})
|
|
52
|
+
|
|
53
|
+
✅ forge-1-prd → PRD.md (v{n})
|
|
54
|
+
⬜ forge-verify (prd) ← show only if forge-1-prd is complete
|
|
55
|
+
✅ forge-2-tech → tech-spec.md (v{n}, ⚠️ not yet verified)
|
|
56
|
+
⬜ forge-verify (tech) ← show only if forge-2-tech is complete
|
|
57
|
+
🔄 forge-3-specs → in progress
|
|
58
|
+
⬜ forge-verify (specs) ← show only if forge-3-specs is complete
|
|
59
|
+
⬜ forge-4-backlog
|
|
60
|
+
⬜ forge-verify (backlog) ← show only if forge-4-backlog is complete
|
|
61
|
+
⬜ forge-5-loop
|
|
62
|
+
⬜ forge-6-docs
|
|
63
|
+
|
|
64
|
+
Next: Continue with /feature-forge:forge-3-specs {feature}
|
|
65
|
+
Or verify tech-spec with /feature-forge:forge-verify {feature}
|
|
66
|
+
|
|
67
|
+
Notes: "{any persisted notes}"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Use these status indicators:
|
|
71
|
+
- ✅ = complete
|
|
72
|
+
- ✅⚠️ = complete but not yet verified
|
|
73
|
+
- 🔄 = in progress
|
|
74
|
+
- ⬜ = pending
|
|
75
|
+
- ❌ = verification found issues (not yet fixed)
|
|
76
|
+
- ✅🔍 = verified and fixes applied
|
|
77
|
+
- ⏭️ = verification skipped (user chose to proceed without verifying)
|
|
78
|
+
- ⚠️ = stale (built against an older version of an upstream artifact)
|
|
79
|
+
|
|
80
|
+
### Epic Dashboard
|
|
81
|
+
|
|
82
|
+
When the named argument is an epic (`{specsDir}/{name}/epic-manifest.json` exists), render the epic dashboard instead of a per-feature one. Run:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
|
|
86
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
87
|
+
python3 "$R/scripts/epic-manifest.py" render-status "{epic}" --specs-dir "{specsDir}" --json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
and render from its output:
|
|
91
|
+
|
|
92
|
+
- **Epic header:** name + `status` (active | paused | abandoned | complete).
|
|
93
|
+
- **Dependency graph:** each feature with its `dependsOn`, as an arrow list or indented tree (the helper guarantees the graph is acyclic).
|
|
94
|
+
- **Per-feature rows:** reuse the **existing status indicators** below (✅/✅⚠️/🔄/⬜/❌/✅🔍/⏭️/⚠️), driven by each feature's derived `stage`/`status`. Mark `blocked` features and list their `unmetDeps`.
|
|
95
|
+
- **Actionable vs blocked:** list the `actionable` set and the recommended `nextCommand`.
|
|
96
|
+
- **Rollup:** `{complete}/{total} features complete`.
|
|
97
|
+
|
|
98
|
+
Example:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
Epic: auth-overhaul [active] — 2/4 features complete
|
|
102
|
+
|
|
103
|
+
Dependency graph:
|
|
104
|
+
config-store (no deps)
|
|
105
|
+
token-service → config-store
|
|
106
|
+
api-gateway → token-service
|
|
107
|
+
audit-log (no deps)
|
|
108
|
+
|
|
109
|
+
✅ config-store complete
|
|
110
|
+
🔄 token-service forge-3-specs (in progress)
|
|
111
|
+
⬜ api-gateway blocked — waiting on token-service
|
|
112
|
+
✅ audit-log complete
|
|
113
|
+
|
|
114
|
+
Actionable now: token-service
|
|
115
|
+
Next: /feature-forge:forge-3-specs token-service
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
All of this is reconstructed **purely from disk** — the manifest plus each member's `.pipeline-state.json`, with no in-memory state — so a fresh session renders the same dashboard. If `render-status` fails, do not render a partial dashboard; surface per the exit-1/exit-2 split in the **Feature Directory Resolution** block of `references/shared-conventions.md` (exit 1 → parse `{findings[]}` from stdout; exit 2 → surface the plain `Error:` stderr line verbatim).
|
|
119
|
+
|
|
120
|
+
### 4. Notes Management
|
|
121
|
+
|
|
122
|
+
If the user says something like "note: switching to jose for JWT" or "remember: we decided X", update the `notes` field in `.pipeline-state.json`. This helps preserve context across session clears.
|
|
123
|
+
|
|
124
|
+
### 5. Available Commands Reference
|
|
125
|
+
|
|
126
|
+
When showing the dashboard, include a compact reference:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
Commands:
|
|
130
|
+
/feature-forge:forge-1-prd <feature> Create requirements document
|
|
131
|
+
/feature-forge:forge-2-tech <feature> Create technical spec
|
|
132
|
+
/feature-forge:forge-3-specs <feature> Create implementation specs
|
|
133
|
+
/feature-forge:forge-4-backlog <feature> Generate rauf backlog
|
|
134
|
+
/feature-forge:forge-5-loop <feature> Run rauf autonomous loop
|
|
135
|
+
/feature-forge:forge-6-docs <feature> Generate architecture docs
|
|
136
|
+
/feature-forge:forge-verify <feature> Run verification on current stage
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 6. Pipeline Lifecycle Commands
|
|
140
|
+
|
|
141
|
+
Support these sub-commands for pipeline lifecycle management:
|
|
142
|
+
- `/feature-forge:forge pause {feature}` — Set `pipelineStatus` to `"paused"`. Do NOT modify `currentStage` or any stage statuses. The pipeline freezes exactly as-is. Show a confirmation.
|
|
143
|
+
- `/feature-forge:forge resume {feature}` — Set `pipelineStatus` back to `"active"`. Calculate how long the feature was paused (from `updatedAt` to now). If paused for more than 24 hours, show a hint: "This feature was paused for {duration}. Session context may have been lost — consider re-running `/feature-forge:forge-{currentStage} {feature}` to rebuild context."
|
|
144
|
+
- `/feature-forge:forge abandon {feature}` — Set `pipelineStatus` to `"abandoned"`. Use `AskUserQuestion` to confirm with user first. Note: abandoned pipelines can be resumed with `/feature-forge:forge resume {feature}` if the user changes their mind.
|
|
145
|
+
|
|
146
|
+
**Epic lifecycle.** When the argument names an **epic** (`{specsDir}/{name}/epic-manifest.json` exists), `pause` / `resume` / `abandon` operate on the epic manifest, not a `.pipeline-state.json`:
|
|
147
|
+
|
|
148
|
+
- Set the manifest's top-level `status` (`paused` / `active` / `abandoned`) via the helper's `set-status` mutator — an atomic write that also bumps `updatedAt`:
|
|
149
|
+
```bash
|
|
150
|
+
R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
|
|
151
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
152
|
+
python3 "$R/scripts/epic-manifest.py" set-status "{epic}" --status paused --specs-dir "{specsDir}"
|
|
153
|
+
```
|
|
154
|
+
For `complete`, do **not** set the status directly — completion is *derived* from member states (the rollup), so the manifest `status` is a lifecycle flag, never a completion signal.
|
|
155
|
+
- **Member feature states are NOT silently mutated.** Pausing/abandoning the epic changes only the manifest `status`. Before doing so, use `AskUserQuestion` to make the relationship explicit: "Pausing the epic does not pause its in-flight member features. {N} members are active. Pause the epic only, or also pause each member?" If the user opts to pause members too, update each member's own `pipelineStatus` **individually and visibly** (one explicit action per member), never as a hidden side-effect.
|
|
156
|
+
- Commit the change via the Git Commit Protocol, staging `{specsDir}/{epic}/`.
|
|
157
|
+
|
|
158
|
+
When listing features, show active pipelines by default. Include a count of paused/abandoned: "3 active pipelines (1 paused, 1 abandoned — use `/feature-forge:forge list all` to see them)."
|
|
159
|
+
|
|
160
|
+
## Gotchas
|
|
161
|
+
|
|
162
|
+
- Never modify any spec files, backlog files, or pipeline state beyond the `notes`, `updatedAt`, and `pipelineStatus` fields. The navigator is read-only except for notes and lifecycle commands.
|
|
163
|
+
- If a user asks to "continue" or "pick up where I left off" without naming a feature, check for active pipelines before asking. Only ask if ambiguous.
|
|
164
|
+
- The pipeline state file is the source of truth. Don't infer stage from the existence of files alone — a file might exist from a previous incomplete run.
|