Vault Compact
Reduce repeated thinking across the active vault. This skill is for semantic
overlap, not just exact duplicate text: compact passages when they do the same
job in the knowledge system.
Portent reference: ../references/portent-knowledge-base-spec.md.
Prefer compaction when files represent the same Portent object or repeat the
same claim for the same object. Do not merge merely because objects share a
Topic. Preserve belongs_to and related_to metadata when absorbing files.
Recency Priority
Work the active surface newest-first, ranked by each object's updated
frontmatter date (fall back to file modification time when updated is absent).
Concentrate scrutiny on the freshest material — recently-touched objects are
where active thinking lives and where new mismatches, overlaps, and gaps appear.
Long-untouched objects are assumed settled and rank lower, but are never
excluded: they remain valid link targets, merge destinations, and canonical
homes, and still get a structural check (broken links, orphaning).
Seed overlap-candidate groups from recent files. When a recent note overlaps an
older canonical one, keep the older established note as the canonical
destination, consistent with the Canonical Destination Rules below.
Command
vault-compact [--scope notes|ideas|projects|all] [--mode report|apply-safe|apply] [--aggression conservative|normal|aggressive]
Parameters
--scope notes|ideas|projects|all (default: all)
--mode report|apply-safe|apply (default: report)
report: identify overlap and propose canonical destinations only
apply-safe: apply high-confidence local compaction only
apply: also merge high-confidence cross-file overlap when provenance and
links can be preserved; delete absorbed curated files when appropriate
--aggression conservative|normal|aggressive (default: conservative)
conservative: exact/near-duplicate sections and obvious repeated claims
normal: same-claim overlap with unique examples preserved
aggressive: broader synthesis; appropriate for shipped/archived project
compaction or when explicitly requested
What Counts As Overlap
Compact when multiple passages are doing the same job:
- repeated thesis or framing
- duplicated audience/problem/value-prop language
- duplicated project status or next-action text
- same source summary in multiple curated notes
- same idea split across multiple idea notes
- concept explanation repeated instead of linked to the concept page
- stale restatement that is superseded by a clearer canonical section
- shipped project launch artifacts, drafts, and research that have served their
temporary purpose
Do not compact just because notes share keywords.
Unit Of Judgment
Compare passages as claim-like units:
- thesis
- audience
- problem
- product idea
- decision
- evidence
- example
- caveat
- open question
- next action
- implementation detail
- source summary
If two units make the same claim, collapse them. If one adds a distinct example,
decision, caveat, source, audience, or implementation detail, preserve that
detail.
Workflow
- Read
AGENTS.md, then index.md.
- Confirm the scoped directories:
- Exclude
raw/, raw/processed/, raw/assets/, and archive/ unless the
user explicitly asks for an audit that includes archived curated material.
- Use qmd first for semantic retrieval:
qmd query for themes and semantic overlap
qmd search for exact phrases, titles, URLs, and aliases
rg for migration residue, raw strings, and link rewrites
- Build candidate groups by canonical topic, project, idea, source, or claim.
- Classify each group by Portent object identity, confidence, and compaction
action.
- In
report mode, stop after a compact report.
- In
apply-safe mode, apply only local, high-confidence edits inside one file
or obvious link substitutions to canonical concept notes.
- In
apply mode, apply high-confidence cross-file compaction only when all
unique content and provenance can be retained.
- Delete absorbed curated files only after the canonical destination preserves
their unique claims, examples, decisions, and provenance.
- Update
updated: frontmatter on edited curated notes where practical.
- Run
qmd update after any edits, moves, or deletions.
- Append one concise line to
log.md for every material vault change.
Compaction Actions
dedupe: remove exact or near-exact repeated paragraphs, bullets, or
sections.
collapse: replace equivalent claims with one sharper canonical statement and
preserve unique examples, caveats, evidence, and decisions below it.
route: replace repeated local explanation with a wikilink to the canonical
note or section.
merge-plan: propose a merge, canonical destination, unique content to
preserve, and link rewrites; do not edit.
absorb-delete: after a successful merge, remove curated source files whose
useful content now lives in the canonical destination.
link-only: add or propose a relationship link because notes are related but
distinct.
Confidence Rubric
High Confidence
- Same source URL or same clipped source identity.
- Same title, slug, project, or idea identity.
- Same Portent object identity or same claim serving the same object.
- One note explicitly continues, replaces, or supersedes another.
- Passages make the same claim with compatible meaning.
- Differences are examples, wording, or ordering, not substance.
- Canonical destination is obvious.
High-confidence items may be compacted in apply-safe when local to one file,
or in apply when cross-file provenance and links can be preserved.
Medium Confidence
- Same broad thesis with a meaningful caveat in one passage.
- Same product shape but slightly different audience or monetization.
- Same concept repeated across notes but no existing canonical destination.
- Canonical destination is plausible but not obvious.
Medium-confidence items become merge plans or concept-promotion candidates.
Low Confidence
- Same broad domain only.
- Similar vocabulary but different use cases.
- Similar AI-generated structure but different actual content.
- Different lifecycle states or strategic decisions.
Low-confidence items should remain separate; propose links only when useful.
Canonical Destination Rules
Notes
- Prefer canonical concept pages under
notes/concepts/ for repeated theses.
- Prefer existing topic notes over creating new notes.
- External clipped notes are evidence, not owned synthesis. Preserve source
identity and do not absorb complete external text into owned notes.
- Repeated source summaries should cite complete source records under
raw/processed/YYYY-MM-DD/ when used for synthesis.
- Preserve
belongs_to and related_to metadata when compacting or absorbing
notes.
Ideas
- Keep the canonical idea in its lifecycle location under
ideas/.
- Preserve distinctions in audience, wedge, pricing, validation status, and kill
criteria.
- If two ideas share a product shape but differ in customer or strategy, do not
merge; create a comparison or shared concept link instead.
Projects
- Keep project PRDs, plans, decisions, research, and postmortems separate unless
one is clearly obsolete or duplicative.
- Canonical project state should live in Portent frontmatter, the main project
PRD, README, or active index navigation according to the local convention.
- Do not merge active, paused, shipped, and rejected rationales into one generic
project summary; lifecycle context matters.
- For shipped projects, run heavier compaction after the shipping transition.
Merge temporary launch materials, tweet drafts, old outlines, research
snippets, and implementation leftovers into one canonical shipped project
record when they no longer serve active execution.
- Shipped project compaction may delete absorbed curated files after the merged
record preserves unique outcomes, lessons, market notes, source links, and
reusable copy.
Synthesis Rules
Conservative synthesis is allowed only when:
- source passages agree
- no distinct decision, caveat, example, or evidence point is lost
- provenance links remain intact
- the new wording is more precise than the repeated wording
- the edit reduces repeated thinking rather than merely shortening the note
Prefer this shape:
Canonical claim.
Supporting examples:
- example from note A
- example from note B
Evidence:
- [[raw/processed/YYYY-MM-DD/source|Complete Source Record]]
Avoid flattening useful nuance into generic summaries.
Safety
- Never edit anything under
raw/.
- Never delete source evidence.
- Never delete curated files until their unique content has been merged into a
canonical destination and inbound links have been updated.
- Never compact distinct ideas because they share keywords.
- Never replace a source record with a summary.
- Never remove unresolved questions, decisions, caveats, or examples unless they
are duplicated elsewhere in the same canonical destination.
- Never merge across lifecycle states without preserving the lifecycle meaning.
- Default to
report when confidence is not high.
- Keep all edits reviewable and list touched files.
Output
Return:
- Scope, mode, and aggression used
- Candidate groups with canonical destination, confidence, and rationale
- Applied changes by file and compaction action
- Preserved unique claims, examples, evidence, and decisions
- Deferred merge plans with required user decisions
- Link-only relationships proposed or applied
- Absorbed files deleted, with canonical destination
- Files intentionally skipped and why
qmd update status
log.md entry status
Example Report Shape
## Compact Report
### Applied
- `notes/concepts/example.md`: collapsed repeated thesis under `## Core Claim`
and preserved two unique examples.
### Merge Plans
- Canonical: `ideas/incubating/example-prd.md`
- Candidates: `ideas/fleeting/example.md`,
`notes/app-marketing/example-positioning.md`
- Confidence: medium
- Rationale: same product shape, but audience differs.
- Preserve: pricing caveat, validation question, source link.
### Skipped
- `projects/active/example/prd.md` vs `projects/paused/example/prd.md`
- Reason: same project name but different lifecycle state and decision context.
### Maintenance
- `qmd update`: not run in report mode
- `log.md`: not updated in report mode
1---2name: vault-compact3description: Collapse semantically overlapping notes, ideas, and project docs into clearer canonical surfaces while preserving distinct claims, decisions, examples, and source provenance.4---56# Vault Compact78Reduce repeated thinking across the active vault. This skill is for semantic9overlap, not just exact duplicate text: compact passages when they do the same10job in the knowledge system.1112Portent reference: `../references/portent-knowledge-base-spec.md`.1314Prefer compaction when files represent the same Portent object or repeat the15same claim for the same object. Do not merge merely because objects share a16Topic. Preserve `belongs_to` and `related_to` metadata when absorbing files.1718## Recency Priority1920Work the active surface newest-first, ranked by each object's `updated`21frontmatter date (fall back to file modification time when `updated` is absent).22Concentrate scrutiny on the freshest material — recently-touched objects are23where active thinking lives and where new mismatches, overlaps, and gaps appear.24Long-untouched objects are assumed settled and rank lower, but are never25excluded: they remain valid link targets, merge destinations, and canonical26homes, and still get a structural check (broken links, orphaning).2728Seed overlap-candidate groups from recent files. When a recent note overlaps an29older canonical one, keep the older established note as the canonical30destination, consistent with the Canonical Destination Rules below.3132## Command3334```35vault-compact [--scope notes|ideas|projects|all] [--mode report|apply-safe|apply] [--aggression conservative|normal|aggressive]36```3738## Parameters3940- `--scope notes|ideas|projects|all` (default: `all`)41- `--mode report|apply-safe|apply` (default: `report`)42 - `report`: identify overlap and propose canonical destinations only43 - `apply-safe`: apply high-confidence local compaction only44 - `apply`: also merge high-confidence cross-file overlap when provenance and45 links can be preserved; delete absorbed curated files when appropriate46- `--aggression conservative|normal|aggressive` (default: `conservative`)47 - `conservative`: exact/near-duplicate sections and obvious repeated claims48 - `normal`: same-claim overlap with unique examples preserved49 - `aggressive`: broader synthesis; appropriate for shipped/archived project50 compaction or when explicitly requested5152## What Counts As Overlap5354Compact when multiple passages are doing the same job:5556- repeated thesis or framing57- duplicated audience/problem/value-prop language58- duplicated project status or next-action text59- same source summary in multiple curated notes60- same idea split across multiple idea notes61- concept explanation repeated instead of linked to the concept page62- stale restatement that is superseded by a clearer canonical section63- shipped project launch artifacts, drafts, and research that have served their64 temporary purpose6566Do not compact just because notes share keywords.6768## Unit Of Judgment6970Compare passages as claim-like units:7172- thesis73- audience74- problem75- product idea76- decision77- evidence78- example79- caveat80- open question81- next action82- implementation detail83- source summary8485If two units make the same claim, collapse them. If one adds a distinct example,86decision, caveat, source, audience, or implementation detail, preserve that87detail.8889## Workflow90911. Read `AGENTS.md`, then `index.md`.922. Confirm the scoped directories:93 - `notes/`94 - `ideas/`95 - `projects/`963. Exclude `raw/`, `raw/processed/`, `raw/assets/`, and `archive/` unless the97 user explicitly asks for an audit that includes archived curated material.984. Use qmd first for semantic retrieval:99 - `qmd query` for themes and semantic overlap100 - `qmd search` for exact phrases, titles, URLs, and aliases101 - `rg` for migration residue, raw strings, and link rewrites1025. Build candidate groups by canonical topic, project, idea, source, or claim.1036. Classify each group by Portent object identity, confidence, and compaction104 action.1057. In `report` mode, stop after a compact report.1068. In `apply-safe` mode, apply only local, high-confidence edits inside one file107 or obvious link substitutions to canonical concept notes.1089. In `apply` mode, apply high-confidence cross-file compaction only when all109 unique content and provenance can be retained.11010. Delete absorbed curated files only after the canonical destination preserves111 their unique claims, examples, decisions, and provenance.11211. Update `updated:` frontmatter on edited curated notes where practical.11312. Run `qmd update` after any edits, moves, or deletions.11413. Append one concise line to `log.md` for every material vault change.115116## Compaction Actions117118- `dedupe`: remove exact or near-exact repeated paragraphs, bullets, or119 sections.120- `collapse`: replace equivalent claims with one sharper canonical statement and121 preserve unique examples, caveats, evidence, and decisions below it.122- `route`: replace repeated local explanation with a wikilink to the canonical123 note or section.124- `merge-plan`: propose a merge, canonical destination, unique content to125 preserve, and link rewrites; do not edit.126- `absorb-delete`: after a successful merge, remove curated source files whose127 useful content now lives in the canonical destination.128- `link-only`: add or propose a relationship link because notes are related but129 distinct.130131## Confidence Rubric132133### High Confidence134135- Same source URL or same clipped source identity.136- Same title, slug, project, or idea identity.137- Same Portent object identity or same claim serving the same object.138- One note explicitly continues, replaces, or supersedes another.139- Passages make the same claim with compatible meaning.140- Differences are examples, wording, or ordering, not substance.141- Canonical destination is obvious.142143High-confidence items may be compacted in `apply-safe` when local to one file,144or in `apply` when cross-file provenance and links can be preserved.145146### Medium Confidence147148- Same broad thesis with a meaningful caveat in one passage.149- Same product shape but slightly different audience or monetization.150- Same concept repeated across notes but no existing canonical destination.151- Canonical destination is plausible but not obvious.152153Medium-confidence items become merge plans or concept-promotion candidates.154155### Low Confidence156157- Same broad domain only.158- Similar vocabulary but different use cases.159- Similar AI-generated structure but different actual content.160- Different lifecycle states or strategic decisions.161162Low-confidence items should remain separate; propose links only when useful.163164## Canonical Destination Rules165166### Notes167168- Prefer canonical concept pages under `notes/concepts/` for repeated theses.169- Prefer existing topic notes over creating new notes.170- External clipped notes are evidence, not owned synthesis. Preserve source171 identity and do not absorb complete external text into owned notes.172- Repeated source summaries should cite complete source records under173 `raw/processed/YYYY-MM-DD/` when used for synthesis.174- Preserve `belongs_to` and `related_to` metadata when compacting or absorbing175 notes.176177### Ideas178179- Keep the canonical idea in its lifecycle location under `ideas/`.180- Preserve distinctions in audience, wedge, pricing, validation status, and kill181 criteria.182- If two ideas share a product shape but differ in customer or strategy, do not183 merge; create a comparison or shared concept link instead.184185### Projects186187- Keep project PRDs, plans, decisions, research, and postmortems separate unless188 one is clearly obsolete or duplicative.189- Canonical project state should live in Portent frontmatter, the main project190 PRD, README, or active index navigation according to the local convention.191- Do not merge active, paused, shipped, and rejected rationales into one generic192 project summary; lifecycle context matters.193- For shipped projects, run heavier compaction after the shipping transition.194 Merge temporary launch materials, tweet drafts, old outlines, research195 snippets, and implementation leftovers into one canonical shipped project196 record when they no longer serve active execution.197- Shipped project compaction may delete absorbed curated files after the merged198 record preserves unique outcomes, lessons, market notes, source links, and199 reusable copy.200201## Synthesis Rules202203Conservative synthesis is allowed only when:204205- source passages agree206- no distinct decision, caveat, example, or evidence point is lost207- provenance links remain intact208- the new wording is more precise than the repeated wording209- the edit reduces repeated thinking rather than merely shortening the note210211Prefer this shape:212213```214Canonical claim.215216Supporting examples:217- example from note A218- example from note B219220Evidence:221- [[raw/processed/YYYY-MM-DD/source|Complete Source Record]]222```223224Avoid flattening useful nuance into generic summaries.225226## Safety227228- Never edit anything under `raw/`.229- Never delete source evidence.230- Never delete curated files until their unique content has been merged into a231 canonical destination and inbound links have been updated.232- Never compact distinct ideas because they share keywords.233- Never replace a source record with a summary.234- Never remove unresolved questions, decisions, caveats, or examples unless they235 are duplicated elsewhere in the same canonical destination.236- Never merge across lifecycle states without preserving the lifecycle meaning.237- Default to `report` when confidence is not high.238- Keep all edits reviewable and list touched files.239240## Output241242Return:243244- Scope, mode, and aggression used245- Candidate groups with canonical destination, confidence, and rationale246- Applied changes by file and compaction action247- Preserved unique claims, examples, evidence, and decisions248- Deferred merge plans with required user decisions249- Link-only relationships proposed or applied250- Absorbed files deleted, with canonical destination251- Files intentionally skipped and why252- `qmd update` status253- `log.md` entry status254255## Example Report Shape256257```markdown258## Compact Report259260### Applied261262- `notes/concepts/example.md`: collapsed repeated thesis under `## Core Claim`263 and preserved two unique examples.264265### Merge Plans266267- Canonical: `ideas/incubating/example-prd.md`268- Candidates: `ideas/fleeting/example.md`,269 `notes/app-marketing/example-positioning.md`270- Confidence: medium271- Rationale: same product shape, but audience differs.272- Preserve: pricing caveat, validation question, source link.273274### Skipped275276- `projects/active/example/prd.md` vs `projects/paused/example/prd.md`277- Reason: same project name but different lifecycle state and decision context.278279### Maintenance280281- `qmd update`: not run in report mode282- `log.md`: not updated in report mode283```