agentleFS
harshanandakharshanandak/forge-legacy/skills/kernel/SKILL.md

kernel

Skill4 starsChanged 48 days agoMITView on GitHub

Forge kernel — umbrella index/router for a Forge project. Reach for this FIRST when orienting rather than executing: at session start, when you need the map of how the system fits together, or when unsure WHICH skill or `forge` verb a task belongs to. It indexes `smith` (end-to-end orchestrator), the stage ladder (plan → dev → validate → ship → review → verify), the utility/issue skills, and the day-to-day `forge` CLI verbs. Trigger on "how does the Forge workflow work", "which forge command or skill for X", "I'm new here, how is Forge set up", or "should this be a Forge issue or a TodoWrite". Index layer only — hand off the doing: rank/pick the next ready issue → `triage-ready`; current stage / "where am I" / active or stale work → `status`; create/update/close/search one issue → `issue-basics`; claim-then-prove ownership before mutating → `claim-safety`; drive one issue from plan to a merged PR under gates → `smith`; token-bounded state for the Hermes harness → `hermes-forge`.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Every skill carries chain metadata in its frontmatter (next, terminal, subskills, handoffs).

    line 62
  2. Distinctive:

    Read-and-repair skills that work directly against the kernel's issue store.

    line 113
  3. Distinctive:

    When in doubt, prefer a Forge issue: it survives the session and is visible to the team.

    line 180
  4. Very specific:

    Orient first: Start with the status skill (or forge prime / forge orient) — never reconstruct project state from raw files.

    line 185

≈ “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 kernel surface

Forge is a TDD-first workflow harness. The agent-facing surface is skills + the forge CLI — there are no slash-command files. This umbrella skill is the entry point: it tells you which stage skill to use and which forge verb runs each day-to-day operation. Every skill is a thin guide over a real forge command; the CLI remains the implementation, the skills are the surface.

Stage skills (the TDD ladder)

The default workflow is a configurable ladder of per-stage skills. Use the whole flow when it fits, or invoke an individual stage when the active plan permits a smaller path.

StageSkillPurpose
utilitystatusCheck current context, active work, recent completions
1planDesign intent → research → branch + worktree + task list
2devSubagent-driven TDD per task (implementer → spec → quality review)
3validateType check, lint, code review, security, tests — all fresh output
4shipPush branch and open the PR with design-doc reference
5reviewAddress ALL PR feedback (GitHub Actions, Greptile, SonarCloud)
6verifyPost-merge health check (CI on main, close issues)

Pre-merge gate (not a numbered stage): before merge, finish the doc updates on the feature branch and confirm CI is green, then hand off the PR for manual merge. The gate is embedded in ship and review — it is not a standalone skill.

Utility skills outside the linear ladder: research (deep web research), rollback (safe revert operations), sonarcloud (code-quality queries), shepherd (cross-harness PR monitoring).

Procedure skills (reusable operations any stage/agent embeds): claim-safety (claim an issue and PROVE you own the lease via forge issue owns <id> before mutating it — a claim returning ok:true does not by itself prove ownership).

status → plan → dev → validate → ship → review → verify

Chain map (each skill declares its successor)

Every skill carries chain metadata in its frontmatter (next, terminal, subskills, handoffs); each workflow STAGE skill additionally carries a HARD-GATE chain line in its body, so each stage announces the next one. The linear ladder:

Skillnextterminal
plandevfalse
devvalidatefalse
validateshipfalse
shipreviewfalse
reviewverifyfalse
verifyshipfalse

The next column is each stage's DEFAULT / critical-path successor (plan composes research; ship and review also carry a shepherd handoff). The actual successor after ship, review, and verify is classification-dependent — see the note below. verify's next (ship) is the docs-only pre-ship reuse; in every other flow nothing follows verify.

Feeders into the chain: triage-ready → claim-safety → dev (rank the pick, prove the live lease, then work it). research is standalone / callable mid-workflow and returns to its CALLER (no forced next); it is also a subskill of plan. The smith orchestrator composes the six stages (subskills). Utility/terminal skills (status, shepherd, kernel, issue-basics, memory, rollback, research, sonarcloud, sonarcloud-analysis, parallel-deep-research, using-forge) declare no forward-stage next. Meta skills (hermes-forge) are chain-exempt.

The stage next values above are the DEFAULT / critical-path successors. The actual successor after ship, review, and verify is classification-dependent — the authoritative matrix is lib/workflow/stages.js (Simple/Hotfix/Refactor end at ship; Standard ends at review; Critical runs through verify; the docs classification reuses verify → ship).

