knowledge-compound — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited knowledge-compound (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Goal: Turn ADR Part 10 (Cycle Retrospective) + code diff patterns into structured knowledge that shapes future brainstorming and planning sessions automatically.
Core insight: ADRs are read when you remember to search for them. Compound wiki entries are read automatically at the start of every planning session. The difference is compounding vs. archiving.
Trigger: Invoke immediately after adr-commit completes. One run per merged branch.
Announce: "Using knowledge-compound to extract cycle learnings."
# Detect mode: DPS or legacy?
DPS_ADR=".dps/spec/ADR.md"
if [ -f "$DPS_ADR" ]; then
echo "DPS MODE — reading ADR from $DPS_ADR"
grep -c "Cycle Retrospective" "$DPS_ADR" | xargs echo "DPS ADR Part 10 entries:"
# Get last ADR entry header for context:
grep "^## ADR-" "$DPS_ADR" | tail -3
else
echo "LEGACY MODE — reading from docs/superskills/adrs/"
ls -t docs/superskills/adrs/*.md 2>/dev/null | head -3
grep -l "Cycle Retrospective" docs/superskills/adrs/*.md 2>/dev/null | tail -1
fiIf no ADR with Part 10 found (in either mode) → prompt: "Run adr-commit first with Part 10 filled in."
Read the most recent ADR. Extract into four categories:
Read ADR Part 2 (Context) and Part 3 (Decision). Find terms used that are NOT in CONTEXT.md.
For each new term:
# Check if term exists:
grep -i "[term]" docs/superskills/CONTEXT.md 2>/dev/null | wc -lCONTEXT.md Ubiquitous Language with source: <!-- from ADR: [filename] -->Read ADR Part 5 (Consequences) and Part 10 (Cycle Retrospective). Find any bug class mentioned.
For each bug pattern:
# Check if already tracked:
grep -i "[pattern-slug]" docs/superskills/pattern-debt.md 2>/dev/null | wc -lactual_outcome field if this cycle resolved itRead ADR Part 10. Find any "what surprised us" or "what would we do differently."
For each gotcha:
audit-design).shared/gotcha-schema.md for new entries, including status, evidence, scope, applies_when, avoid_when, last_seen, and retire_if.Gotchas section.CONTEXT.md → Domain Gotchas if it's domain-specific.Read ADR Part 3 (Decision). Find decisions with broader applicability than this feature.
Criteria: "Would future brainstorming on a different feature benefit from knowing this?"
CONTEXT.md → Architectural DecisionsRun if DPS present and STATUS ≥ IMPLEMENTATION-ACTIVE
DPS_STATUS=$(grep "DPS STATUS:" .dps/spec/README.md 2>/dev/null | awk '{print $NF}')
[ "$DPS_STATUS" = "IMPLEMENTATION-ACTIVE" ] || [ "$DPS_STATUS" = "LIVING-SPEC" ] && echo "Arc 2 update needed"5a. Learning Loop response (BLUEPRINT §8): Read ADR Part 10 (Cycle Retrospective). For each surprise or new insight:
5b. Update LAST CONFIRMED on relevant ADRs: ADRs whose IMPACT RADIUS overlaps with this cycle's changed components:
# Which ADRs cover components touched this cycle?
git diff --name-only HEAD~1 | xargs grep -l "dps:id=ADR" 2>/dev/nullFor each relevant ADR: update LAST CONFIRMED: {{today's date}}
5c. Promote to LIVING-SPEC if criteria met: Criteria: ≥ 1 Learning Loop response written + Scope Boundary Log updated + metrics confirmed → invoke dps-promote: IMPLEMENTATION-ACTIVE → LIVING-SPEC
Append to docs/superskills/compound-wiki.md:
---
date: YYYY-MM-DD
sprint: <sprint or cycle identifier>
adr: <adr-filename.md>
modules: [<affected modules>]
---
## Cycle: <feature-slug>
### New Domain Terms Added to CONTEXT.md
- [term]: [definition] ✅ | already existed ⚠️ (list only new ones)
### Bug Patterns
- [pattern class]: [status — new PATTERN-DEBT | existing updated | observed but no debt]
### Gotchas Captured
- [gotcha] → added to [skill-name]/SKILL.md Gotchas ✅
### Architectural Decisions Promoted
- [decision] → added to CONTEXT.md Architectural Decisions ✅
### DPS Arc 2 Updates
- LAST CONFIRMED updated: [ADR-N, ADR-M]
- Learning Loop: [what changed in BLUEPRINT §8]
- Spec promoted to: [LIVING-SPEC | still IMPLEMENTATION-ACTIVE]
### Nothing extracted
(if cycle produced no new learnings — valid, log explicitly)
---git add docs/superskills/CONTEXT.md
git add docs/superskills/compound-wiki.md
git add docs/superskills/pattern-debt.md
# Update skill Gotchas sections
git add */SKILL.md
git commit -m "knowledge: compound extraction from <feature-slug> [$(date +%Y-%m-%d)]"# Bump version in CONTEXT.md header:
python3 -c "
import re
content = open('docs/superskills/CONTEXT.md').read()
content = re.sub(
r'version: (\d+)',
lambda m: f'version: {int(m.group(1))+1}',
content
)
open('docs/superskills/CONTEXT.md', 'w').write(content)
"compound-wiki.md entries use YAML frontmatter + structured sections. When agentmemory or semantic KB MCP is available, this file is the import source. Schema is designed for forward compatibility — do not change frontmatter field names.
brainstorming reads CONTEXT.md at invocation (via !command in a future update). The compound wiki is not read every session — kb-query surfaces it when relevant. Gotchas sections in skills are always read when skills are invoked.
The compounding mechanism: each cycle's gotchas improve the next cycle's skill precision. Five cycles of gotchas in systematic-debugging makes it materially better than zero cycles.
When extracting learnings, do not only add new knowledge. Also check whether old knowledge should be revalidated, downgraded, or retired.
When automation is available, run:
python3 tools/epistemic_health_check.py .Use shared/epistemic-health.md for:
LAST CONFIRMED values;retire_if condition may be met;If knowledge-compound is run twice on same ADR:
# Check if entry already exists:
grep -c "<feature-slug>" docs/superskills/compound-wiki.md 2>/dev/nullCount ≥ 1 → log "already extracted for this ADR — skip" and exit.
<!-- Populated by knowledge-compound after cycles where this skill underperformed --> <!-- Format: [YYYY-MM-DD] What failed | Root cause | What to do instead -->
At the end of each completed knowledge-compound cycle, record the cycle so staleness checks do not depend on agent memory:
python3 tools/epistemic_health_check.py . --record-cycleIf the output reports CADENCE_DUE, run the periodic check before starting the next C3/C4 task or release:
python3 tools/epistemic_health_check.py . --record-run --strict~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.