com um clique
ln-sync
// 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.
// 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.
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'.
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.
d3k assistant for debugging web apps
| name | ln-sync |
| description | 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. |
Audit and refresh the canonical documents so they stay lightweight enough for fast re-entry.
ln-sync is the family-wide ontology repair and garbage-collection pass. Merge equivalent facts, repair stale references, and delete exhausted derivative artifacts. Only docs/archive/PLAN_HISTORY.md acts as archive history.
Apply the repo's pre-release posture: optimize canonical memory for the model we now believe in, not compatibility with stale docs. Retire superseded claims, delete obsolete derivative artifacts, and tighten lexicon drift instead of preserving historical aliases in active truth.
Prefer ln-sync at these moments:
memory/SPEC.md or memory/PLAN.md feels overweight| File | Authority | Keep live |
|---|---|---|
memory/SPEC.md | what and why | product contract, live architecture register, future direction pointers, lexicon, verification stance |
memory/PLAN.md | what's next | sequencing, frontier definitions, near-horizon items, recent completions |
docs/archive/PLAN_HISTORY.md | historical ledger | older completed phases and retired plan history |
HANDOFF.md | derivative volatile transfer | only unfinished chat state not yet reconciled |
memory/CARDS.md | derivative execution queue | only unfinished prepared scope cards inside one frontier item |
memory/REFACTOR.md | derivative temporary execution plan | only unfinished refactor steps |
If either memory/SPEC.md or memory/PLAN.md is missing, route to ln-spec or ln-plan first.
Ask whether each file is still serving re-entry.
memory/SPEC.md is carrying embedded truths, old implementation detail, closed historical debates, or validated assumptions that no longer shape frontier work, prune it.memory/PLAN.md is mostly completed history, collapse it to a rolling frontier and archive the rest.HANDOFF.md, memory/CARDS.md, or memory/REFACTOR.md no longer carry live temporary state, delete them.Use the mature SPEC shape as the target unless the project has an explicit alternate shape:
For each item in memory/SPEC.md, choose one:
Validated assumptions retire by default. Promote the durable residue only when it still constrains active work: product facts go to Product Contract, architectural authority goes to Active Decisions / Critical Invariants, vocabulary goes to Lexicon, and sequencing implications go to PLAN.
Do not remove durable seam rationale merely because code and tests now exist. Prune micro-decisions, not the architectural spine.
Merge equivalent assumptions, decisions, and invariants instead of carrying parallel rows for the same seam-level fact. When rows merge or move, repair the references that point at them.
When pruning, leave concise HTML comments naming removed IDs when useful. Do not renumber survivors.
Prefer the conflict-resistant mature shape:
ContextSequencing
ActiveNextParallel / Low-conflictHorizonFrontier DefinitionsRecently CompletedDependenciesRules:
ln-scope / ln-build, usually inside one frontier itemSequencing for ordering/status churn; do not move or rewrite Frontier Definitions merely to reorder workmemory/PLAN.md; use memory/CARDS.md for temporary slice execution queues and at most a lightweight pointer from the frontier definitiondocs/archive/PLAN_HISTORY.mdWhy now / unlocks context that a fresh thread can understand frontier ordering without reading the full archiveScan recent code / commits for:
memory/SPEC.mdmemory/PLAN.md sequencing or frontier definitionsmemory/PLAN.md and memory/SPEC.md, especially PLAN links to retired assumptions / decisions / invariantsmemory/CARDS.md that should be retired, re-scoped, or reconciled into the next thread's live stateDelete exhausted temporary artifacts after their useful state has been reconciled:
HANDOFF.md files instead of preserving them as archive breadcrumbsmemory/CARDS.md queues instead of letting old prepared cards masquerade as live workmemory/REFACTOR.md files instead of leaving completion notes or pointersProduce a concise sync report and make the edits.
## Sync Report
### Pruned
- [items removed, merged, or moved and why]
### Archived
- [history moved to PLAN_HISTORY.md]
### Garbage-collected
- [temporary artifacts deleted and why]
### Drift fixed
- [concept / decision / frontier / traceability updates made]
### Retirement assessment
- [whether embedded items were sufficiently retired, or whether a stronger protocol / follow-up frontier is needed]
### Remaining live items
- [important assumptions or frontier work that still matter]
After sync, present these options to the user (use tool-ask-question):
| # | Label | Target | Why |
|---|---|---|---|
| 1 | Scope next item | ln-scope | Docs are current and the next slice is ready |
| 2 | Revisit the plan | ln-plan | Sync changed priorities or exposed new frontier work |
| 3 | Back to triage | ln-consult | Direction needs reassessment |
Recommended: 1 if the frontier is still sound, 2 if sync materially changed it.