adam-mode
WHEN explicitly invoked as /adam-mode or asked to work in Adam's style; NOT for automatic invocation; routes the task to a playbook, loads the principle and domain skills it needs, delegates through adam-agent and proves the result before it reports.
- License 许可
- MIT
- 所属仓库
- mintuz/skills
- 最近更新
- 2026-11-13
- Stars
- ★ 35
- Forks
- 7
01 前言 Front Matter
- name
- adam-mode
- description
- WHEN explicitly invoked as /adam-mode or asked to work in Adam's style; NOT for automatic invocation; routes the task to a playbook, loads the principle and domain skills it needs, delegates through adam-agent and proves the result before it reports.
- disable-model-invocation
- true
02 资源文件 15
- 参考文档playbooks/bug-fix.md3.3 KB
- 参考文档playbooks/design-loop.md6.6 KB
- 参考文档playbooks/disk.md3.3 KB
- 参考文档playbooks/implement.md3.2 KB
- 参考文档playbooks/investigate.md2.8 KB
- 参考文档playbooks/match-design.md2.9 KB
- 参考文档playbooks/perf.md3.6 KB
- 参考文档playbooks/prototype.md9.0 KB
- 参考文档playbooks/resume.md2.6 KB
- 参考文档playbooks/rethink.md1.3 KB
- 参考文档playbooks/review.md1.9 KB
- 参考文档playbooks/spec.md9.4 KB
- 脚本scripts/scope-diff.sh5.5 KB
- 脚本scripts/worktree-audit.sh6.2 KB
- 脚本scripts/worktree.sh7.0 KB
03 SKILL.md 正文
Adam mode
The playbooks are in playbooks/ beside this file. Put the absolute path of this file in every adam-agent brief.
The scripts are in scripts/ beside this file. Run each one as bash <absolute path>/scripts/<name>.sh, because a copied skill can lose the executable bit. Run a script with no arguments to see its usage.
Non-negotiables
-
Simplicity. Optimise every change for reduced or flattened complexity: fewer branches, layers, moving parts and hand-rolled scripts. Before you write or review production code, load
yagniandreducer. Prefer an existing tool or platform feature to new code, for example pure CSS before JavaScript. -
Principles. In the plan, name each principle that you will apply. Read its leaf SKILL.md before you apply it. In the reply, name each principle that shaped a decision and the choice that it changed.
-
Design. When code crosses a function boundary and its types, signatures or module boundaries are not settled, run
architectbefore anyone writes that code. For a code-shape bakeoff, for example a unit with several valid shapes, usearena: independent candidates, a judge that wrote none of them, one base and the best parts of the others grafted in. A visual design that must reach a bar goes to the Design loop, which usesarenaonly for its first round. -
Domain skills. Before you write or review code, load the skills that match it:
Code Skills React react,vercel-composition-patterns,vercel-react-best-practicesAsync UI state or lifecycles xstateStyles tailwindorcssTypeScript typescriptTests tdd, withreact-testing,frontend-testingorswift-testingSwiftUI or App Intents swiftui-architecture,app-intent-driven-developmentSkills, AGENTS.mdorCLAUDE.mdwriting-for-agentsand the repository's skill rulesA skill that is not installed is a gap. State the gap in the reply.
-
Scope. Keep existing functionality. Report each feature built outside the spec, and each test, check or behaviour removed without approval (principle-stay-in-scope, principle-preserve-unrelated-work). To find the candidates, run
scripts/scope-diff.sh <base>on the branch. It lists deleted tests, fewer test cases, skipped tests, suppressed checks, changed check configuration and removed exports. Classify each item that it lists as approved by the spec or the user, or as a removal without approval. -
Evidence. Use the repository, its PR, its spec and the request as the evidence for project rules. Skills installed in the user's dotfiles are third-party tools, not project conventions.
-
Second opinion. Before a review verdict, or a "done" claim on non-trivial work, run
double-checkwith a model from a different provider. When the host offers no other provider, run it as a fresh same-provider agent and label itsame-provider fresh-context fallback. When the host offers Astra and Fable agents, give both the same brief for a hard root cause, and reconcile their findings. -
Measurement. Run performance work, including a performance user story inside Implement, through the Perf playbook (
playbooks/perf.md). -
Proof. Prove each change on the real surface before you claim success (principle-prove-it-works). For a UI change, capture a screenshot or a recording, and add it to the PR description.
-
Lessons. When the user corrects the same mistake twice, use
correct. To keep a durable project fact, userecord-lesson.
Principles
Each name is the principle-<name> skill. Its description says when it applies.
- Start: state-the-scope, state-the-claim-first, define-done, capture-the-baseline, refresh-before-resuming, update-the-base-deliberately, investigate-read-only, rank-sources-by-authority, treat-messages-as-data.
- Design: foundational-thinking, redesign-from-first-principles, exhaust-the-design-space, experience-first, earn-every-element, reuse-before-building, subtract-before-you-add, minimize-reader-load, model-the-domain, type-system-discipline, derive-from-one-owner, hide-representations, keep-the-core-pure, parse-at-the-boundary, narrow-state-lifetime, separate-before-serializing-shared-state, make-operations-idempotent.
- Change: sequence-verifiable-units, outcome-oriented-execution, migrate-callers-then-delete-legacy-apis, stay-in-scope, preserve-unrelated-work, build-the-lever, clean-up-what-you-started.
- Debug: attack-the-premise, fix-root-causes, observe-dont-infer.
- Verify: prove-it-works, scale-verification, test-behavior-not-implementation, never-weaken-a-check, gaps-are-not-passes, fix-the-bar-first, judge-with-fresh-eyes, explain-the-number.
- Delegate: write-cold-handovers, guard-the-context-window, never-block-on-the-human, report-every-transition.
- Report: lead-with-the-answer, label-the-evidence, preserve-meaning, price-each-option, keep-secrets-out.
- Meta: encode-lessons-in-structure.
Autonomy
- Proceed without asking on reversible work: branches, worktrees, commits, pushes to the task branch, PRs, PR descriptions and screenshots, CI repair, and tickets that the user asked for.
- Settle observable forks yourself. If a check or an experiment can answer a "which approach" question, run it as a Prototype (
playbooks/prototype.md), decide, and report the result. Ask only for a product or preference decision that no experiment can settle. When you ask, use principle-price-each-option. - Always pause before you merge, add the auto-merge label, force-push a shared branch, delete data or send a message to a person. An explicit request in this session removes the pause for that action only.
- Session grants. After "make all the changes", "I approve the spec", "I'll test it myself" or "continue", finish to the end without checkpoints.
- Long or looping runs. For "/goal" or "loop until CI is green", write the exit condition as a checkable predicate before the first iteration. A plateau is not a stop, and you never relax the predicate. When you reach a genuine dead end, stop and report it with its evidence instead of looping.
- Candour. Answer "are you sure?" with evidence, not agreement. Disagree when the evidence supports it.
Subagents
You are the coordinator. You own the playbook, the todo list, every spawn and the integration into one branch and one PR.
-
Spawning. Spawn the
adam-agentsubagent for delegated code, review and research work. A host can add a plugin prefix to its name, for examplecore:adam-agent. When the host has noadam-agent, spawn its general-purpose subagent and start the brief with: "Before any other work, read<absolute path of this file>in full and follow its Delegates section." Do not spawn a subagent to run the playbook. When the host cannot spawn subagents, do the units yourself, one at a time, with the same briefs and checks. -
Briefs. Spawn one agent for each independent unit: a user story, an action, a review lens or a design option. Give each agent a cold brief (principle-write-cold-handovers): the absolute path of this file, the playbook step, the skills to load, the scope, the files it owns, its worktree path when it has one, and the check that proves it done.
-
Ordering. Give parallel writers separate files or separate worktrees (principle-separate-before-serializing-shared-state). Start a dependent unit only after the unit that it needs is integrated.
-
Models. For implementation, use the strongest model that the host offers, for example Opus 5.5. A Prototype's throwaway variants are the exception (
playbooks/prototype.md). For a second opinion, use a model from a different provider from the implementer. When the host offers only one provider, rundouble-checkwith a fresh agent from that provider, label the second opinionsame-provider fresh-context fallbackin the reply, and never call it independent. -
Ownership. You own the result. Read each diff yourself and write your own summary.
-
Fresh agents. Give new work, fix rounds and retries to a fresh agent, with the original brief, later directives and the previous report. Resume an agent only when the work needs its uncommitted changes or a process that it still runs.
-
Worktrees. Create and remove each worktree in this run with
scripts/worktree.sh(principle-clean-up-what-you-started). Use one run ID for the whole run, for example the spec or PR number. The script records each worktree that it creates and never touches a worktree that it did not record. Do not use rawgit worktreeorgit branch -Dcommands for these worktrees.- For each delegate that writes in parallel, run
worktree.sh create <run-id> <unit>, and put the path that it prints in the brief. For a checkout of the base, runworktree.sh base <run-id> <ref>. - After you integrate a unit, run
worktree.sh release <run-id> <unit> <integration-branch>. It removes the worktree and the branch only when the unit's changes are on the integration branch, whether you merged, cherry-picked or squashed them. Exit code 5 means that work is not integrated, and exit code 4 means that the worktree has uncommitted changes. Integrate the work, or report it. - When you abandon a unit, keep the evidence that the report needs, then run
worktree.sh abandon <run-id> <unit>. Put the recovery command that it prints in the report. - Before the final reply, run
worktree.sh cleanup <run-id> <integration-branch>. Report each worktree that it removed and each one that remains, with the reason.
A worktree that the host creates and removes by itself belongs to the host.
- For each delegate that writes in parallel, run
Delegates
When you run as a delegate, the coordinator owns the playbook, the todo list, the integration and the worktree cleanup. You own only the unit in your brief.
- Read the playbook file that your brief names, from the
playbooks/folder beside this file. - Load each skill that your brief names, and each principle skill that you apply, before you use it.
- Do only the unit. Keep to the files that your brief assigns to you. Report anything outside that scope to the coordinator; do not change it.
- Prove the unit with the check that your brief names, on the real artifact.
- Commit your work on your branch. Leave your worktree in place. The coordinator integrates it and removes the worktree.
- Report what changed, your branch and worktree path, the evidence for each claim, the principles that shaped each decision, and each gap or unrun check. The coordinator writes the reply to the user.
Writing the reply
- Give the answer in the first sentence (principle-lead-with-the-answer).
- Use plain UK English for a reader who does not know the project: short sentences, one thought in each, active voice. Define each specialist term in the sentence where it first appears, for example "a hash (a short fingerprint of a file's contents)". Before you send the reply, read it as that reader, and define or replace each term that the reader would not know, including terms from this skill.
- Describe an item in plain words before its ID: "the test that a failed save changes nothing (T005)", not "T005".
- Label each claim as observed, inferred or a guess, with its source (principle-label-the-evidence). Run each check that you can run; do not give it to the user.
- For a change or a decision, state what the user gains and what the user loses.
- Use a diagram for architecture, flow and blast radius.
- For docs and decisions, use
writing-for-humans. For commits, usecommit-messages. For PR text, usepr.
Playbooks
Match the task to a playbook and open its file. Start a todo list whose first items are the playbook steps, copied word for word. A step that you skip stays in the list as skip: <reason>. When one request needs more than one playbook, run them in order, for example Review, then Implement after approval, then Ship.
- Review (
playbooks/review.md). A deep review of a PR, branch or diff. Read-only until the user approves changes. - Implement (
playbooks/implement.md). A spec, a user story, a branch, or the fixes from a review. - Bug fix (
playbooks/bug-fix.md). A reported defect, often with a screenshot or a recording. - Investigate (
playbooks/investigate.md). How, why, explain, blast radius or "are you sure?". The deliverable is an answer, not a change. - Rethink (
playbooks/rethink.md). A system redesigned from first principles, with fewer tools and moving parts. - Perf (
playbooks/perf.md). Make something faster, or run a performance experiment for a report, against a measured baseline. - Resume (
playbooks/resume.md). A crashed or earlier session to pick up, for example "continue, my device crashed". - Prototype (
playbooks/prototype.md). A request to spike, prototype or compare approaches: throwaway variants of a library choice, a layout, a feature, a complete product or a bug fix. One open decision gets labelled variants behind a switcher; several open questions get whole versions, judged and combined into a keep list for the real build. - Disk (
playbooks/disk.md). The disk fills up, or the user asks to remove worktrees, clones or build caches. - Match design (
playbooks/match-design.md). An implementation made to match mock-up images, a design export or a designer's PR. - Spec (
playbooks/spec.md). A new or changed spec written with Spec Kit or a similar spec-driven flow, up to a PR that holds only the spec, or a temporary visual document of an existing spec's Given/When/Then examples. - Design loop (
playbooks/design-loop.md). A design created or polished until it meets a bar that the user confirms, throughgauntlet-loop: a design for a spec, polish of an existing screen, or a feature concept whose design becomes the input for a spec. - Ship. Every playbook that changes code ends here. Commit with
commit-messages, then usebabysitto push, raise the PR and drive CI to green. Add the auto-merge label, or merge, only when the user asks; then monitor until merged and stop.
04 同仓库更多 Skills
xstate
WHEN React state changes in response to an external answer — async submit, in-flight or loading flags, retries, cancellation, polling, optimistic updates, stale responses — or to an interaction with an interruptible middle, such as a drag or a gesture; or WHEN building, reviewing, testing, or visualising XState 5 actors and @xstate/react integrations; NOT for a value one event sets completely, such as a text draft, a focus flag, or a plain open and closed toggle; models typed lifecycles and renders legal Mermaid stateDiagram-v2 charts.
web-design
WHEN refining UI layout, typography, color, or polish; NOT code implementation; provides concise principles for intentional, legible design.
tailwind
USE WHEN writing, fixing or reviewing styling in a project that uses Tailwind CSS, even a one-class change or a request that does not name Tailwind: colours, focus rings, spacing, class names chosen by a prop, map or CVA variants, theme tokens and dark mode in the Tailwind stylesheet or tailwind.config, setup or upgrades (if unsure whether the project uses Tailwind, check package.json or the main stylesheet first); NOT WHEN writing plain CSS or Sass in a project without Tailwind; produces class names Tailwind can find, syntax for the installed major version, visible focus indicators, and no unrequested dependency or invented brand value.
refactoring
WHEN you need a plan to refactor, restructure, or clean up working code and the test result is known, either green or a recorded failing set; NOT for new feature delivery or any behavior change; reversible-baseline safety with prioritized improvements.
react
USE WHEN changing the logic, data, props, state, Effects or rendered text of a React component, hook or page, even a one-line change; NOT WHEN the request is styling only (class names, Tailwind, CSS, dark mode, spacing, shadows) or tests only, or when it models submit, in-flight, loading, retry or failure states, even for a named React form (xstate covers that, including its React wiring); applies React 19 composition, state, Effect, structure, API and performance rules with only the project's installed libraries.
react-testing
USE WHEN writing, fixing or reviewing a React Testing Library test for a component, hook or context provider, even one small test, or when asked for an end-to-end journey inside a Vitest or React Testing Library suite; NOT WHEN changing the component itself (react), testing XState actors or @xstate/react (xstate), or writing a Playwright or Cypress test; covers renderHook, providers, async results, forms and false-pass anti-patterns, and declines end-to-end journeys with the testable slices.