AGENT SKILL

new-feature

Orchestrates full feature development workflow from discovery through commit. Infers scope (small/medium/large) from the feature description and adapts phases accordingly. Auto-invokes ISA at E3+ and hands off to /create-pr for shipping (its Step 3.7 pre-flight reviews the diff before push). Use when the user wants to add any new feature, capability, or functionality — regardless of size. NOT FOR draining a forge-registry epic (use /run-epic).

License 许可
MIT
最近更新
2026-10-23
Stars
★ 0
Forks
0

01 前言 Front Matter

name
new-feature
description
Orchestrates full feature development workflow from discovery through commit. Infers scope (small/medium/large) from the feature description and adapts phases accordingly. Auto-invokes ISA at E3+ and hands off to /create-pr for shipping (its Step 3.7 pre-flight reviews the diff before push). Use when the user wants to add any new feature, capability, or functionality — regardless of size. NOT FOR draining a forge-registry epic (use /run-epic).

02 资源文件 1

03 SKILL.md 正文

New Feature Workflow

Index

File or section Read when…
PHASES.md Step 2 — before each phase: its instructions and the concrete Task(subagent_type=…) blocks at each invocation point (Discovery, Design, Planning, Implementation, Verification, Review, Doc Update, Commit)
_shared/task-triage.md Review phase — filing a finding instead of fixing it
Step 0 · Step 1 · Step 3 · Step 4 · Key Rules (below) Every run — surface map, scope, checkpoints, PR hand-off
_shared/orchestrated-development.md Step 1 — the subagent-driven development question; Implementation → Review when the answer is yes
_shared/domain-docs.md Discovery — read the glossary + ADRs in the area; name things in the glossary's terms, flag ADR conflicts

Invocation

User runs: /new-feature <description>

Example: /new-feature add user preference settings to the portal

Step 0: Map the surface

Read docs/code-map.md (auto-regenerated each SessionStart). Knowing which modules and classes already exist prevents proposing a feature that mostly already exists, and surfaces the right insertion points so new code doesn't duplicate existing capability. If the map is missing, run /audit-code-map.

Before proposing new code with a specific class or function name, check the forge-code-map MCP tools so the feature doesn't collide with something already shipping:

  • find_definition("ProposedClassName") → if a class with that name exists, surface it in the proposal: extend or rename rather than duplicate.
  • language_stats() → confirms the language mix and scale of the codebase you're adding to (cheap orientation in fresh sessions).
  • dry_hotspots() → if the feature touches a domain that already has DRY duplication, flag it in the proposal — the feature is a chance to consolidate.

If the MCP server isn't registered, run /audit-code-map --emit-json and follow mcp-servers/code-map/README.md. Fall back to Grep + the markdown map otherwise.

Step 1: Analyze and Propose

  1. Infer scope — small: one domain, 1-3 files, no schema/API surface change; medium: crosses one boundary (UI↔API or API↔data) or adds API surface; large: crosses two or more boundaries, touches schema, or changes auth/money paths. When in doubt, pick the larger scope.
  2. Present the feature, the inferred scope, and the recommended phases; get approval before building. In the same approval ask the subagent-driven development question (_shared/orchestrated-development.md; default yes).

Step 2: Execute Phases

Run each phase sequentially. See PHASES.md for detailed instructions.

Scope Phases
Small Discovery → Planning → Implementation → Verification → Commit → PR (/create-pr)
Medium Discovery → Design → Planning → Implementation → Verification → Review → Doc Update → Commit → PR (/create-pr)
Large All phases with deeper analysis, ending in PR (/create-pr)

Agent + Skill Routing Reference

Phase Invocation Condition Purpose
Design @architect (Task) Medium/Large Architecture decisions, ADRs
Implementation @security-boss (Task) Security features Threat-model + security review
Verification @quality-engineer (Task) UI/user flows E2E test execution
Review @quality-engineer (Task) Medium/Large Code review (correctness, coverage)
Review /refactor (Skill) Significant refactor surfaces Risk-scaled refactor
Doc Update /refresh-project-context (Skill) Medium/Large or public API Documentation sync

Concrete Task(subagent_type=…) blocks with full prompts live in PHASES.md at each invocation point.

Step 3: Checkpoint Protocol

Confirm with the user at two points only: after the proposal (Step 1) and before opening the PR. Mid-phase progress is reported inline, not gated — large-scope design decisions that change the proposal get surfaced when they happen, not batched into ceremony.

Step 4: Open PR via /create-pr

