ワンクリックで
ln-spec
// Crystallize shared understanding into a reviewable spec, or update an existing one. Use when the problem needs a written specification, when assumptions or decisions have changed, or when the user says 'write a spec'.
// Crystallize shared understanding into a reviewable spec, or update an existing one. Use when the problem needs a written specification, when assumptions or decisions have changed, or when the user says 'write a spec'.
| name | ln-spec |
| description | Crystallize shared understanding into a reviewable spec, or update an existing one. Use when the problem needs a written specification, when assumptions or decisions have changed, or when the user says 'write a spec'. |
| argument-hint | [feature or problem to specify] |
Crystallize understanding into a spec — the reviewable decision record between shared agreement and actionable plan. Every section should close a decision; a spec that restates the conversation instead of narrowing the solution space has failed.
memory/SPEC.md plus memory/PLAN.md are the only canonical planning state. Do not spin up sidecar specs, decision logs, or assumption ledgers without explicit permission.
Skip steps that are unnecessary (e.g. already covered by prior skills in this session). This is not a checklist — it is a workflow.
The feature or problem: $ARGUMENTS
Mode detection. If the user provides a specific finding, research result, or decision to record — not a new feature area — this is a patch, not a full pass. Skip to step 5.
memory/SPEC.md exists, read it first — this is an update, not a blank-slate write.ln-grill if it hasn't already been run.ln-design if it hasn't already been run.memory/SPEC.md.Write or update memory/SPEC.md following the spec template. If the file already exists, read it first — preserve existing content, evolve sections that need change.
Before adding any new cross-referenceable item, derive the session's author suffix from the local user name: take basename "$HOME", then uppercase its first character. Example: /Users/lunelson → L. Append this suffix to every new item identifier: A47-L, D12-L, I47-L, etc.
When assigning the numeric part for a new item:
A, D, I, requirement/oracle prefixes if present).I47-L and I47-K.Depends on: D12-L, Proves: R3-L / D8-L).If $HOME is unavailable or the basename is empty, ask the user for the suffix instead of inventing one.
Use the mature SPEC shape unless the existing project clearly predates it and the user only asked for a narrow patch:
SPEC is a live register, not an archive. Keep stable product contract separate from live architectural uncertainty and future direction. Prefer short guardrails plus links to PLAN/design docs over long design-doc-scale prose.
ln-spec owns the inner loop of verification design: verification commands, verification policy, and inner-loop oracle items (type checks, fast unit tests, linting). Middle and outer loop oracle strategy, diagnostic assessment, and blind spots are owned by ln-oracles. Not every scoped slice requires a full oracle-design pass, but frontier items or slices involving LLM behavior, visual rendering, or compositional/system-level claims should route through ln-oracles before implementation. When writing or updating §Verification Design, preserve any content written by ln-oracles (§Verification Stance, §Diagnostic Assessment, §Oracle Strategy middle/outer tiers, §Design notes, §Acknowledged Blind Spots).
If memory/PLAN.md exists, verify that changed requirements, assumptions, decisions, and invariants still align with affected frontier items. If it does not exist yet, close the reference chain as far as current artifacts allow: assumptions should still name dependent decisions and validation approaches, and frontier links can be added later by ln-plan.
Use the same unit-of-record rules as ln-build §Same-item tests. Before adding a row, compare against nearby items in the same feature area. Prefer update, merge, or omit over add when the seam is the same.
Units of record:
Validated assumptions retire by default. If evidence settles an assumption, do not leave it live just as history. Either remove it during ln-sync, or promote the durable residue into Product Contract, Active Decisions, Critical Invariants, Lexicon, or PLAN traceability if it still constrains active work.
These are not new rows — they are updates, merges, links, or no-ops:
Smell checks before adding:
Large cleanup is ln-sync work. When writing or patching, keep the touched area coherent; do not attempt a risky whole-document consolidation.
Every amendment must close its reference chain as far as the current lifecycle stage allows. After editing, verify:
memory/PLAN.md if memory/PLAN.md already existsmemory/PLAN.md if known (or scoped slice if already defined), protecting test/oracle (or planned / manual (outer loop)), proved decision or requirementAfter filing the spec, present these options to the user (use tool-ask-question):
| # | Label | Target | Why |
|---|---|---|---|
| 1 | Plan frontier | ln-plan | Spec is complete, break it into frontier items |
| 2 | Design oracles | ln-oracles | Spec needs middle/outer loop verification design |
| 3 | Grill it more | ln-grill | Spec has gaps that need deeper understanding |
| 4 | Back to triage | ln-consult | Direction needs reassessment |
Recommended: 1 (then 2 after planning, or 2 now if verification is the pressing concern)
Adapted from mattpocock/skills/write-a-prd.
Lightweight triage for the ln-* skill set. Use when unsure which ln skill to use next, starting work on something new, or when the user asks for guidance on their development process.
Explore radically different module shapes before committing to one. Use when choosing an API surface, deciding what a module hides vs exposes, or when the user says 'design it twice'.
Collapse meaningful ambiguity with contrastive examples. Use when a plan/design has several plausible meanings, requirements feel vague, examples would clarify intent faster than grilling, or the user asks to disambiguate, find ambiguity, use behavioral kernels, or ask contrastive questions.
Audit code quality focusing on deep modules, naming, model hygiene, and architectural clarity. Use after a burst of development, when codebase structure needs assessment, or to make code more agent-navigable.
Refresh `memory/SPEC.md` and `memory/PLAN.md` in mature mode — restore canonical truth, archive retired plan history, delete stale derivative artifacts, and flag drift against code.
d3k assistant for debugging web apps