im-stuck
Skill10 starsChanged 37 days agoMITView on GitHub
Break the task out of a loop, confusion state, or false progress and find the fastest safe path forward, routing to a recovery command and editor mode. Use when progress loops or stalls, questions repeat, the wrong command or mode may be in use, or the user is unsure if it is technical, workflow, or scope. Do not use when the next step is clear, for normal routing (use what-next), or for a brand-new task (use task-init). For a vague prompt, use prompt-shape.
In this repository98 other files it gives its agents.
- AGENTS.mdAGENTS.md
- a11y-auditSkill
- ai-feature-eval-harnessSkill
- api-contract-reviewSkill
- api-runtime-verifySkill
- apply-sweep-triageSkill
- approve-planSkill
- approve-proposedSkill
- app-runtime-verifySkill
- atom-audit-fleetSkill
- atom-auditSkill
- autonomous-boardSkill
- autonomous-readinessSkill
- autonomous-runSkill
- backend-system-designSkill
- branch-commitSkill
- capture-observationSkill
- capture-referencesSkill
- code-context-mapSkill
- code-locateSkill
- color-contrast-architectSkill
- compact-task-memorySkill
- component-specSkill
- contract-signoffSkill
- db-context-postgresSkill
- db-context-supabaseSkill
- decision-interviewSkill
- delivery-assetSkill
- design-bootstrapSkill
- design-spec-reviewSkill
- direction-adjustSkill
- external-research-fleetSkill
- external-researchSkill
- extract-foundations-from-screensSkill
- feature-library-scout-fleetSkill
- feature-library-scoutSkill
- foundation-auditSkill
- frontend-architecture-reviewSkill
- frontend-system-designSkill
- godot-runtime-verifySkill
- godot-scene-planSkill
- graphql-contract-reviewSkill
- harvest-session-learningsSkill
- image-to-specSkill
- impact-analysisSkill
- implement-approved-sliceSkill
- implementation-planSkill
- implement-fleetSkill
- implement-slice-complementSkill
- incident-triageSkill
- invariants-and-non-goalsSkill
- inventory-snapshotSkill
- journey-mapSkill
- jtbd-switch-interviewerSkill
- mcp-server-vetSkill
- migration-safety-stewardSkill
- pattern-docSkill
- performance-budgetSkill
- portfolio-reviewSkill
- post-deploy-verifierSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Read these sections in WORKFLOW_OPERATING_SYSTEM.md first:
- Distinctive: line 41
Read additional sections only when relevant to this command's role.
- Distinctive: line 54
Do not implement code unless explicitly asked in a later step.
- Distinctive: line 57
Before producing output, verify recovery guidance would materially change the next action versus repeating prior guidance.
- Very specific: line 58
If the best recovery is simply to run the next obvious official command with no task-memory correction, do not churn TASK_STATE.md.
- Very specific: line 60
If TASK_STATE.md would not materially change, do not rewrite it.
- Distinctive: line 78
If the best move is to stop discussing and close only the current slice, say so explicitly.
- Very specific: line 80
If the best move is to correct task memory, include the exact TASK_STATE.md update block.
- Very specific: line 144
Follow ## Global output contract in WORKFLOW_OPERATING_SYSTEM.md for APPLIED / PROPOSED / SKIP rules.
- Very specific: line 155
Before declaring this output done, confirm it satisfies the shared Definition of done (command outputs) and Gate conditions in …
≈ “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.
Files
Output contract, in brief. This body is over the per-skill re-injection cap, so after a compaction the sections below are truncated away while this summary survives. They remain authoritative in full; re-read this file before emitting if you need them.
Standard output layout (required): Produce the command output using this structure (English only):Artifact changes: Follow## Global output contractinWORKFLOW_OPERATING_SYSTEM.mdforAPPLIED/PROPOSED/SKIPrules. Every listed file...Command transcript: Brief audit trail (max 4 lines; max 3 in no-op runs withNO_OP_TRACE).Handoff: Use the adaptive ending format ofWORKFLOW_OPERATING_SYSTEM.md## Global output contract. Every Handoff is one fencedtextb...Definition of done (command output): Classifies the stuckness type and names what should stop being reopened.
Act as a senior/staff engineering workflow recovery lead for the active engineering task.
Goal: Break the task out of a loop, confusion state, or false-progress state, then determine the fastest safe path forward.
Mandatory context bootstrap (before any output):
- Read these sections in
WORKFLOW_OPERATING_SYSTEM.mdfirst:## LLM execution contract## Editor mode policy(mode definitions only; the tool mapping table is lazy-loaded inwos/editor-mode-mappings.mdand needed only for non-Claude-Code tools)## Global output contract(including Adaptive handoff and Mode selection rule)## Cross-cutting workflow guardrails
- Bootstrap tiers: the light-weight commands (
branch-commit,what-next,where-we-at,slice-closure,compact-task-memory) plus the high-frequencyimplement-approved-sliceandsync-task-state(v3 wave1 item D) read the four sections above with two subsections of## Cross-cutting workflow guardrailsskipped:### External web access (centralized)and### Sequencing heuristics (by phase). Everything else is read at every tier, including### Proposal vs approved persistenceand### Substrate peer ownership (per ADR-0034), since all seven write substrate sections and reason about PROPOSED (state-reconcilestays on the full tier for cross-artifact judgment). The full tier is measured at 12109 tokens, the four always-read sections combined; the two skipped subsections are 1,034 of those (measured 2026-09-28), so the reduced tier is about 11,074. The leaf-reviewer tier (verify-against-rubric, ADR-0226) reads only## Global output contract, measured at 5215 tokens, plus its rubric. - Session bootstrap reuse (skip-if-unchanged; v3 wave1 item D): WHEN this conversation already read the bootstrap sections in an earlier turn still VISIBLE in the context window AND
WORKFLOW_OPERATING_SYSTEM.mdhas not changed since, the command MAY skip the re-read and cite the earlier one, emitting one Command transcript line:Bootstrap: reusing turn <N> read, WOS unchanged. Scoped exception to the context-budget re-fetch rule (wos/context-budget.md, "The re-fetch rule"), because these sections are one large, static, byte-identical read repeated every turn; every other tool result still re-fetches. VISIBLE means the section text itself is still present and quotable now, not merely that a record of the earlier read exists: a harness that clears a tool result while the record survives (ADR-0114) has not satisfied VISIBLE, and self-declared memory after a compaction never qualifies. A stateless-per-turn harness is excluded. The transcript line is mandatory; a silent skip is invalid output. - Resolving the spec and
wos/<topic>.md: canonical repository FIRST. Otherwise use active-adapter docs:~/.claude/workflow-docs(CLAUDE_WORKFLOW_DOCS_DIR),~/.cursor/workflow-docs(WORKFLOW_DOCS_DIR; project.cursor/workflow-docson project installs),~/.codex/workflow-docs(CODEX_WORKFLOW_DOCS_DIR), or<kimi-home>/workflow-docs(KIMI_WORKFLOW_DOCS_DIR). Nonempty overrides win. Kimi home:KIMI_CODE_HOME, else existing~/.kimi-code, else existing~/.kimi, default~/.kimi-code. Use one root for both paths; try other adapters if absent or unknown. Report resolved root, fallback to other adapters, or missing mandatory context in### Command transcript. Installed snapshots refresh and prune retired topics only on sync. - Read additional sections only when relevant to this command's role.
- Align all routing recommendations and next-command suggestions with the current command set.
- Official next-command names only: recommendations, including
Run now, use registered names fromcommands/<name>.mdorcommands/<name>/SKILL.md; installed mode uses the available Fhorja command or skill inventory. No invented aliases.Run now: nonewithMode: N/Aends only if no honest next step exists, defined under### Official command names (routing integrity)(ADR-0126). Required inputs: - active task folder path
- TASK_STATE.md
- SOURCE_OF_TRUTH.md
- relevant task artifacts
- latest user request or confusion point
- relevant code/test/runtime evidence if applicable
- last completed step from TASK_STATE.md (command + summary)
Operating rules:
- Do not implement code unless explicitly asked in a later step.
- Handoff: end with the adaptive
### Handoffblock perWORKFLOW_OPERATING_SYSTEM.md## Global output contract(Mode A compact or Mode B full). - Diagnose why progress is stuck.
- Before producing output, verify recovery guidance would materially change the next action versus repeating prior guidance.
- If the best recovery is simply to run the next obvious official command with no task-memory correction, do not churn
TASK_STATE.md. - No-op rule for artifacts:
- If
TASK_STATE.mdwould not materially change, do not rewrite it. - Still output a minimal NO_OP trace note for traceability, but keep it short.
- If
- First classify the stuckness type:
- local implementation issue
- phase transition issue
- stale task memory issue
- repeated review loop
- command/mode mismatch
- true technical uncertainty
- scope confusion between task vs slice
- Distinguish clearly between:
- what is actually blocked
- what is already decided and should stop being reopened
- what is missing and truly needs resolution
- what is noise or repeated discussion
- whether we are closing the full task or only the current slice
- Recommend the smallest decisive next step that gets progress moving again.
- Cheap check before expensive research. WHEN a fix is genuinely uncertain and both a cheap manual check (a single log line, a short physical device test, a one-command repro) and an expensive multi-agent research pass are viable options, the recommended next step SHALL be the cheap check first, reserving the expensive research pass for after the cheap check fails to resolve the uncertainty. Concretely: a 30-second physical device check is cheaper and more decisive than a multi-agent research pass costing hundreds of thousands of tokens, when both would answer the same question.
- If the best move is to stop discussing and close only the current slice, say so explicitly.
- If the best move is to answer one unresolved question, ask only that question. WHILE the run is an attended chain on a task branch (a
Task branch:line inTASK_STATE.md ## Resume notes) and noOperating mode: assistedis declared, this command SHALL NOT ask it (ADR-0233): a product decision routes todecision-interview, whose provisional mode records it as a### P-Nand continues, and a missing fact routes totargeted-questions, which does the same for a fact only a person could supply. An unattended or fleet-dispatched run (ADR-0237) keeps its own rules; the one exception is a session under standing authorization (ADR-0244,wos/cross-cutting-workflow-guardrails.md ### Unattended sessions), which SHALL follow this bullet. - If the best move is to correct task memory, include the exact TASK_STATE.md update block.
- Be strict about matching the recommended editor mode to the actual next action type.
Required output:
- Why we are stuck
- Stuckness classification
- What is already settled
- What is still truly open
- What should stop being revisited
- Are we closing the task or only the current slice?
- Best recovery action now
- Best next command
- Best editor mode
- Exact TASK_STATE.md update block, or explicit
TASK_STATE: NO_CHANGE - What should not be done yet
Claim grounding (active epistemic humility)
Claim grounding (active epistemic humility). This block governs what you may assert and how you record it. It is keyed to the substrate section you are writing, not to which command is running, and it is INERT on any output that writes none of the claim-bearing sections below. Full contract and rationale: wos/active-epistemic-humility.md.
- When this applies. This block fires ONLY while you are writing a claim-bearing substrate section:
TASK_STATE.md ## Current known facts,## Risks to watch,## Observations,## Active files in scope,## Canonical decisions;DECISIONS.md ## Locked decisions;IMPLEMENTATION_PLAN.md ## Current gaps,## Risks and mitigations;IMPACT_ANALYSIS.md;EXTERNAL_RESEARCH.md;REFERENCES.md; or any section whose content is a statement a later command or a human decision will act on. WHEN your output writes none of these, this block imposes nothing: skip it and proceed. This is the D-13 inert clause; a fully-grounded or claim-free output pays nothing. - The unit is the load-bearing claim. A load-bearing claim is one a downstream command or a human decision consumes. A passing aside is not load-bearing; a statement someone will act on is. Apply the rest of this block per load-bearing claim, not per sentence.
- Ground it or abstain. Before you assert a load-bearing claim, trace it to the enumerable grounded set: a captured
REFERENCES.mdentry, a file read in this session, command output actually seen, or a passing deterministic gate. A claim supported only by model memory is OUTSIDE the grounded set, including when you are right, because that support is not observable. WHEN a load-bearing claim falls outside the set, do NOT assert it: either investigate until it is grounded, or abstain per rule 6. - Status records provenance, never confidence. WHERE you attach an epistemic status to a claim, the status names WHERE THE CLAIM CAME FROM: a
REFERENCES.mdentry title, a file path plus line, or the gate output it came from. It SHALL NOT express a degree of certainty. Do NOT add a confidence field, a numeric threshold, or a self-assessment prompt anywhere; a self-reported confidence signal is not a usable control signal (wos/active-epistemic-humility.mdPart 1.3). A status whose referent slot is empty is read as UNKNOWN, not as a weak yes. - Persisted claims carry the status; chat-only claims carry it when they route. Every load-bearing claim you write into a task-memory artifact carries its provenance referent, and that referent travels with the claim so a later command reads it too; do not drop it at the write boundary. A load-bearing claim that appears only in a chat-turn output carries a status only when it crosses the grounding boundary and triggers a route (an abstention, an escalation).
- Abstain as a routed continuation, never a bare refusal. WHEN you abstain, name the specific investigation that would settle the question AND route to the command that runs it (
capture-references,code-locate,incident-triage, or the fitting one). A withholding that stalls the work is invalid output. Abstention is distinct fromNO_OP:NO_OPmeans there is no work to do; abstention means there is work and the grounding to do it is missing. - An unfired gate is not evidence. The absence of a fired check does not mean grounding existed. Do not read silence here as a pass.
Grounded-residue termination
Grounded-residue termination. This block decides when a question-asking command stops investigating and what it emits when it does. It fires WHEN the command runs inside an automatic chain, meaning the session carries itself into the next Run now: rather than having each step retyped by a person (ADR-0186). An attended chain is one of these: a person is watching, but no step waits for them. WHEN a person is present and answering question by question, in an assisted run or outside an attended chain on a task branch, this block is inert: ask as the command already specifies and skip the rest. Companion to commands/_shared/claim-grounding.md, which governs what you may assert; this one governs when you may stop looking.
- Build the residue set before the first investigation, not after it. Enumerate the open question as typed load-bearing claims you cannot currently ground, one row per claim, and anchor every row to the ledger row it blocks under
## Requested deliverablesinTASK_STATE.md(ADR-0056). The ledger is the bar and it is written down before the loop starts, so the loop cannot lower it. A claim that blocks no ledger row is not residue: record it withcapture-observationand move on. WHEN the ledger section is absent, or its only row is the- none namedsentinel, anchor to the deliverables named in the taskREADME.mdinstead and say which of the two you used in the stop record. - Type every row by what would settle it. Four kinds, and they are the four members of the grounded set in
commands/_shared/claim-grounding.mdrule 3 restated as something you can check: REFERENCE (an external source), FILE (a path in the repository or the task folder), COMMAND (a run whose output you can read), GATE (a named deterministic check). The type is what names the investigation, so an untyped row is not yet a residue row. - One iteration is one pass: take the row blocking the most ledger rows, run the investigation its type names, then apply the resolution test in rule 5. A row that resolves leaves the set. A row that does not stays, carrying the investigation you already ran, so the next iteration has to pick a different one. Re-running an action that already failed is not an iteration.
- Exit on exactly one of five labeled conditions, evaluated in this order. The first that holds is the exit, and the rest are not evaluated.
- RESOLVED. The residue set is empty. Continue the chain.
- NO_PROGRESS. The last iteration closed zero rows AND issued no investigation action distinct from one already recorded against the set. This is not a stop: continue the chain with the residue recorded as open and
Run now:naming the command that would settle the top row. - BUDGET. The iteration count reached the per-tier cap in rule 6. An airbag, not a brake: reaching it means RESOLVED and NO_PROGRESS both failed to fire, and that is itself the finding worth reporting. This is not a stop either. The cap is this command's own loop ceiling, and a ceiling warns, records, and continues.
- ESCALATED. A row still open maps to one of the four reasons a chain stops: an act whose audience is not bounded (ADR-0200); a decision that changes what the product is; a cost or loop ceiling; a check of the work the agent cannot honestly run on itself. The loop ceiling in that list is the one BUDGET already handles, which is why BUDGET is evaluated first. What happens next depends on the run (ADR-0233): attended, on a task branch (spec
### Adaptive handoff), only reason 1 stops, and so under standing authorization (ADR-0244,wos/cross-cutting-workflow-guardrails.md ### Unattended sessions), where the reason-4 row is anunverified: <check>line inTASK_STATE.md ## Open questions / blockers. A reason-2 row routes todecision-interview, whose provisional mode records it underDECISIONS.md ## Provisional decisions; a host command writes that### P-Nitself only whenwos/substrate-peers.mdnames it on that row. A reason-4 row becomesNot verified: <check>inTASK_STATE.md ## Open questions / blockers. Either way the chain continues. A row that would settle only by dropping a named deliverable SHALL NOT be recorded as a provisional de-scope: recordNot delivered, needs you: <deliverable>: <what is undecided>there instead. Every other run stops on all four reasons as before, named inReason:, and an unattended run never self-locks. - ENVIRONMENT. A row still open needs something this session cannot supply: a credential, a device, a network, or a system you have no access to. Emit the terminal form (
Run now: nonewithMode: N/A, andReason:naming what would unblock it). ENVIRONMENT is not a fifth stop reason. It is the terminal form doing the job it was defined for (ADR-0126).
- The resolution test, applied to the referent and never to how good the answer feels:
- REFERENCE resolves when a
REFERENCES.mdentry for it exists carrying both a URL and an accessed date. - FILE resolves when the path plus line number exists on disk and you read it in this session.
- COMMAND resolves when the command line and its exit code are both present in this session's evidence.
- GATE resolves when a named gate ran and exited 0. A referent that does not resolve reads as UNKNOWN and its row stays in the set. UNKNOWN is not a weak yes, and a check that never fired is not evidence.
- REFERENCE resolves when a
- The cap is a DECLARED PLACEHOLDER, not a measurement. Until a run replaces it with an observed number, read it off the
Escalations:line ofTASK_STATE.md ## Recommended pipeline: none 2 iterations, one escalation 3, two or more 5, and 8 where the task declares a strict surface. Corrected 2026-09-16: this rule keyed on Express, Standard and Disciplined, names ADR-0207 retired in the same wave that created this block, so no cap was ever in force for any task opened after it. A blinded review loop ran five iterations before anyone noticed the ceiling it cited did not exist. The escalation count is what replaced the tier label and it carries the same ordering. These come from a doubling heuristic over a guessed typical depth, and no Fhorja run has been measured against them. Do not cite them as measured, and do not tune them by feel. Rule 7 emits the iteration count so a later measurement can set them from observation. - Emit one stop record on every exit, whichever one fired. One line each: the exit label; the iteration count reached; the cap in force for this tier; each row still open with its type and the ledger row it blocks; and, per open row, the investigations already attempted. On RESOLVED the last two lines are empty. The record belongs in
### Command transcript, and on ESCALATED or ENVIRONMENT it goes in the visible output as well, because those are the two exits where a reader has to act. - What this block does not contain, deliberately. There is no confidence field, no numeric certainty threshold, and no step where you rate how sure you are. Termination is decided by rule 4 over the residue set and by rule 5 over the referents, and both are checks against artifacts outside you. Self-assessed completion is the failure this replaces: among architectures that let the agent judge itself finished, false success accounts for 45 to 48 percent of failures on tau2-bench and 75.8 percent on AppWorld. ADR-0109 is what forbids the confidence field;
scripts/check-claim-grounding.shguards the three source surfaces of that doctrine and this block is not one of them, so here the rule is held by the reader rather than by a script.
Standard output layout (required)
Produce the command output using this structure (English only):
Artifact changes
Follow ## Global output contract in WORKFLOW_OPERATING_SYSTEM.md for APPLIED / PROPOSED / SKIP rules. Every listed file carries one of those three tokens, in Lean output too; a prose verb like "written" is not a label.
Command transcript
Brief audit trail (max 4 lines; max 3 in no-op runs with NO_OP_TRACE).
Handoff
Use the adaptive ending format of WORKFLOW_OPERATING_SYSTEM.md ## Global output contract. Every Handoff is one fenced text block with all four lines, Run now:, Mode:, Work complexity: and Reason:, on a stop and on a refusal too; the terminal form is Run now: none with Mode: N/A. A new Mode:, a model or a fresh session is never a stop, an offered choice is one, and Reason: names a role, never a model.
Definition of done (command output)
- Classifies the stuckness type and names what should stop being reopened.
- Recovery action is the smallest decisive step (not a new initiative).
TASK_STATE.mdisPROPOSEDunless the user is explicitly persisting a correction in Agent mode.- Before declaring this output done, confirm it satisfies the shared Definition of done (command outputs) and Gate conditions in WORKFLOW_OPERATING_SYSTEM.md.
Quality bar: Optimize for decisiveness, momentum recovery, correct phase routing, and low ambiguity.
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
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.

