plan-index
Generate plans/INDEX.md -- a DERIVED feature register + cross-feature dependency DAG + topological build-order tiers + cycle/orphan detection -- by harvesting each feature overview's `relationships:` frontmatter. The frontmatter is the single source of truth; the index is regenerated, never hand-synced. Use to (re)build or refresh a plans portfolio index after adding/changing features, to see the build order, or to find dependency cycles and orphaned features. TRIGGER: 'generate the plan index', 'rebuild plans/INDEX.md', 'show the feature dependency graph', 'what is the build order', 'find plan cycles/orphans'. Pairs with goalforge-archive's reference-gate (idea: goalforge-plan-index-and-portfolio-housekeeping).
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- plan-index
- hooks
- { "Stop": [ { "hooks": null } ] }
- metadata
- { "version": "1.0.0", "skill-kind": "preference" }
- description
- Generate plans/INDEX.md -- a DERIVED feature register + cross-feature dependency DAG + topological build-order tiers + cycle/orphan detection -- by harvesting each feature overview's `relationships:` frontmatter. The frontmatter is the single source of truth; the index is regenerated, never hand-synced. Use to (re)build or refresh a plans portfolio index after adding/changing features, to see the build order, or to find dependency cycles and orphaned features. TRIGGER: 'generate the plan index', 'rebuild plans/INDEX.md', 'show the feature dependency graph', 'what is the build order', 'find plan cycles/orphans'. Pairs with goalforge-archive's reference-gate (idea: goalforge-plan-index-and-portfolio-housekeeping).
02 资源文件 1
- 脚本evals/run.sh6.4 KB
03 SKILL.md 正文
goalforge-plan-index
Derives plans/INDEX.md from feature-overview frontmatter so the portfolio index
and the per-feature relationships: edges never drift apart. The index is a build
artifact -- regenerate it; do not hand-edit it.
Scope: this is feature-level portfolio navigation, regenerated on demand — it is not part of the per-WP execute → verify → commit loop and never gates a transition. It answers "what features exist, in what build order, with which cross-feature dependencies", orthogonal to a WP's goal/verify/commit cycle.
Mechanical core
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/goalforge-plan-index.py \
[--plans-root <root>] [--include-archived] [-o <file|->]
- Plans root resolves like the rest of the SDD chain:
--plans-root-> envSDD_PLANS_DIR-> git-rootplans/-> CWDplans/->~/.claude/plans/. - Output: default writes
<PLANS_ROOT>/INDEX.md— which project-track-sweep'sbackfill_wps.pyalso generates (see the header line in an existing INDEX.md); pass-oto avoid clobbering a sweep-generated index.-o -streams to stdout (preview without touching disk);-o <file>writes elsewhere. --include-archivedis render-only: it folds_archived/features in asstatus: archivedrows/tier slots. Archived features are always loaded for edge RESOLUTION regardless of the flag (see "Archived features" below).
What it derives
- Feature register -- one row per
<feature>/overview.md: feature,status, and the features it depends on (precede it). - Dependency DAG -- each
relationships:edge normalized to a forward edge (A -> B means A precedes B):B follows AandB depends_on A=>A -> BA enables B=>A -> Bpart_ofis a grouping note, not a build-order edge.
- Build-order tiers -- a Kahn topological layering (Tier 0 = no unmet deps).
- Cycle detection -- features that cannot be ordered are listed under a WARNING; the script exits 4.
- Orphans -- features with no edges in or out (often a sign their
relationships:frontmatter is unfilled, not that they are truly independent). - Dangling edges -- edges whose target resolves to neither a live nor an archived feature, listed with the missing endpoint (never dropped silently).
Archived features
Archived features are always loaded as resolvable nodes, keyed on directory
existence under _archived/ (overview.md is optional -- legacy archived
features predate it); non-directory entries are ignored. A live feature always
wins over an archived homonym. Consequences:
- An edge into the archive resolves and shows in the register as
<dep> (archived)-- an archived dependency is completed, not missing. - A feature whose only dependency is archived is not an orphan.
- What remains unresolved is a real defect and surfaces under Dangling edges.
Consumer contract: ../references/archive-contract.md.
Exit codes
0 clean DAG written | 2 plans root missing | 3 no features found |
4 cycle detected (index still written, with the cycle WARNING).
Source of truth
The relationships: frontmatter (schema: ${CLAUDE_PLUGIN_ROOT}/references/schema.md)
is canonical. If the generated index is wrong, fix the frontmatter, then
regenerate -- never patch INDEX.md by hand. An unexpected orphan means a feature's
edges are missing from its overview.
Gotchas
- The index is DERIVED -- never hand-edit. A hand edit is overwritten on the
next run and silently diverges from the frontmatter in the meantime. Fix the
overview's
relationships:and regenerate. - An orphan is usually a missing edge, not independence. The framework's
viz-service-api/viz-desktop-appshowed as orphans because theirrelationships:frontmatter was thinner than the hand-written index -- the generator surfaces the gap rather than inventing the edge. enablesis inverted on purpose.A enables BbecomesA -> B(A precedes B), the same direction asB depends_on A. Do not also add thedepends_onon B -- one direction per edge, or the DAG double-counts (harmless to tiers, noisy in the register).- A cycle still writes the index (exit 4) so you can see the offending nodes; it does not silently refuse.
- gitignored plans roots are fine -- the generator reads the filesystem, never
git, so an ignored
plans/(e.g. the parent app repo) indexes normally.
04 同仓库更多 Skills
wayfind
goalforge-internal — use entry commands; do not auto-trigger Chart a foggy, multi-session effort into a decision map BEFORE goalforge-capture — when the work is too big to spec yet, spans multiple sessions, and needs a decision map before anyone can write a real spec. Triggers: "chart this foggy effort", "multi-session decision map", "too big to spec yet", "map the unknowns before we plan". Establishes <PLANS_ROOT>/<effort>/wayfind/ (map.md pointer-index + one-decision-per-ticket files), drives a frontier-computed work loop across sessions, and graduates the converged map into goalforge-capture. SKIP when the effort is one session and already clear — a single well-understood feature goes straight to goalforge-capture with no map. SKIP for a bounded one-off edit, and for anything already past spec (that is the SDD chain, not wayfind).
verify
goalforge-internal — use entry commands; do not auto-trigger Verify a work package at `status: implemented`: gate A deterministic (lint, typecheck, verification.command, diff ⊆ owned_files), gate B one fresh-context review of the WP diff, gate C goal judge plus one second opinion. Advances `implemented → verified` — the sole authority for that edge. TRIGGER: /verify <wp-path>, or when the chain reaches the verify step.
spec
goalforge-internal — use entry commands; do not auto-trigger Run a design pass on a captured feature and propose the spec document, or propose a revision of an approved spec when a learning falsifies it (the respec edge). Reads plans/<feature>/overview.md, optionally invokes personas or architect for a multi-lens review, writes plans/<feature>/spec.md from the feature-spec template as the proposal (draft → spec), and ratifies it on spec → ready. HUMAN-GATED: spec → ready needs explicit user approval. Trigger: the user asks to spec, design, or elaborate on a feature that already has an overview.md (status: draft), or a feature sits at status: spec with a proposal awaiting ratification.
run
goalforge-internal — use entry commands; do not auto-trigger Chain driver for the goalforge stages: capture → spec → decompose → harden → execute → verify. Reads the target's on-disk `status:` and enters the one step that status admits; supports --dry-run. Use it to drive a feature end-to-end; for a single stage, use the entry command for that stage.
redecompose
goalforge-internal — use entry commands; do not auto-trigger Reconcile a proposed re-decomposition against a partially-executed feature's verified WPs. Calls goalforge-reconcile-diff.sh to produce a 5-bucket diff, then routes: same → untouched (no-op), changed+new → status: spec and onto the harden frontier via goalforge-transition.sh, dropped-verified → supersede in place (ledger row, never delete), ambiguous (slug changed, goal matches a verified WP) → judgment/human — never auto-rename or auto-supersede. Logs goal mutations via goalforge-goal-changelog.sh. Idempotent: re-run on unchanged decomposition is a byte-identical no-op. TRIGGER: /goalforge-redecompose <feature-dir> --learning '<text>' or when goalforge-run loops back on a learning event.
prototype
goalforge-internal — use entry commands; do not auto-trigger Throwaway spike answering exactly ONE design question with runnable code — logic branch (pure logic module + interactive terminal harness, LOGIC.md), UI branch (several radically different variations, UI.md), or perf branch (benchmark study of rival implementations with a scaling curve, PERF.md). Keep the answer, delete the code. Use when an open question is of kind "how should it behave / which approach wins / how should it look / is it fast enough, does it scale, is the optimization worth it" and more interviewing or reading will not settle it — a spike will. Entry points: handoff mode `prototype` (cross-session dispatch seam), goalforge-harden open-question routing, idea-refine, or the user saying "spike this" / "quick prototype to check" / "benchmark this". Refuses to start without a single question AND explicit success criteria.