After the Commit phase, invoke the canonical PR skill:

Skill("create-pr")

/create-pr runs the DRY hotspot check, the pr-review-toolkit specialist pre-flight (Step 3.7), the local review gate (Step 3.8), and adds the review-bot mention when forge.reviewBot is configured. Do not use raw gh pr create — it bypasses every one of those gates.

If the user has explicitly asked for no PR (rare; usually a local-only experiment), say so and stop. Otherwise, /create-pr is the default wrap-up.

Skills I invoke

  • /create-pr — mandatory at the wrap-up of every feature flow that ships code
  • /grilling — Discovery, when the request leaves design decisions open (--docs when the project has a glossary)
  • /prototype — Discovery or Design, when a question can only be settled by something runnable (a state model to click through, UI variants to compare); the verdict comes back into the plan, the code stays on its prototype/<name> branch
  • /refactor — invoked from the Review phase on Medium/Large scopes when significant refactor surfaces emerge
  • /refresh-project-context — invoked from the Doc Update phase on Medium/Large scopes or public-API changes

Key Rules

  • Check .claude/agents/specialists/ for a project agent before dispatching a built-in one
  • Never skip verification phase
  • Never use raw gh pr create — always route the PR through /create-pr

Project-specific overrides: if SKILL.local.md exists in this directory, read it — it is consumer-owned, survives framework refresh, and wins on conflict. A sidecar that relaxes a gate defined above must state how to prove the gate is wrong in that case. Doctrine: rules/framework-vs-project-root.md.

04 同仓库更多 Skills

rynhardt81
rynhardt81/forgeFlow

wizard

Generates an interactive bash wizard that walks a human through steps only they can perform — opens each URL, says what to click and copy, captures values (hidden entry for secrets), writes .env and GitHub secrets, confirms before irreversible actions. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.

★ 0
rynhardt81
rynhardt81/forgeFlow

vet-idea

Vets an idea, decision, or plan BEFORE it is built. Runs a single model through five fixed adversarial advisor roles, a peer-review pass, and a chairman synthesis that emits a halt-capable GO / NO-GO / RECONSIDER verdict. Advisory and non-mutating — outputs a report, never writes task state. Use when an idea, feature, or costly hard-to-reverse decision is of uncertain worth and the question is whether to build it at all. NOT FOR settled work (bug fixes, approved features) or for shaping how to build it (the ISA Interview workflow).

★ 0
rynhardt81
rynhardt81/forgeFlow

triage-incident

Production incident triage — from "something is broken for users" to fixed, verified, and learned-from. Pulls the error signal (Sentry/logs/user report), reproduces before touching code, routes the fix through /fix-bug's prod fast path, and closes with a postmortem entry. Use when something is broken for users in production — an outage, data corruption, a Sentry spike, or a crash-rate alert. NOT FOR bugs found in development (use /fix-bug directly) or CI failures (use /diagnose-ci).

★ 0
rynhardt81
rynhardt81/forgeFlow

setup-review-bot

Configures a repo's AI code reviewers — the post-PR mention bot and the pre-push local reviewer — and writes the AGENTS.md the reviewers read. Interviews the user for what the reviewer should weight, then sets git config forge.reviewBot / forge.localReview and populates AGENTS.md at the project root. Use when a repo has no reviewer configured, when review findings are consistently off-target, or when onboarding a new project.

★ 0
rynhardt81
rynhardt81/forgeFlow

security-review

Portable security review for a feature, endpoint, or change before it ships. Orchestrates the existing OWASP review (@security-boss) and secrets scan (security_secrets validator), then adds the pass they miss — an explicit business-logic-flaw walkthrough (IDOR, race/TOCTOU, state-machine bypass, privilege escalation, price/quantity tampering). Advisory and non-mutating — produces a findings report; real findings are filed as tasks. Use when a change touching money, access control, or multi-step state is about to ship, or when the auth looks fine but the flow could be abused. NOT FOR SAST or dependency-CVE scanning (consumer CI owns those).

★ 0
rynhardt81
rynhardt81/forgeFlow

run-epic

Autonomously drains every open task in a single epic. Pulls ready tasks via the forge CLI, executes the work in-context using the matching discipline (fix-bug / new-feature / refactor), files newly-discovered work as follow-up tasks without stopping to ask, opens a PR per completed task via /create-pr, and repeats until the epic has zero ready/in-progress/pending tasks. Use when the user says `/run-epic E##`, "run epic autonomously", "finish all remaining tasks for epic X", or "drive epic X to completion".

★ 0