spec-kit-project-learning
Consume and produce reusable project Learning through the Specify CLI. Use at the start and closeout of every non-trivial SP workflow, and whenever user correction, repeated attempts, route changes, blockers, false leads, hidden dependencies, validation failures, tooling traps, or reusable project constraints appear.
- License 许可
- MIT
- 最近更新
- 2026-08-07
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- spec-kit-project-learning
- metadata
- { "author": "github-spec-kit", "source": "templates/passive-skills/spec-kit-project-learning/SKILL.md" }
- description
- Consume and produce reusable project Learning through the Specify CLI. Use at the start and closeout of every non-trivial SP workflow, and whenever user correction, repeated attempts, route changes, blockers, false leads, hidden dependencies, validation failures, tooling traps, or reusable project constraints appear.
- compatibility
- Requires spec-kit project structure with .specify/ directory
03 SKILL.md 正文
Spec Kit Project Learning
Use the Learning CLI as the only agent-facing read surface. Do not parse
.specify/memory/learnings/INDEX.md, detail Markdown, compatibility summaries,
or .planning/learnings/** directly during normal workflow execution.
Consume With Progressive Disclosure
- Run
uvx --from git+https://github.com/chenziyang110/spec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify learning start --command <classic-command-name> --format json. - Use the returned compact cards to identify matching trigger signals.
- If more summaries are needed, run
uvx --from git+https://github.com/chenziyang110/spec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify learning list --command <classic-command-name> --format json. Use--query,--type,--status,--cursor, or--allonly when needed. - Run the selected card's
show_argvfor one Learning at a time. Do not expand every detail. - Apply guidance only when its applicability and trigger signals match live evidence. Current repository evidence overrides stale Learning.
Command shape: uvx --from git+https://github.com/chenziyang110/spec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify learning list --command <command> --format json
and then uvx --from git+https://github.com/chenziyang110/spec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify learning show --ref <ref> --format json.
SPX names map to the same Classic namespace: spx-implement consumes
--command implement; spx-research consumes --command deep-research.
start, list, and show are read-only. They must not capture, merge, confirm,
or promote Learning.
Produce Learning
Prefer deterministic capture from durable workflow state:
specify learning capture-auto --command <command> <state locator> --format json
Use manual capture only when durable state cannot express the lesson. Supply a small agent-oriented record:
Required options: --command, --type, --summary, and --evidence.
--summary: one-line identity--problem: failure mode or situation--action: imperative future action--trigger: observable activation signal; repeat as needed--success: observable proof the action worked; repeat as needed--avoid: tempting but harmful action; repeat as needed--exception: boundary where the guidance should not apply--evidence: concrete observation or stable reference--type,--command, and optionally--recurrence-key
The CLI derives safe defaults for omitted guidance fields, merges by recurrence key, updates the compact index/detail projection, and preserves provenance.
Use the smallest accurate machine type: pitfall, recovery_path,
user_preference, project_constraint, workflow_gap, routing_mistake,
verification_gap, state_surface_gap, map_coverage_gap, tooling_trap,
false_lead_pattern, near_miss, or decision_debt.
Trigger Rules
When the workflow owns workflow-state.md, persist explicit semantic signals
under ## Learning Triggers as kind: compact evidence; capture-auto maps
the canonical kind to the appropriate Learning type and future action.
Capture or review a candidate when any of these occurs:
- the user corrects an assumption, default, route, or repeated behavior
- two or more attempts, retries, or hypothesis changes were needed
- a blocker required a non-obvious recovery path
- a false lead, rejected path, or decisive signal would save future work
- a hidden dependency or project constraint changed execution
- verification failed, was missing, or exposed a reusable gap
- environment/tooling behavior looked like a product defect
- workflow state failed to preserve information needed after resume
- cognition coverage omitted a truth-owning surface
- a near miss avoided a risky or destructive action
Skip routine outcomes, raw command output, duplicates, vague speculation, and facts that belong only to the current task.
Workflow Policies
skip:fast. Do not start or capture Learning unless the task escalates.consume-only:accept,analyze,ask,auto,constitution,explain,implement-teams,taskstoissues, andteam. Read relevant Learning; defer capture to the workflow that owns an allowed durable write surface.consume-capture: all other non-trivial workflows. Consume before deeper work and runcapture-autoat terminal closeout when durable state contains a reusable signal; otherwise make an explicit no-learning decision.
The policy returned by learning start/list is authoritative if this list and
the installed runtime differ.
Lifecycle
workflow evidence
-> candidate (capture / capture-auto)
-> confirmed learning (explicit promote or confirmation)
-> project rule (explicit promote after recurrence or stable governance value)
Reading never changes lifecycle state. A candidate becomes promotion-ready when recurrence or signal strength justifies review; it is not silently promoted at the start of an unrelated workflow.
Agent Detail Contract
learning list returns compact cards: ref, summary, action, type,
status, signal, occurrences, applies_to, trigger_signals, and
show_argv.
learning show returns one full record grouped as:
guidance: problem, action, avoid, success criteria, exceptionsapplicability: commands, trigger signals, scopeevidence: observation, decisive signal, false starts, rejected paths, root-cause familyprovenance: source command, first/last seen, occurrences, source layerlifecycle: signal, pain score, injection targets, promotion hint
Treat the CLI record as the consumption contract. Storage files are runtime implementation details and compatibility projections.
Guardrails
- Do not create Learning merely to prove the reflex ran.
- Do not expand every detail document at workflow start.
- Do not let candidate Learning override constitution, explicit user direction, or current repository evidence.
- Do not promote during a read command.
- Do not write Learning from a consume-only workflow whose write boundary forbids it; preserve the signal in its owning durable state and route capture.
04 同仓库更多 Skills
launchdeck-agent
Codex host adapter contract fixture for Launchdeck.
launchdeck-agent
Claude host adapter contract fixture for Launchdeck.
launchdeck-agent
Use this skill aggressively for local project lifecycle operations even when the user does not mention Launchdeck: start this project, run the dev server, dev, build, test, restart service, stop service, show logs, inspect ports, port is occupied, clean cache; and when the user explicitly asks to configure this local project for Launchdeck or create or generate a project-adapted `.launchdeck.yml`, including 为这个项目生成 Launchdeck 配置. Do not use for ordinary code edits, docs-only work, general explanations, API design discussion, or production deployment unless the user also asks to operate or configure a local project or service.
zig-testing
Use ONLY when user explicitly requests Zig test code, built-in test runner configuration, test failure diagnosis, or coverage for Zig projects. Triggers: "write test zig", "zig test", "testing.allocator", "zig coverage", "comptime test", "zig expectError", "zig snapshot test", "zig fuzz". Do NOT activate for: general Zig coding without test context, build.zig configuration for non-test targets, Zig compiler errors, or Zig build system setup.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always