Skip to content

Commit 4ed059f

Browse files
authored
fix: stop redundant memory reinvestigation (#32)
1 parent 7ed5656 commit 4ed059f

2 files changed

Lines changed: 29 additions & 15 deletions

File tree

templates/SKILL.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,24 @@ behavioral responsibility that software cannot infer reliably.
3535
kind, source.ref or inference basis, producing run, and any supersession state.
3636
- [GUIDANCE] When an active grounded claim directly addresses the current task, use
3737
its supported fact as the starting point for the work.
38-
- [GUIDANCE] Perform only the minimum freshness verification required by the current
39-
task, such as checking the current affected file or behavior.
40-
- [GUIDANCE] Do not repeat historical or source investigation already supported by
41-
the claim unless there is contradictory evidence, ambiguity, an inference-only
42-
claim, stale or superseded state, or the task explicitly requires re-verification.
43-
- [GUIDANCE] Never treat retrieved memory as automatically true. Keep the claim's
44-
scope and evidence strength visible, and investigate further when its support does
45-
not justify relying on it for the current task.
38+
- [GUIDANCE] If that claim directly answers the task and its evidence already
39+
establishes the historical reasoning, do not repeat that historical investigation.
40+
- [GUIDANCE] Normally limit freshness verification to current state that could have
41+
changed since the claim: relevant current files, working-tree or HEAD changes, or
42+
directly contradictory evidence.
43+
- [GUIDANCE] Do not rerun git log, git blame, historical diffs, broad repository
44+
searches, tests, or other original investigation merely to reconfirm evidence the
45+
claim already cites.
46+
- [GUIDANCE] Escalate into deeper reinvestigation only when current state contradicts
47+
the claim, provenance is missing or insufficient, the claim is inference-only,
48+
stale, superseded, or ambiguous, or the user explicitly asks for fresh independent
49+
verification.
50+
- [GUIDANCE] Once current state is consistent with the grounded claim and no
51+
contradiction is found, stop investigating and answer from the claim plus the
52+
minimal freshness check.
53+
- [GUIDANCE] Never treat retrieved memory as automatically true. Inspect its evidence
54+
and provenance first, keep the claim's scope and evidence strength visible, and
55+
investigate further only when its support does not justify relying on it.
4656

4757
## Write
4858

tests/integration/skill-doc.test.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,22 @@ test('requires retrieval-first investigation without blind trust', async () => {
5757
assert.match(skill, /query relevant GraphKeeper memory before repeating.*investigation/is);
5858
assert.match(skill, /inspect active claims and their provenance first/is);
5959
assert.match(skill, /grounded claim directly addresses.*starting point/is);
60-
assert.match(skill, /only the minimum freshness verification required/is);
61-
assert.match(skill, /do not repeat historical or source investigation already supported/is);
60+
assert.match(skill, /evidence already\s+establishes the historical reasoning.*do not repeat/is);
61+
assert.match(skill, /limit freshness verification to current state.*relevant current files.*working-tree or HEAD changes.*contradictory evidence/is);
62+
assert.match(skill, /do not rerun git log, git blame, historical diffs, broad repository\s+searches, tests/is);
63+
assert.match(skill, /original investigation.*reconfirm evidence/is);
64+
assert.match(skill, /stop investigating and answer from the claim plus the\s+minimal freshness check/is);
6265
for (const exception of [
63-
'contradictory evidence',
64-
'ambiguity',
66+
'current state contradicts',
67+
'provenance is missing or insufficient',
6568
'inference-only',
66-
'stale or superseded',
67-
'explicitly requires re-verification',
69+
'stale, superseded, or ambiguous',
70+
'fresh independent verification',
6871
]) {
69-
assert.match(skill, new RegExp(exception, 'i'));
72+
assert.match(skill, new RegExp(exception.replaceAll(' ', '\\s+'), 'i'));
7073
}
7174
assert.match(skill, /never treat retrieved memory as automatically true/is);
75+
assert.match(skill, /inspect its evidence\s+and provenance first/is);
7276
});
7377

7478
test('keeps structured detail in evidence and excludes session chatter', async () => {

0 commit comments

Comments
 (0)