Orchestrator super-skill

smith is the flagship: a thin orchestrator that COMPOSES the skills above into the right path for a piece of work — pick (triage-ready) → claim (claim-safety) → plan → dev → validate → ship → review → verify — driving autonomously between human gates and pausing AT them. The human gates are durable kernel EVENTS (forge gate check|approve|reject|status <issue> <gate>; gates gate.intent · gate.plan-approval · gate.merge), so a gated run is resume-safe across compaction. During planning smith calibrates how many gates the work needs from its size × importance × complexity and proposes that tier at the intent gate (the human confirms or overrides). Reach for smith to run a whole issue end to end under human control; invoke an individual stage skill to run a single step.

Kernel-native skills

Read-and-repair skills that work directly against the kernel's issue store. They complement the ladder: reach for them to decide what to do and to run the everyday issue operations, then route into a stage skill to execute.

SkillPurpose
triage-readyRead-only "what should I work on" — ranks and explains the ready queue via forge issue ready / blocked / stats (never board), then hands off the pick.
issue-basicsThe everyday CRUD floor — create/update/claim/release/comment/close/show/list/search/stats over the forge issue verbs, plus the label/reopen/delete disposition for teams migrating in.

Day-to-day verbs (the forge CLI)

The kernel verbs are the operations you reach for inside any stage — find work, claim it, fix in place, query the board, orient. They are grouped in four families. Run them through Bash; never hand-edit the issue store.

A — Issue lifecycle (the core loop)

NeedCommand
Find ready workforge ready [--json]
Inspect an issueforge show <id> [--json]
List / filter issuesforge list [--status …] [--json]
Create an issueforge create --title "…" --type <feature|bug|task>
Claim work (DB-enforced lease)forge claim <id>
Prove you own the leaseforge issue owns <id> — exit 0 iff you hold the live lease (see the claim-safety skill)
Release a claimforge release <id>
Update fieldsforge update <id> --priority <n> (etc.)
Add a handoff commentforge comment <id> "…"
Close an issueforge close <id> --reason "…"
Dependenciesforge issue dep add|remove <id> <id>
Search / statsforge issue search "…" · forge issue stats
Blocked workforge blocked

B — Memory / knowledge

forge remember <note> [--tag <label>]... [--json] and forge recall are live — they persist and retrieve project-memory notes from a file-backed store. Only forge knowledge search is not on the CLI yet; until it lands, capture durable decisions as forge remember notes or issue comments (forge comment).

C — Board / planning / admin

NeedCommand
Team boardforge board [--json]
Export the issue projectionforge export [--import]
Release-readiness gateforge release check --target <ref>
Sync team stateforge sync

D — Orientation / session

NeedCommand
Prime a sessionforge prime [--json]
Full orientationforge orient [--json]
Recap an issue / contextforge recap [<id>] [--json]

Forge issues vs. TodoWrite — decision table

SituationUse
Work spans sessions, has blockers, or needs recovery after compactionForge issues (forge create/claim/close)
Cross-agent or cross-worktree coordinationForge issues (DB-enforced leases)
Durable decisions, design rationale, handoff notesForge issue comments
Ephemeral, single-session checklist for the current taskTodoWrite
Steps you will finish and discard within this turnTodoWrite

When in doubt, prefer a Forge issue: it survives the session and is visible to the team. TodoWrite is for scratch tracking only.

Session protocol

  1. Orient first. Start with the status skill (or forge prime / forge orient) — never reconstruct project state from raw files.
  2. Claim before you build — then prove it. forge claim <id> takes the lease; one issue at a time. A claim's ok:true does not by itself prove ownership, so confirm with forge issue owns <id> before working and again before close/release (the claim-safety skill). forge release <id> if you abandon it.
  3. Work the ladder. plan → dev → validate → ship → review → verify, skipping stages only when the plan allows. The pre-merge doc gate runs inside ship and review before merge — it is not a separate stage.
  4. Record evidence as you go. Progress and decisions go to forge comment <id> "…", not to memory.
  5. Hand off cleanly. Close completed issues (forge close <id> --reason …) and forge sync so the team sees the result.

Core principles

  • TDD-first — write tests before implementation (RED → GREEN → REFACTOR).
  • Research-first — understand before building; document decisions.
  • Security built-in — OWASP Top 10 analysis for every feature.
  • Documentation progressive — update at each stage, verify at the end.

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.