agentleFS
tonmoy007tonmoy007/forge-plugins/skills/forge-why/SKILL.md

forge-why

Skill2 starsChanged 5 months agoMITView on GitHub

Explain a Forge gate criterion, lesson tag, pipeline stage, or current

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    BEFORE suggesting /forge:force-advance — always explain the blocker first

    line 32
  2. Very specific:

    If the result includes a fix hint that points to a specific file/command, do NOT execute it automatically.

    line 57
  3. Very specific:

    NOT execute it automatically.

    line 58
  4. Very specific:

    If the result is not found (exit 1), suggest alternatives:

    line 60
  5. Very specific:

    LLM fallback (REQ-F-050): when the deterministic lookup misses AND background capability is available (and FORGE_NO_BACKGROUND is unset), …

    line 67
  6. Distinctive:

    After running, all of these should be true:

    line 76

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Forge Why

Pure read-only deterministic lookup. Translates a Forge identifier into a human-readable explanation. Four input modes:

Target formExampleResolves to
Gate criterion IDG1-001, G7-API-002, G12-LIB-001Description + check type + severity + fix hint
Stage number (terse or prefixed)3 or stage-3Stage name, purpose, artifacts, gate counts
Lesson tagforce-advance, slow-consumerUp to 5 most-recent lessons with that tag
(empty)/forge:whyCurrent stage's active blockers + fix hints

When to Use

  • User types /forge:why <something> or just /forge:why
  • A gate just failed and the user asks "why?" or "what does that mean?"
  • User asks "what is Stage N?" or "what does this stage do?"
  • User asks about lessons: "show me force-advance lessons", "any slow-consumer warnings?"
  • BEFORE suggesting /forge:force-advance — always explain the blocker first

When NOT to Use

  • The user is asking a question Forge cannot answer (general programming questions, questions about their domain) — /forge:why only resolves Forge IDs and concepts
  • The user has already heard the explanation — don't repeat it on follow-up

Steps

  1. Identify the target the user is asking about:
    • Starts with G followed by digit → gate criterion ID
    • Matches <digit> or stage-<digit> (1-12) → stage number
    • Empty or "current blockers" → bare invocation
    • Anything else → lesson tag
  2. Run:
    python ${CLAUDE_PLUGIN_ROOT}/scripts/why.py "<target>" --cwd "<project>"
    For bare invocation, omit the target:
    python ${CLAUDE_PLUGIN_ROOT}/scripts/why.py --cwd "<project>"
  3. Present the output to the user verbatim. The fix hints inside are literal — do not paraphrase them.
  4. If the result includes a fix hint that points to a specific file/command, do NOT execute it automatically. Wait for the user to ask. The why command informs; it doesn't act.
  5. If the result is not found (exit 1), suggest alternatives:

    • For an unknown gate ID: "That ID doesn't exist. Did you mean one of these?" followed by running /forge:status to list active gates
    • For an unknown lesson tag: "No lessons match that tag. Run /forge:retro to see what's been recorded so far"
    • For an out-of-range stage: "Stages are 1-12; you may have meant a different number"

    LLM fallback (REQ-F-050): when the deterministic lookup misses AND background capability is available (and FORGE_NO_BACKGROUND is unset), why.py automatically dispatches one orchestrated subagent to offer a best-effort explanation, printed with a clear "not a recognized Forge ID — best-effort inference" banner (exit 0). It is cost-gated and never authoritative — present it as a guess, not a fact. With no capability, behavior is unchanged (the not found error above, exit 1).

Verification

After running, all of these should be true:

  • The user has the answer to what they asked about
  • For gate explanations, the user knows the criterion's severity (blocker vs warning)
  • For current-blocker explanations, the user knows each blocker's fix hint
  • The user can decide their next move: fix the blocker, ask another /forge:why, run /forge:status, or (if they've considered it) force-advance

Examples

User: "Why is G3-002 failing?"

Claude: [runs python ${CLAUDE_PLUGIN_ROOT}/scripts/why.py G3-002 --cwd "$(pwd)"]

Gate criterion: G3-002
  Stage:       3
  Severity:    blocker
  Check type:  file_exists
  Description: At least one ADR present
  Check args:  {"path": "pipeline/03-architecture/adr"}

  Fix hint:
    Add at least one ADR. Either run `/forge:adr` or create
    pipeline/03-architecture/adr/0001-<short-title>.md.

"This is a blocker — Stage 3 won't advance until you have at least one Architecture Decision Record. Want me to walk you through creating one, or do you have one to point to?"


User: "What's blocking me right now?"

Claude: [runs python ${CLAUDE_PLUGIN_ROOT}/scripts/why.py --cwd "$(pwd)"]

Stage 3: 2 blocker(s):

  ✗ G3-001 — Architecture doc exists
      detail: pipeline/03-architecture/architecture.md: file does not exist
      fix:    Create pipeline/03-architecture/architecture.md describing system
              structure, components, and key data flows.

  ✗ G3-002 — At least one ADR present
      detail: pipeline/03-architecture/adr: directory contains no .md files
      fix:    Add at least one ADR. Either run `/forge:adr` or create
              pipeline/03-architecture/adr/0001-<short-title>.md.

To override: /forge:force-advance --reason '<why>'  (records a lesson)

"Two blockers. The architecture doc is the bigger one — let me know if you want to start drafting it together, or if you'd rather sketch the ADR first."


User: "What is stage 7?"

Claude: [runs python ${CLAUDE_PLUGIN_ROOT}/scripts/why.py 7 --cwd "$(pwd)"]

Stage 7 — evaluation
  Purpose: Test against NFRs; verify acceptance criteria; profile-specific checks.
  Gate criteria: 4 blocker(s), 2 warning(s)
  Artifacts:
    - pipeline/07-evaluation/eval-report.md
  Criterion IDs: G7-001, G7-002, G7-API-001, G7-API-002, G7-API-003, G7-FS-001

"Stage 7 is where you validate that what you built in Stage 6 actually meets the requirements from Stage 1. For your api project, it adds API-specific checks like contract tests and load tests on top of the base gates."


User: "Have I force-advanced before?"

Claude: [runs python ${CLAUDE_PLUGIN_ROOT}/scripts/why.py force-advance --cwd "$(pwd)"]

Lesson tag: force-advance
  Total matches: 2 (showing 2 most recent)

  [1] 2026-05-14 — Stage 3
      trigger: Stage 3 advanced with unresolved blockers
      rule:    Deferring ADRs to next sprint; team consensus from standup
      blockers: G3-002, G3-005

  [2] 2026-05-10 — Stage 1
      trigger: Stage 1 advanced with unresolved blockers
      rule:    Customer demo Monday; will fill in REQ-IDs after
      blockers: G1-002

"Twice so far in this project. The Stage 3 override is from yesterday — those ADR gates (G3-002, G3-005) are still failed if you want to come back to them."

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.