agentleFS
lukasrepubliclukasrepublic/agentic-foundry/skills/mode/SKILL.md

mode

Skill1 starsChanged 3 months agoMITView on GitHub

Set the session operating posture (/foundry:mode <name>) — set mode <name> — a closed set of exactly {factory, noninteractive, interactive}, default factory (the heavy, spec-first, fully-gated lane); noninteractive and interactive are the light lane. Trigger on "switch to noninteractive mode", "go interactive", "back to factory", "factory mode", "set mode noninteractive", "what mode am I in". Persists for the rest of the session (survives /compact) and is surfaced on the statusline (⚙️ factory / ⚡ noninteractive / ⏸ interactive). Posture-only — does NOT relax any gate, change authorization, or enable self-merge. ALSO sets the session's fork policy (/foundry:mode --fork-policy <value>) — set fork policy <value> — a second closed set of exactly {park, two-way-auto}, default park; two-way-auto lets the autonomous driver auto-answer a reversible question fork instead of stopping the loop (security/authorization-adjacent/irreversible forks always park). Trigger on "set fork policy two-way-auto", "set fork policy park", "what is my fork policy". Surfaced on the statusline appended to the mode glyph, e.g. ⚡ noninteractive+auto.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    setup

    Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 0

    Distinctive

    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:

    Drive an implementation loop: Use mode-autonomous / mode-interactive for that (a different, orthogonal axis).

    line 41
  2. Very specific:

    Interim surface for auto-answers: Every auto-answer a driver makes is appended, append-only, to .foundry/auto-answers.jsonl — inspect that …

    line 126

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “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

/foundry:mode — the session posture selector

A first-class session posture — exactly three modes, factory (the full lane: front-authorization → build → the merge floor → certification), noninteractive, and interactive (the light lane; the who-merges differentiation between the latter two is a downstream atom — M1 stores and surfaces the posture only).

This is a different axis from skills/mode-autonomous / skills/mode-interactive (the implementation-driver posture — who paces the loop / who approves the merge). Naming adjacency (interactive posture ↔ the mode-interactive driver) is intentional; the artifacts stay separate.

When to trigger

  • Explicit: /foundry:mode <name> (e.g. /foundry:mode noninteractive).
  • Natural language: "switch to noninteractive mode", "go interactive", "back to factory", "factory mode", "set mode noninteractive", "what mode is this session in".

Procedure

  1. Determine <name> from the request (factory, noninteractive, or interactive).
  2. Call the store:
    python3 "${CLAUDE_PLUGIN_ROOT}/scripts/foundry_session_mode.py" set <name>
    • On success, the script prints the resulting active mode on stdout (exit 0) — echo it back to the operator, e.g. "Session mode set to noninteractive."
    • On an unknown <name> (outside the closed set), the script rejects (exit 1, REJECTED: ... on stderr naming the three valid modes) and the active session mode is left unchanged. Report the rejection and the valid set to the operator; do not retry with a guessed value.
  3. Re-issuing the same <name> is a no-op on state and still echoes the mode (idempotent).

What this does NOT do

  • Relax any gate, change authorization, or enable self-merge. The posture is stored + surfaced only; downstream mode-aware behaviors read it to differentiate the lane's merge authority.
  • Drive an implementation loop. Use mode-autonomous / mode-interactive for that (a different, orthogonal axis).

Anti-patterns

  • Inventing a fourth mode value or accepting a near-miss spelling — the closed set is exactly factory / noninteractive / interactive; anything else is rejected, never coerced.
  • Silently falling back on a rejected set-mode request — always surface the rejection + the valid set to the operator.

What each posture means in practice (the three-mode model)

  • factory — spec-driven release delivery: specs (with UI/UX artifacts) → single-pass review → operator merge = authorization → wave-planned build → local certify → operator acceptance → staging. The heavy lane, and the default.
  • noninteractive — one atom on a one-page charter: see ${CLAUDE_PLUGIN_ROOT}/context/charter-template.md. Charter committed to the workspace → isolated-worktree build → PR (CI green + fresh-context review) → operator merges (or auto-merge-on-green when the charter opts in). Requirement changes = edit the charter. The charter lane is the DEFAULT LANE for product work (.foundry/decisions/2026-09-18-spec-is-a-living-document.md): /foundry:intake routes an atom here unless it lands in the security set (security: true, or its scope names auth, secrets, custody, a production mutation, or a cross-repo pin, or its contract's mandatory_review names a security review) — see skills/intake/SKILL.md "Lane routing". The security set is what the factory lane (spec + frozen acceptance-contract + /foundry:authorize + mandatory review) is reserved for.
  • interactive — zero-process vibe/debug session. No spec, no charter needed for exploration; work lands by ordinary commit/PR at the operator's discretion. Git discipline (protected main, no destructive ops) still applies — it is floor #4, not ceremony.

Native permission-mode pairing (recommendation, not enforcement)

The posture does NOT drive Claude Code's native permission mode — it cannot: hooks receive permission_mode as read-only input, and no framework surface can set it (verified against the Claude Code docs, 2026-07-27; this retired the planned "posture as thin display over native permissionMode" atom as unimplementable). The two are paired by convention instead:

posturerecommended native mode
factoryplan → default
noninteractiveacceptEdits (or auto)
interactiveacceptEdits

Suggest the pairing when setting a posture (one line, e.g. "consider Shift+Tab → accept-edits for this posture"); a workspace can pin its default via permissions.defaultMode in .claude/settings.json.

Fork policy (two-way-door auto-answer) — AC-AFP-1/-5

A second, orthogonal closed-set field on the same session-mode store: fork_policy ∈ {park, two-way-auto}, default park. Governs whether the autonomous driver (skills/mode-autonomous/SKILL.md) auto-answers a reversible ("two-way-door") question fork instead of stopping the loop — see that skill for the full carve-out (security-flagged, authorization-adjacent, or irreversible forks always park, fail-closed on ambiguous classification).

When to trigger

  • Explicit: /foundry:mode --fork-policy <value> (e.g. /foundry:mode --fork-policy two-way-auto).
  • Natural language: "set fork policy two-way-auto", "set fork policy park", "what is my fork policy".

Procedure

  1. Determine <value> (park or two-way-auto).
  2. Call the store:
    python3 "${CLAUDE_PLUGIN_ROOT}/scripts/foundry_session_mode.py" set-fork-policy <value>
    • On success, prints the resulting fork policy on stdout (exit 0) — echo it back, e.g. "Fork policy set to two-way-auto."
    • On an unknown <value> (outside {park, two-way-auto}), the script rejects (exit 1, REJECTED: ... on stderr naming the two valid fork policies) and the stored fork policy is left unchanged. Report the rejection to the operator; do not retry with a guessed value.
  3. Read back:
    python3 "${CLAUDE_PLUGIN_ROOT}/scripts/foundry_session_mode.py" resolve-fork-policy
  4. Persists with the posture (survives turns and /compact — same on-disk store, same record).
  5. Surfaced on the statusline appended to the mode glyph when active, e.g. ⚡ noninteractive+auto — the operator always sees when a session may auto-answer.

Posture is advisory, not authority. two-way-auto only changes which reversible question forks the autonomous driver auto-answers; it grants no authorization and does not touch the merge floor or the self-authorization classifier.

Interim surface for auto-answers. Every auto-answer a driver makes is appended, append-only, to .foundry/auto-answers.jsonl — inspect that file directly (the run-state summary consumer surfacing unacknowledged entries is a follow-on; see the spec residual).

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.