autoresearch
Autonomous goal-directed iteration loop: modify, verify, keep/discard against a metric or a checkable success predicate, with…
Document a recently solved problem or durable project vocabulary in docs/solutions/ or CONCEPTS.md. Use when capturing a learning after work.
$ npx -y skills add leo-kuang-ai/spec-first --skill spec-compound --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/spec-compoundContext preview
The summary Claude sees to decide when to auto-load this skill.
Document a recently solved problem or durable project vocabulary in docs/solutions/ or CONCEPTS.md. Use when capturing a learning after work.
name: spec-compound description: Document a recently solved problem or durable project vocabulary in docs/solutions/ or CONCEPTS.md. Use when capturing a learning after work. argument-hint: "[optional: brief context] [mode:headless] "
Document a recently solved problem through role-based research; use parallel subagents only when dispatch is explicitly authorized and callable, otherwise run the same roles inline or serially.
Captures problem solutions while context is fresh, creating structured documentation in `docs/solutions/` with YAML frontmatter for searchability and future reference. Authorized dispatch can parallelize read-only research; correctness does not depend on it.
**Why "compound"?** Each documented solution compounds your team's knowledge. The first time you solve a problem takes research. Document it, and the next occurrence takes minutes. Knowledge compounds.
spec-compound # Document the most recent fix spec-compound [brief context] # Provide additional context hint spec-compound mode:headless # Non-interactive run for automations spec-compound mode:headless [context] # Non-interactive run with context hint
**One learning per run.** The workflow's grounding, overlap detection, and cross-referencing all assume a single solved problem. When a session produced multiple distinct learnings, run the skill once per learning, sequentially — each run grounds fresh against the tree. Do not batch several learnings through one run and stitch cross-references between the drafts afterward; drafting-context numbering ("Learning 3") leaking into written docs is the failure this rule prevents.
If invoked specifically to create or bootstrap `CONCEPTS.md` from scratch rather than to document a solved problem, do not run the normal phases — `spec-compound` populates `CONCEPTS.md` only as a side effect of documenting a real learning (it seeds the *learning's area*, not the whole repo; see Phase 2.4). Repo-wide concept-map creation is `spec-compound-refresh`'s job. Redirect a standalone bootstrap request to `spec-compound-refresh` (which asks whether to build the concept map or run a refresh cycle), then exit.
Check the invocation arguments supplied by the current host for the exact `mode:headless` token. Tokens starting with `mode:` are flags, not context — strip only recognized mode tokens while preserving the remainder, quoted paths, and token order before treating it as the brief context hint.
| Mode | When | Behavior | |------|------|----------| | **Interactive** (default) | No mode token present | Auto-pick Full vs Lightweight and report the choice; run the Full-mode session-history probe only with explicit restricted-read authorization; prompt for Discoverability Check consent; end with a plain summary (no "What's next?" menu) | | **Headless** | `mode:headless` in arguments | No blocking questions. Run **Full mode without session history**. Report discoverability gaps without editing instruction files. Skip Phase 2.46 optional candidate enhancement. End with a structured terminal report — no "What's next?" menu. |
Headless mode is intended for automations and skill-to-skill invocation where no human is present to answer questions. The doc itself is identical to what an interactive Full run would produce — classification work (track, category, overlap) follows the same rules and writes nothing extra into the artifact. Once detected, headless mode applies for the entire run.
**Git branch (pre-resolved):** !`git rev-parse --abbrev-ref HEAD`
If the line above resolved to a plain branch name (like `feat/my-branch`), use it in Phase 1 session-history filtering so the orchestrator does not waste a turn deriving it. If it still contains a backtick command string, shows an error, or is empty, derive the branch at runtime.
**Repo root (pre-resolved):** !`git rev-parse --show-toplevel`
If the line above resolved to an absolute path, use it as the session-history repo filter in Phase 1. If it still contains a backtick command string, shows an error, or is empty, derive the repo root at runtime with the shell tool (`git rev-parse --show-toplevel`, falling back to the working directory outside a git repo).
These files are the durable contract for the workflow. Read them on-demand at the step that needs them — do not bulk-load at skill start.
把 AI coding 会话变成可信、由项目拥有的变更。 spec-first 是面向 Claude Code、Codex、Kiro、Qoder、Cursor、OpenCode、ZCode 与 Pi 的仓库原生 AI Coding Harness。它把想法、需求、计划、代码、审查和知识连接成可检查的工程闭环。
Autonomous goal-directed iteration loop: modify, verify, keep/discard against a metric or a checkable success predicate, with…
Audit mobile App PRD/Figma/local-source consistency across page routes, KMP/Clean Architecture, components, analytics, i18n,…
Explore vague or ambitious ideas into a right-sized requirements-only unified plan. Use when the user wants to brainstorm, think…
Structured code review for bugs, regressions, tests, and standards. Report-only by default; apply fixes only when the current…
Internal landing helper for public workflows that already hold explicit commit and landing authorization; commits scoped changes,…
Internal commit helper for public workflows that already hold explicit commit authorization; creates scoped, value-communicating…