From codescope
Review accumulated project learnings and confirm, reject, or edit them.
npx claudepluginhub jwadhwa2259/codescope --plugin codescopeThis skill is limited to using the following tools:
You are the learning review assistant. Present accumulated project learnings for the user to curate.
Manages project learnings in markdown files: view index, add patterns/pitfalls/operational notes/decisions, search, prune, export for CLAUDE.md persistence across sessions.
Captures learnings from sessions by reflecting on mistakes, surprises, project quirks, and patterns, appending to .learnings/LEARNINGS.md with optional hookify rules or design docs. Use for retrospectives.
Save/recall learnings across sessions (bugs, patterns, gotchas, perf, config, arch). Auto-invoke after fixing non-obvious bugs. Triggers "remember this", "store learning", "what did we learn".
Share bugs, ideas, or general feedback.
You are the learning review assistant. Present accumulated project learnings for the user to curate.
node --import tsx/esm -e "
import { loadLearnings } from './src/learning/manager.js';
import { runDecay } from './src/learning/decay.js';
import { loadConfig } from './src/config/loader.js';
const config = loadConfig(process.cwd());
if (!config) { console.log(JSON.stringify({ error: 'no-config' })); process.exit(0); }
const parsed = loadLearnings(process.cwd());
const decayed = runDecay(parsed.entries, config.learning.confidence_decay, new Date());
console.log(JSON.stringify({ entries: decayed, total: decayed.length }));
"
"error": "no-config": display "No config found. Run /codescope:onboard first." and stop.Group entries by review priority. Skip VERIFIED and IGNORE entries (already curated).
Group 1: CONTRADICTED entries (need resolution first, per D-19) Group 2: UNVERIFIED entries grouped by type (per D-14):
For each group, display a section header and list entries:
## Contradicted Learnings ({count})
### 1. {title}
- **Type:** {type}
- **Contradicts:** {contradicts}
- **Evidence:** {evidence}
- **Discovered:** {discovered}
Action? [confirm (keep as-is) / reject (remove) / edit]
## Unverified Learnings ({count})
### Gotchas
### {N}. {title}
- **Type:** gotcha
- **Evidence:** {evidence}
- **Discovered:** {discovered} | **Expires:** {expires}
Action? [confirm / reject / edit]
(Repeat for decisions, patterns)
## TODO Items ({count})
### {N}. {title}
- **File:** {file}
- **Severity:** {severity}
- **Evidence:** {evidence}
Action? [confirm (acknowledge) / reject (remove) / edit]
## Expired Learnings ({count})
### {N}. {title}
- **Type:** {type}
- **Expired:** {expires}
Action? [re-confirm (reset expiry) / remove]
Present all groups at once. Ask the user to review each entry in order. Number entries across all groups sequentially for easy reference (e.g., "Enter numbers to act on: 1 confirm, 3 reject, 5 edit").
For each entry where user took action:
confirm:
.claude/codescope/conventions-enforced.md with the pattern title and evidence.
Display: "Promoted '{title}' to enforced conventions."reject:
edit (per D-15):
re-confirm (for EXPIRED entries):
node --import tsx/esm -e "
import { computeExpiry } from './src/learning/decay.js';
import { loadConfig } from './src/config/loader.js';
const config = loadConfig(process.cwd());
const expiry = computeExpiry('{type}', new Date(), config.learning.confidence_decay);
console.log(JSON.stringify({ expires: expiry }));
"
Convention promotion for CONTRADICTED entries that user confirms:
Cross-project gotcha promotion (per D-23): After confirming a learning, offer: "Mark as cross-project gotcha? (applies to all projects) (yes/no)" If yes: add to global memory's Cross-Project Gotchas section via addGlobalEnrichment:
node --import tsx/esm -e "
import { addGlobalEnrichment } from './src/onboard/global-memory.js';
addGlobalEnrichment([{
type: 'cross_project_gotcha',
value: '{title}: {evidence}',
source: '{projectName}',
recordedDate: new Date().toISOString().split('T')[0]
}]);
console.log(JSON.stringify({ promoted: true }));
"
Display: "Added '{title}' to cross-project gotchas in global memory."
Save updated learnings using saveLearnings. Build the updated entries array with all confirmations, rejections, and edits applied, then write back to disk:
node --import tsx/esm -e "
import { loadLearnings, saveLearnings } from './src/learning/manager.js';
const parsed = loadLearnings(process.cwd());
// Apply the modifications to parsed.entries:
// - Remove rejected entries
// - Update confirmed entries to VERIFIED
// - Apply edited fields
// Then save:
saveLearnings(process.cwd(), parsed);
console.log(JSON.stringify({ saved: true, total: parsed.entries.length }));
"
Alternatively, use the Write tool to directly update learnings.md with the serialized content from serializeLearnings, since you have access to the Write tool and can construct the final markdown output.
Display summary:
## Review Complete
- Confirmed: {N}
- Rejected: {N}
- Edited: {N}
- Promoted to conventions: {N}
- Cross-project gotchas added: {N}
- Remaining unreviewed: {N}
- Total active learnings: {N}/50