set-context
Gather codebase and initiative context before planning starts — runs a graphify build or query when graphify is available locally, falls back to a manual repo sweep otherwise, then asks targeted questions and writes a single context.md. Invocable standalone or as fsad-harness:plan's mandatory Phase 0. Use when the user says "set context", "gather context", or as the first step of fsad-harness:plan.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 8
- Forks
- 4
01 前言 Front Matter
- name
- set-context
- description
- Gather codebase and initiative context before planning starts — runs a graphify build or query when graphify is available locally, falls back to a manual repo sweep otherwise, then asks targeted questions and writes a single context.md. Invocable standalone or as fsad-harness:plan's mandatory Phase 0. Use when the user says "set context", "gather context", or as the first step of fsad-harness:plan.
- argument-hint
- `[target repo path]`
03 SKILL.md 正文
fsad-harness:set-context — Context-Gathering Subskill
Gather everything a downstream planning pass needs — codebase shape plus the initiative's own
boundaries — and emit it as a single context.md file. Nothing else reads or writes to disk in
this skill besides that one file (and, when graphify runs, whatever graphify-out/ it produces).
Asking the user
This rule covers every question this skill asks the user: a confirmation, a choice, a missing value, a numbered decision list, or a stop-and-ask. It applies even where a later step says "ask the user" or "ask exactly once". The user may watch the decisions pane rather than the chat, so a question that only goes to chat can go unanswered.
- When
mcp__decision-tracker__decisionis in your tool list (loaded, or named as a deferred tool; load a deferred one withToolSearchfirst), log each question before you ask it:- Call it with
action: "open", the question (ending in?), andoptionswhen the answers are a closed set. Setrequired: falsewhen the work can go on without an answer. A numbered list of questions opens one decision per item. Keep each returnedid. - Ask the question in chat as this skill says. The open call does not replace the chat question.
- When the user answers, in chat or as a
Decision Dn: <answer>message from the plugin, call the tool withaction: "close", theidand the answer. - When the change the answer asked for is in place, call it with
action: "implement", theidand apath:line.
- Call it with
- When the tool is absent, ask in chat only.
- An
AskUserQuestioncall is logged on its own. Do not open it again. - This rule changes where a question is logged. It does not change when this skill asks, or how many times.
Invocation model — read this first
This skill runs inline, in the same conversational turn as the interactive user, for every piece of user-facing interaction below: every targeted question in Step 3, and any question graphify itself needs answered (its corpus-size subfolder prompt, its package-install notice).
Invoking graphify's build may be dispatched via the Agent tool as a subagent when that's
useful — e.g. to isolate a long-running corpus scan while you keep the turn free. But if that
subagent hits graphify's own interactive pause (its >2,000,000-word / >500-file subfolder
question) or its package-install step, it must stop and report back to this inline turn rather
than resolve the question itself — you relay it to the user, get the answer, and resume the
subagent with it. A subagent that cannot relay is not a valid way to invoke graphify from this
skill; if you can't guarantee that relay (e.g. no way to resume the dispatched agent with an
answer), run graphify inline instead.
Step 1 — Resolve the target
Determine the target repo/scope:
- If an explicit path argument was given, use it.
- Otherwise use the current working directory.
Confirm the resolved path to the user in one line before continuing: "Gathering context for
{target}."
Step 2 — Codebase context: graphify or manual sweep
- Check whether
{target}/graphify-out/graph.jsonalready exists.- Exists — this is a query, not a build. Run
graphify query "What is this codebase's overall architecture and module structure?"against it. Record the answer's key points incontext.mdunder Codebase Context, and note explicitly that this came from an existing graph (graphify-out/was already present — no build was run). - Does not exist — check whether the
graphifyskill is installed locally (~/.claude/skills/graphify/SKILL.md).- Installed — offer to run a graphify build against
{target}(or dispatch it viaAgentper the invocation model above). Tell the user before graphify installs anything or before its corpus-size question could fire — don't let either happen silently:- Graphify's own Step 1 checks whether its
graphifyypackage is installed and installs it viauv tool install/pip installif missing. Say so before triggering that step: "graphify needs its package installed first if this is the first time it's run on this machine — that'll happen automatically." - If graphify's corpus-size check trips (>2,000,000 words or >500 files), it will ask which subfolder to scope to. Surface that question to the user directly the moment it fires — do not let it silently stall this "mandatory, non-skippable" step.
- Once the build finishes, record a summary of what it found in
context.mdunder Codebase Context, and note that this came from a fresh build.
- Graphify's own Step 1 checks whether its
- Not installed, or the user declines the offered build — fall back to a manual context
sweep: repo structure (top-level layout), existing docs (README, CLAUDE.md, ADRs), package
manifests (package.json / pyproject.toml / etc.), recent git history (
git log --oneline -20), and any existingplanning/artifacts. Record findings under Codebase Context and note explicitly that no graphify graph was used.
- Installed — offer to run a graphify build against
- Exists — this is a query, not a build. Run
Step 3 — Targeted questions
Ask the user each of the following that graphify or the manual sweep couldn't already answer.
Ask one at a time, not as a form. Record every answer in context.md — a question asked but
never carried into the file is not actually gathered.
- Initiative slug/name — the name used to derive the output directory (see
fsad-harness:plan's Step 4 slug-transform algorithm: lowercase, non-alphanumeric runs collapsed to a single hyphen, leading/trailing hyphens trimmed — e.g. "Auth Service Refactor!" →auth-service-refactor). - Scope boundaries — what's in scope for this initiative, and what's explicitly out.
- Non-negotiable constraints — technical, business, timeline, or behavior-preservation constraints that must hold no matter what the plan proposes.
- Stakeholders — who cares about this initiative's outcome, and who needs to sign off.
- Target repo — confirm whether the plan ships to this same repo or a different one (for example, a plan authored in one repo that targets another).
- Versioning/release conventions — the target repo's versioning scheme and release process, if not already discoverable from the codebase sweep above.
If the user says "use your best judgment" for any of these, record a stated assumption in
context.md rather than blocking — but always record something; never leave a question answered
only in the conversation and not in the file.
Step 4 — Emit context.md
Write a single structured context.md to planning/plan/<slug>/ (using the slug from Step 3.1
and the transform above), or to a scratch location — e.g. the repo root — if that directory
doesn't exist yet (it's created once the initiative is confirmed, in fsad-harness:plan's Phase 0).
Why a file, not an in-memory handoff: every downstream drafting agent (fsad-harness:plan's Phase
1-4.5) is a separately-dispatched Agent-tool subagent with no memory of this skill's own turn —
only a file survives across that boundary. Every downstream drafting agent's dispatch prompt must
reference this file's path rather than re-deriving context independently; that's on fsad-harness:plan, not
this skill, but it's why this file's shape has to be complete on its own.
Template:
# Context — {initiative name}
## Codebase Context
[Summary from graphify query, graphify build, or manual sweep — and which of the three produced
it]
## Initiative
- **Slug:** {slug}
- **Scope boundaries:** {answer}
- **Non-negotiable constraints:** {answer}
- **Stakeholders:** {answer}
- **Target repo:** {answer}
- **Versioning/release conventions:** {answer}
Confirm the written path to the user: "Context gathered and written to {path}."
Guardrails
- Never run interactively-blocking work as a fire-and-forget subagent. If graphify's build is
dispatched via
Agent, it must be able to relay a pause back to this turn — otherwise run it inline. - Never let graphify install a package or ask its subfolder question without telling the user first. Both are disclosed pre-emptively in Step 2, not discovered after the fact.
- One question at a time in Step 3 — never dump the six questions as a form.
- Always write
context.md, even when falling back to a stated assumption — a question with no corresponding line in the file did not happen as far as any downstream agent is concerned. - Never invent a graph. If
graphify-out/graph.jsondoesn't exist and graphify isn't installed (or the user declines), go straight to the manual sweep — don't guess at codebase structure.
04 同仓库更多 Skills
sync
Pre-flight sync check for registered projects. Fetches from remote, reports uncommitted changes, and handles four states — up-to-date, ahead, behind (warns + pulls), or diverged (warns, no pull). Supports single-project (cwd detection), named-project (fsad-harness:sync key1 key2), and full-sync (fsad-harness:sync ALL) modes.
spec-review
Run a detailed, adversarial multi-agent review of a written proposal or specification (spec.md, PRD, RFC, design doc, architecture proposal, business case) — reviews the document, not code. Runs a steelman/inventory pass, then up to 10 specialist lenses (logic, assumptions, evidence, completeness, feasibility, alternatives, consistency, stakeholders, testability, risk), then adversarial validation that defaults to refuting each finding unless it survives, then a loop-until-dry completeness pass. Writes a single severity-ranked SPEC-REVIEW.md next to the document. Use when the user says "review this spec", "adversarial review", "poke holes in this proposal", "red team this PRD", "critique this design doc", "what's wrong with this RFC", "stress test this plan", or similar. Review-only — never edits the document.
ship
Short alias for /fsad-harness:ship-it. Wrap up finished work, cut a version, commit, push, and open a PR.
ship-it
Wrap up a finished round of work — verify README and CHANGELOG are current, cut a version if warranted, move completed task files into the completed/ folder, then create a feature branch if needed, commit, push, and open a PR. Run after `/fsad-harness:do-task` has marked one or more tasks done. Takes no arguments.
sec-review-team
Run a multi-agent security review TEAM over a codebase or recent diff. Picks a specialist roster based on detected stack signals (webapp / desktop / iac / llm-agent / container / backend / mobile / etc.) from a library of 13 specialists. Each specialist writes structured JSONL + prose findings in parallel; input-validation-auditor and auth-authz-auditor run a loop-until-dry consensus fan-out (2-8 passes); every deduped finding is adversarially verified by a dedicated validator agent before it can appear in the report. Orchestrator consolidates into a single severity-ranked REPORT.md with deduped root issues, archived per-run under a known-findings.jsonl ledger that drives auto re-review. Distinct from the built-in `/security-review` (which is a single-pass branch review). Use when the user says "multi-agent security review", "security review team", "sec-review team", "audit this branch with a team", "pre-release hardening team pass", or similar. Review-only — no fixes.
sec-review-fixes
Companion to `sec-review-team`. Takes the `REPORT.md` or `findings.jsonl` from a security review run and produces fix PRs (one per finding or one consolidated) with interactive approval. Each candidate finding becomes a proposed diff + a regression test that would have caught it + a commit/PR citing the finding ID. Filters by default to `severity IN (critical, high) AND confidence IN (certain, likely)`. Modes: interactive (default), `--dry-run` (produces a fix-plan document with no code changes), `--re-verify` (re-runs sec-review-team against a specific set of finding IDs and reports fixed / still-present / inconclusive). Safeguards: branch-only commits (never main), no force-push, clean-working-tree required, regression-test must pass before commit lands. Use when the user says "fix the security findings", "apply sec-review fixes", "open PRs for the security report", "re-verify the security fixes", or similar.