executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
memory-cleanUse when the user explicitly asks to clean, compact, prune, trim, deduplicate, optimize, or reduce Wingman memory, or asks to resolve stale or conflicting memory rules.
Independent GitHub snapshot · Automated classification · Original documentation governs
Clean Wingman memory only when the user explicitly asks. Preserve the ownership model while reducing default-read noise and conflicts.
brief.md / domains/ = current projection, current binding truth bodies
history/events/ = event log, historical event bodies
history indexes = projection indexes for historical lookup
context.md = hot cache, active work state and short pointers
Cleanups should move memory toward one owning body per durable item:
brief.md or domains/;history/events/;context.md..wingman/memory/..wingman/memory/brief.md and .wingman/memory/context.md.brief.md and context.md first.Never scan all memory files by default.
Use the smallest scope that matches the request:
| Scope | Read | Use When |
|---|---|---|
context | context.md, relevant current truth/history if linked | Context contains stale hot state, verbose old logs, or duplicate bodies. |
current-truth | brief.md, relevant domains | Current rules are duplicated, stale, conflicting, missing identity, or missing relations. |
history-index | relevant projections | History projections are bloated, missing useful routing, or copying event bodies. |
history-event | named event bodies only | User explicitly asks to inspect or edit specific history events. |
migration | target old context logs plus needed destinations | Old context logs need conversion into current truth, history, or pointers. |
delete-proposal | target files only | User asks to delete logs or remove noise. |
If unclear, choose context unless the user mentions current rules, domains, Project Decisions, or history.
Clean only when at least one concrete candidate exists:
COMPACT_TO_POINTER: context has details already owned by current truth or history.PROMOTE_CURRENT_TRUTH: context contains a durable rule future agents must obey.PROMOTE_HISTORY: context contains a durable change narrative or reasoning event.PROMOTE_BOTH: context contains both current rule and historical explanation.SUPERSEDE: an old current rule was replaced and should become superseded or deprecated.REPAIR_RELATION: same-subject entries need updates, extends, or conflict resolution.REPAIR_INDEX: history projection should be link-only or needs a domain/topic route.DELETE_CANDIDATE: duplicate, obsolete, sensitive, or safely represented elsewhere.NO_ACTION: cleanup cost or ambiguity exceeds benefit.File size and line count are diagnostics only. They are not cleanup triggers by themselves.
Before changing a candidate, decide what would be lost:
If uncertain, prefer NO_ACTION or a deletion proposal over irreversible cleanup.
Replace verbose context with a short pointer only after the durable meaning is preserved elsewhere.
Valid pointer shape:
- <one-line state>; current truth: `<id/path or None>`; event: `<path or None>`; next: <immediate action/blocker or None>.
Preserve pending tasks, active blockers, and unresolved current work.
Write durable rules to brief.md or relevant domains/ when future agents must obey them. Include stable ID, Subject, Status, Rule, Applies When, Evidence, Confidence, Relation, Since, and History.
Write historical events under history/events/YYYY/MM/ when the old context contains durable rule evolution, old-to-new meaning, important correction, migration, incident, regression fix, or user-requested historical memory. Update only needed projections.
For A -> B requirement changes, make B the only current rule for overlapping scope, mark A as superseded or deprecated, and link with updates <old-id>.
If both rules remain valid, link with extends. If they conflict and evidence does not settle the winner, stop and ask.
Projection indexes should contain short summaries and links only. Remove copied event bodies from indexes only when the event body remains linked.
Never delete without explicit user confirmation after showing a proposal with exact IDs, paths, reasons, preserved locations, and risks.
Do not delete:
scripts/memory-stats.sh when heading layout, file size, or candidate discovery is unclear. The script is read-only.examples/lossless-compaction.md when compaction safety is unclear.examples/deletion-proposals.md when preparing a deletion proposal.Do not read examples or run scripts by default.
COMPACT_TO_POINTER, PROMOTE_CURRENT_TRUTH, PROMOTE_HISTORY, PROMOTE_BOTH, SUPERSEDE, REPAIR_RELATION, and REPAIR_INDEX changes.DELETE_CANDIDATE, present a proposal and wait for explicit confirmation.Do not say memory was cleaned if no file changed. If only a deletion proposal was produced, say cleanup is pending confirmation.