Merge remote-tracking branch 'origin/master' into worktree-nih-dependency-audit
This commit is contained in:
64
.agents/skills/dsh-archive-agent-notes/SKILL.md
Normal file
64
.agents/skills/dsh-archive-agent-notes/SKILL.md
Normal file
@@ -0,0 +1,64 @@
|
||||
---
|
||||
name: dsh-archive-agent-notes
|
||||
description: Use when auditing, pruning, archiving, restoring, or reviewing Agent Notes in deepseek-harness; classifies implemented notes by future decision value, deletes rejected notes that no longer prevent a tempting fallacy, and applies the frozen archived/{kind} triplet and manifest contract.
|
||||
---
|
||||
|
||||
# Archive DeepSeek Harness Agent Notes
|
||||
|
||||
Reduce the active decision corpus without erasing history that can still guide work. Judge every note semantically; word count and age are discovery aids, never archive criteria.
|
||||
|
||||
## Read the contracts
|
||||
|
||||
Read [the Agent Note contract](../../notes/README.md), [the archive instructions](../../notes/archived/AGENTS.md), and the applicable active lifecycle instructions before classifying. Use current code, configuration, package docs, generated catalogs, newer Agent Notes, and inbound links to establish whether a rationale still owns or constrains anything.
|
||||
|
||||
## Classify by future value
|
||||
|
||||
Apply these lifecycle-specific outcomes:
|
||||
|
||||
- **Implemented — keep active:** retain a note when its rationale, alternatives, negative guarantees, durable/wire semantics, ownership boundary, security rule, or reintroduction condition is likely to guide a future change. Length does not matter.
|
||||
- **Implemented — archive:** archive a note when the shipped decision is complete and its body is unlikely to guide future work, such as one-off UI chrome, a narrow adapter, a minor closed bug, superseded implementation detail, or process history whose current contract is obvious elsewhere.
|
||||
- **Proposed — never archive:** keep a live proposal active; if it is no longer worth pursuing, reject it with an honest reason and satisfy the rejected lifecycle format.
|
||||
- **Rejected — keep only as a guardrail:** retain a rejection only when the losing proposal remains a tempting, meaningful mistake and the note explains why it loses.
|
||||
- **Rejected — delete:** delete the whole triplet when the rejected idea is obsolete, superseded, no longer plausible, or unlikely to prevent re-litigation. Repair or delete inbound links.
|
||||
|
||||
Do not archive toward a quota. Inspect every note in scope, classify analogous groups under one principle, use best judgment for close cases, and record genuinely borderline decisions for the handoff.
|
||||
|
||||
## Calibrated examples
|
||||
|
||||
These examples set the bar; the word counts demonstrate that size is not the test.
|
||||
|
||||
Archive implemented notes such as:
|
||||
|
||||
- collapsed sidebar control rail — 533 words: closed, minor UI behavior;
|
||||
- Commander argument adapter — 1,498 words: substantial implementation detail with little future design leverage;
|
||||
- documentation graph atlas — 920 words: completed documentation machinery whose current generators are authoritative.
|
||||
|
||||
Keep implemented notes such as:
|
||||
|
||||
- event-sourced sessions — 248 words: foundational authority and durability boundary;
|
||||
- single Harness-home resolver — 596 words: cross-product ownership rule;
|
||||
- project session directories — 628 words: durable storage and identity policy;
|
||||
- parallel pre-push gates — 400 words: borderline, but still guides gate scheduling and resource tuning;
|
||||
- dropped image content block — 334 words: keep until multimodal support lands, because it states the coordinated reintroduction condition.
|
||||
|
||||
For rejected notes:
|
||||
|
||||
- keep folding the compaction package split — 426 words: the package-boundary temptation remains meaningful;
|
||||
- delete streaming workflow progress through tool calls — 972 words: its ACP/UI premise is obsolete;
|
||||
- delete dropping ACP terminal metadata — 362 words: the later automation-only ACP decision resolved the question.
|
||||
|
||||
## Archive one implemented triplet
|
||||
|
||||
1. Move the complete `foo.md`, `foo.zh.md`, and `foo.i18n.yaml` triplet from `implemented/<kind>/` to `archived/<kind>/`; `implemented` is deliberately absent from the archive path.
|
||||
2. Make no body edits. Insert only `Archived: YYYY-MM-DD` immediately below `Status: implemented` in both language files, using the archival date and the same value on both sides.
|
||||
3. Re-record the sidecar hashes mechanically for the two metadata-only edits. Do not translate, reformat, update facts, or repair links inside the note.
|
||||
4. Search for inbound links from active prose. Redirect them to current authority, retarget them to the archived path only when the historical snapshot is intentionally cited, or delete them. Never verify or repair links out of the archived note.
|
||||
5. Run `pnpm run verify-archived-agent-notes --write`. Its append-only mode first proves every existing seal still matches, then adds only the new triplet hashes. Run the normal verifier afterward.
|
||||
|
||||
After the triplet is sealed, never edit, move, translate, reformat, or delete it. Archived notes remain valid inbound-link targets but are historical snapshots, not authority for current behavior.
|
||||
|
||||
## Validate and report
|
||||
|
||||
Run the archive verifier's focused test, `pnpm run verify-archived-agent-notes`, `pnpm run doc-sync`, `pnpm run lint`, and `git diff --check`; select any additional evidence through [dsh-pre-push-checks](../dsh-pre-push-checks/SKILL.md).
|
||||
|
||||
Report active implemented notes kept, implemented notes archived, rejected notes kept/deleted, proposed notes rejected if any, and every genuinely borderline case with its word count and chosen outcome. Do not claim archived outbound links are valid: the contract intentionally never checks them.
|
||||
@@ -0,0 +1,4 @@
|
||||
interface:
|
||||
display_name: "Archive Agent Notes"
|
||||
short_description: "Audit and freeze low-value Agent Notes"
|
||||
default_prompt: "Use $dsh-archive-agent-notes to audit Agent Notes, archive low-future-value implemented records, and delete low-value rejected records."
|
||||
@@ -13,6 +13,7 @@ The contract lives in [docs/AGENTS.md](../../../docs/AGENTS.md). This workflow c
|
||||
- [.agents/notes/README.md](../../notes/README.md) — when a decision earns an Agent Note, how to file it, and what goes inside one (the header block, per-lifecycle skeleton, and Alternatives-considered mandate, gated by `verify-agent-note-format`); [docs/postmortem/README.md](../../../docs/postmortem/README.md) — when an incident earns a postmortem.
|
||||
- [docs/i18n/README.md](../../../docs/i18n/README.md) — the bilingual pairing contract; editing either side of a pair obligates the counterpart in the same change.
|
||||
- Root [AGENTS.md](../../../AGENTS.md) — the standing orders whose budget discipline this skill protects.
|
||||
- [Archived Agent Notes](../../notes/archived/AGENTS.md) — frozen historical snapshots excluded from editorial maintenance and evolving documentation gates.
|
||||
|
||||
## Placing content
|
||||
|
||||
@@ -35,6 +36,8 @@ The audit is a hunt for the standard's slop checklist, cheapest probes first. Es
|
||||
6. In `implemented/` Agent Notes, remove migration plans, acceptance-task checklists, and future-tense spec language. Keep concise verification contracts that identify the behaviors and tiers pinning the shipped decision, plus named coverage gaps.
|
||||
7. If removing prose changes a promised behavior rather than its explanation, use a proposed Agent Note first (follow [dsh-find-simplifications](../dsh-find-simplifications/SKILL.md)).
|
||||
|
||||
Exclude `.agents/notes/archived/` from corpus audits and edits. Active prose may repair, redirect, or delete an inbound link, but never follow an archive-wide cleanup into the frozen target.
|
||||
|
||||
Keep every load-bearing rule, preferably as one to three lines plus a link to its rationale. Cut stories, duplicates, status notes, and the path used to derive the rule. Do not create a new explanation merely to relocate disposable reasoning.
|
||||
|
||||
## When verify-doc-budgets goes red
|
||||
|
||||
@@ -82,6 +82,8 @@ Reject or downgrade a candidate when:
|
||||
|
||||
Audit the Agent Note tree when the user asks to reduce or coalesce it, or when the simplification being implemented makes an owning note obsolete. Do not expand every code-simplification survey into a repository-wide note audit.
|
||||
|
||||
Use [`dsh-archive-agent-notes`](../dsh-archive-agent-notes/SKILL.md) for retention judgment and archive mechanics. Low-future-value implemented notes move as frozen triplets to `archived/{kind}`; proposed notes are never archived; rejected notes that no longer prevent a tempting mistake are deleted. Do not edit an archived note while simplifying current prose or code.
|
||||
|
||||
Follow the deletion rule in the [Agent Note contract](../../notes/README.md#when-to-write-one); do not duplicate or weaken it here. For each candidate chain:
|
||||
|
||||
1. Identify the current owner from shipped code, configuration, generated catalogs, package docs, newer Agent Notes, and inbound links; dates and titles are discovery hints, not proof.
|
||||
|
||||
@@ -19,6 +19,8 @@ Accept `mode: automatic | interactive`; default to `automatic`. Enter interactiv
|
||||
|
||||
Always exclude `vendor/` from discovery, review, and edits, even when the requested scope is the whole repository. Do not follow a symlink into it. Put exclusions after inclusion globs so a later include cannot re-admit it: for example, end ripgrep commands with `--glob '!vendor/**'`, and give Git commands an explicit `:(exclude)vendor/**` pathspec. If the requested scope contains only `vendor/`, report that no eligible files remain.
|
||||
|
||||
Also exclude `.agents/notes/archived/` from prose review and edits. Archived Agent Notes are frozen snapshots; inspect an exact target only to understand a historical inbound citation, never to modernize its prose or outbound links.
|
||||
|
||||
Treat generated catalogs, snapshots, and fixtures as derivative. Edit the owning source or scenario first, then regenerate the artifact. When a generator extracts a summary from owner prose, make the extracted sentence complete for that surface. Bilingual pairs have no permanent owner: either language may be the authored side for an update. Update the counterpart minimally and re-record the pair.
|
||||
|
||||
## Preserve the complete proposition
|
||||
|
||||
@@ -43,6 +43,8 @@ Do not process every file the same way:
|
||||
Apply the smallest counterpart edits that cover that diff. A minimal update preserves the reviewed phrasing of everything that didn't change; a re-translation throws that review away.
|
||||
- **Deleted or renamed doc**: delete or rename the counterpart and the `.i18n.yaml` alongside it — the gate reports an incomplete pair otherwise.
|
||||
|
||||
Frozen Agent Notes under `.agents/notes/archived/` are not translation work. Their complete triplets are sealed by the archive verifier; never update, re-record, or repair either side after archival.
|
||||
|
||||
## Translate
|
||||
|
||||
- **Pass 1 — write, don't transpose.** Read a semantic unit, then restate it as a native technical author in the nearest [style sample's](../../../docs/i18n/style-samples.md) register. Preserve the required frame without forcing sentence-by-sentence correspondence.
|
||||
|
||||
Reference in New Issue
Block a user