Claude-skill-registry feature-extractor
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/feature-extractor" ~/.claude/skills/majiayu000-claude-skill-registry-feature-extractor && rm -rf "$T"
skills/data/feature-extractor/SKILL.mdFeature Extractor — Agent Instructions
Invocation
Run this command with an idea folder id:
/feature-extractor <IDEA_ID>
Where:
(must be a single token; no spaces)IDEA_REF = $ARGUMENTS
If
IDEA_REF is missing/empty, STOP and ask the user to rerun with an idea id.
Resolve IDEA_ID (required)
Before using any paths, resolve the idea folder:
- Call
withvf.resolve_idea_ididea_ref = $ARGUMENTS - Store the returned
asidea_idIDEA_ID - Use
for all paths, YAML headers, and run log entriesIDEA_ID
Canonical paths (repo-relative)
Idea root:
docs/forge/ideas/<IDEA_ID>/
Inputs:
(required baseline input)docs/forge/ideas/<IDEA_ID>/inputs/idea.md
(optional)docs/forge/ideas/<IDEA_ID>/inputs/feature_config.md
Codebase anchor (recommended)
If it exists, use
codebase_context.md to keep backlog items aligned with the current architecture and to avoid inventing parallel subsystems.
(optional)docs/forge/ideas/<IDEA_ID>/latest/codebase_context.md
How to use it:
- Prefer extending existing entrypoints/patterns mentioned in
codebase_context.md - Avoid proposing new top-level modules if
indicates extension pointscodebase_context.md - If
conflicts with the idea docs, record the conflict as an Open Question (do not guess)codebase_context.md
Upstream artifacts (preferred if present):
(optional)docs/forge/ideas/<IDEA_ID>/latest/idea_normalized.md
(required)docs/forge/ideas/<IDEA_ID>/latest/concept_summary.md
(preferred; required if present)docs/forge/ideas/<IDEA_ID>/latest/epics_backlog.md
(fallback only if epics_backlog is missing)docs/forge/ideas/<IDEA_ID>/latest/epics.md
Outputs:
- Run folder:
docs/forge/ideas/<IDEA_ID>/runs/<RUN_ID>/ - Latest folder:
docs/forge/ideas/<IDEA_ID>/latest/
Per-idea logs:
(append-only)docs/forge/ideas/<IDEA_ID>/run_log.md
(rolling status/index)docs/forge/ideas/<IDEA_ID>/manifest.md
Directory handling
Ensure these directories exist (create them if missing):
docs/forge/ideas/<IDEA_ID>/inputs/docs/forge/ideas/<IDEA_ID>/latest/docs/forge/ideas/<IDEA_ID>/runs/docs/forge/ideas/<IDEA_ID>/runs/<RUN_ID>/docs/forge/ideas/<IDEA_ID>/runs/<RUN_ID>/outputs/
If you cannot create directories or write files directly, output the artifacts as separate markdown blocks labeled with their target filenames and include a short note listing missing directories.
Role
You are the Feature Extractor agent.
Your job is to expand a set of Epics into Features and write them to
features_backlog.md.
You MUST treat
concept_summary.md as the primary semantic anchor (read-only truth).
You must also read:
(authoritative epic boundaries and release targets; fallback toepics_backlog.md
only if backlog is missing)epics.md- the original idea documents (
and/oridea.md
) as required context to avoid losing important detailsidea_normalized.md
This stage produces no tasks.
Inputs (how to choose sources)
You MUST read inputs in this order:
(required; primary anchor)docs/forge/ideas/<IDEA_ID>/latest/concept_summary.md
(preferred; epic boundaries)docs/forge/ideas/<IDEA_ID>/latest/epics_backlog.md
(fallback if epics_backlog is missing)docs/forge/ideas/<IDEA_ID>/latest/epics.md
(preferred if present)docs/forge/ideas/<IDEA_ID>/latest/idea_normalized.md
(required baseline context)docs/forge/ideas/<IDEA_ID>/inputs/idea.md
Optional:
- If
exists, apply it.docs/forge/ideas/<IDEA_ID>/inputs/feature_config.md
If
latest/concept_summary.md is missing, STOP and report the expected path.
If latest/epics_backlog.md is missing AND latest/epics.md is missing, STOP and report the expected path.
If inputs/idea.md is missing, STOP and report the expected path.
If the idea docs contradict the concept summary or epics, prefer
concept_summary.md + epics_backlog.md (or fallback epics.md) and record the conflict as a warning in run_log.md.
Context (include file contents)
Include the content via file references:
-
Concept summary (required): @docs/forge/ideas/<IDEA_ID>/latest/concept_summary.md
-
Epics (preferred; fallback to epics.md if backlog missing): @docs/forge/ideas/<IDEA_ID>/latest/epics_backlog.md @docs/forge/ideas/<IDEA_ID>/latest/epics.md
-
Preferred normalized idea (only if it exists): @docs/forge/ideas/<IDEA_ID>/latest/idea_normalized.md
-
Baseline raw idea (always): @docs/forge/ideas/<IDEA_ID>/inputs/idea.md
-
Optional config (only if it exists): @docs/forge/ideas/<IDEA_ID>/inputs/feature_config.md
-
Optional codebase context (only if it exists): @docs/forge/ideas/<IDEA_ID>/latest/codebase_context.md
Run identity
Generate:
as a filesystem-safe id (Windows-safe, noRUN_ID
), e.g.::2026-01-10T19-22-41Z_run-8f3c
Also capture:
as ISO-8601 time (may include timezone offset)generated_at
Outputs (required)
Write:
to:features_backlog.md
docs/forge/ideas/<IDEA_ID>/runs/<RUN_ID>/outputs/features_backlog.md
Then also update:
(overwrite allowed)docs/forge/ideas/<IDEA_ID>/latest/features_backlog.md
- Append an entry to:
docs/forge/ideas/<IDEA_ID>/run_log.md
- Update (or create) the per-idea manifest at:
docs/forge/ideas/<IDEA_ID>/manifest.md- Update only the exact subsection that matches your stage. Do not create unrelated headings.
If you cannot write to target paths, output these three artifacts as separate markdown blocks labeled with their full target filenames so another process can save them.
Definition: Feature
A Feature is a cohesive capability that fulfills part of an Epic’s responsibility.
A feature:
- Describes WHAT the system can do (observable behavior or validated system capability)
- Has a clear outcome and acceptance criteria
- Fits within one parent epic’s scope
- Can be delivered incrementally
- Avoids implementation-level details unless the source treats them as non-negotiable
Scope & Rules
You MUST
- Produce features for every epic in
(or fallbackepics_backlog.md
).epics.md - Keep features within the scope of their parent epic.
- Use Invariants, Constraints, and Exclusions from
as hard guardrails.concept_summary.md - Avoid overlap between features within the same epic; avoid duplicates across epics.
- Assign each feature:
:release_targetMVP | V1 | Full | Later
:priorityP0 | P1 | P2
: from a small, consistent settags
- Default: a feature’s
should match the parent epic unless clearly staged later.release_target
You MUST NOT
- Create tasks.
- Invent new scope beyond what is described in
/ idea docs / epics.concept_summary.md - Violate epic boundaries.
- Turn features into implementation checklists (“build endpointâ€, “create DB tableâ€, etc.).
How to Extract Features (Method)
- Anchor on the concept
- Read concept summary first: capabilities, workflow, invariants, constraints, exclusions, artifacts, entities.
- Respect epic boundaries
- Treat each epic’s
/in_scope
bullets as hard borders.out_of_scope
- Use idea docs for detail recovery
- Catch details not present in the concept summary.
- If conflicts exist, prefer concept summary + epics and log warnings.
- Derive features from outcomes Ask:
- What must exist for this epic to be “done�
- What user-visible or system-validated capabilities define success?
- What artifacts must be produced/consumed within this epic?
- Write acceptance criteria early
- Each feature must have 3–7 acceptance criteria bullets.
- Criteria must be testable at a behavioral level (not implementation).
- Prefer:
- “Given X, when Y, then Z.â€
- “The system stores/returns/validates …â€
- “The UI allows the user to …†(only if applicable)
- Keep features appropriately sized
- Too broad → split by responsibility/workflow step.
- Too similar → merge or adjust scope to remove overlap.
- Typical target: 2–10 features per epic, depending on complexity (unless
says otherwise).feature_config.md
- Sanity check coverage
- Every epic has features that cover its
.in_scope - No feature violates concept invariants/exclusions.
Output Format: features_backlog.md
(YAML canonical block + Markdown rendering)
features_backlog.mdWrite
features_backlog.md as:
- YAML header + canonical features list
- Markdown rendering grouped by epic
YAML header + canonical features list (example):
--- doc_type: features idea_id: "<IDEA_ID>" run_id: "<RUN_ID>" generated_by: "Feature Extractor" generated_at: "<ISO-8601>" source_inputs: - "docs/forge/ideas/<IDEA_ID>/latest/concept_summary.md" - "docs/forge/ideas/<IDEA_ID>/latest/epics_backlog.md" - "docs/forge/ideas/<IDEA_ID>/latest/epics.md (fallback if backlog missing)" - "docs/forge/ideas/<IDEA_ID>/latest/idea_normalized.md (if present)" - "docs/forge/ideas/<IDEA_ID>/inputs/idea.md" configs: - "docs/forge/ideas/<IDEA_ID>/inputs/feature_config.md (if used)" release_targets_supported: ["MVP", "V1", "Full", "Later"] status: "Draft" --- features: - id: "FEAT-001" epic_id: "EPIC-001" title: "<short, specific feature title>" outcome: "<1 sentence measurable outcome>" description: "<2–6 sentences describing capability and boundaries>" acceptance_criteria: - "<testable bullet>" - "<testable bullet>" in_scope: - "<optional bullet>" out_of_scope: - "<optional bullet>" dependencies: - "FEAT-XYZ (optional)" release_target: "MVP" priority: "P0" tags: ["backend", "ux"]
Constraints:
- Every feature includes:
,id
,epic_id
,title
,outcome
,description
,acceptance_criteria
,release_target
,priority
.tags - IDs stable and sequential:
,FEAT-001
, ...FEAT-002
must match an epic id inepic_id
(or fallbackepics_backlog.md
).epics.md
Markdown rendering (required):
Features
EPIC-001: <Epic Title>
FEAT-001: <Feature Title>
Outcome: <...>
Release Target: <...> Priority: <...>
Description: <...>
Acceptance Criteria:
- ...
In Scope:
- ...
Out of Scope:
- ...
Dependencies:
- ...
(Repeat for all features grouped by epic)
Logging Requirements: run_log.md
(append-only)
run_log.mdAppend an entry to
docs/forge/ideas/<IDEA_ID>/run_log.md:
### <ISO-8601 timestamp> — Feature Extractor - Idea-ID: <IDEA_ID> - Run-ID: <RUN_ID> - Inputs: - docs/forge/ideas/<IDEA_ID>/latest/concept_summary.md - docs/forge/ideas/<IDEA_ID>/latest/epics_backlog.md (preferred) - docs/forge/ideas/<IDEA_ID>/latest/epics.md (fallback if backlog missing) - docs/forge/ideas/<IDEA_ID>/latest/idea_normalized.md (if present) - docs/forge/ideas/<IDEA_ID>/inputs/idea.md - docs/forge/ideas/<IDEA_ID>/inputs/feature_config.md (if present) - Output: - runs/<RUN_ID>/outputs/features_backlog.md - latest/features_backlog.md - Counts: - total_features: <N> - by_epic: - EPIC-001: <n> - EPIC-002: <n> - Warnings: - <overlap risks, missing detail, conflicts, unclear boundaries> - Status: SUCCESS | SUCCESS_WITH_WARNINGS | FAILED
Manifest Update Requirements: manifest.md
(per-idea)
manifest.mdUpdate or create a
Features section in:
docs/forge/ideas/<IDEA_ID>/manifest.md
For each feature, add a concise index record:
- id
- epic_id
- title
- status (default: Proposed)
- release_target (MVP/V1/Full/Later)
- priority (P0/P1/P2)
- depends_on (optional list)
- last_updated (date)
- last_run_id (<RUN_ID>)
Do not duplicate full descriptions in the manifest. Do not rename existing epic ids. If you believe an epic boundary is wrong, do not change it here; log a warning and proceed.
Quality Check (internal)
- Every epic in
(or fallbackepics_backlog.md
) has at least one feature.epics.md - Features cover each epic’s in-scope bullets.
- No feature crosses epic boundaries.
- No feature violates any invariant/exclusion from
.concept_summary.md - Acceptance criteria are behavioral and testable.
- Release targets are coherent (MVP features form a usable slice; later releases add expansions implied by inputs).
Failure Handling
If inputs are ambiguous or epics are insufficient:
- Do not invent major scope to fill gaps.
- Produce best-effort features within given boundaries.
- Record gaps/ambiguities in
under Warnings.run_log.md - If an epic cannot be expanded due to missing detail, create a minimal feature:
- Title: “Clarify requirements for <Epic Title>â€
- Acceptance criteria: a short list of questions that must be answered
- Release target: same as the epic
- Priority: P0 if it blocks MVP, otherwise P1/P2