.claude/skills/ground-truth/SKILL.md
Generate factual, code-grounded GTM documents with BridgeBuilder voice and deterministic verification
npx skillsauth add 0xhoneyjar/loa-finn ground-truthInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are generating factual, code-grounded GTM documents using the BridgeBuilder voice. Every claim must be verifiable. Every citation must be real. The verification layer is entirely deterministic — shell scripts check your work. You cannot hallucinate past the firewall.
"Mechanism over adjective. Evidence over assertion. Teaching over selling."
for f in features.yaml limitations.yaml capability-taxonomy.yaml; do
if [[ ! -f "grimoires/loa/ground-truth/$f" ]]; then
echo "ERROR: Missing registry: grimoires/loa/ground-truth/$f"
echo ""
echo "Run: .claude/scripts/ground-truth/bootstrap-registries.sh"
echo "Then edit the files and commit before running /ground-truth."
exit 1
fi
done
echo "Registries OK"
Supported flags:
--type capability-brief (default)--type architecture-overview--incremental — Only regenerate stale sections (v2.0)DOC_TYPE="${1:-capability-brief}"
OUTPUT_DIR="grimoires/loa/ground-truth"
INCREMENTAL=false
# Parse --incremental flag from arguments
Load context in priority order. Tier A is non-negotiable.
Template for the selected document type:
.claude/skills/ground-truth/resources/templates/${DOC_TYPE}.mdProvenance specification:
.claude/skills/ground-truth/resources/provenance-spec.mdQuality gate requirements (know what will be checked):
file:line must resolve to a real, tracked file<!-- evidence: ... -->Code reality — highest priority evidence:
grimoires/loa/reality/index.md (if available from /ride)Registry files:
grimoires/loa/ground-truth/features.yamlgrimoires/loa/ground-truth/limitations.yamlgrimoires/loa/ground-truth/capability-taxonomy.yamlGrimoire state (if available):
grimoires/loa/NOTES.mdgrimoires/loa/decisions.yaml (if exists)Voice template:
.claude/skills/ground-truth/resources/voice/bridgebuilder-gtm.mdAnalogy bank (if available):
.claude/skills/ground-truth/resources/analogies/analogy-bank.yamlconfidence field (high/moderate):
Target: 13,500–28,000 tokens for generation context.
If context exceeds budget, truncate Tier B items from lowest priority up.
Run inventory and extraction scripts to gather structured data:
# Module inventory
.claude/scripts/ground-truth/inventory-modules.sh --json
# Limitations extraction
.claude/scripts/ground-truth/extract-limitations.sh --json
Use the Read tool to inspect specific source files for claims you'll make. Do NOT use arbitrary Bash to read files — use the Read tool.
When --incremental is set, only regenerate sections that are stale:
# Check which sections need regeneration
staleness=$(.claude/scripts/ground-truth/check-staleness.sh "${OUTPUT_DIR}/${DOC_TYPE}.md" --json)
stale_count=$(echo "$staleness" | jq -r '.stale_count')
if [[ "$stale_count" -eq 0 ]]; then
echo "No stale sections — document is current"
# Skip to Stage 6 (OUTPUT)
fi
# Get list of stale section headings
stale_headings=$(echo "$staleness" | jq -r '.stale_sections[].heading')
When regenerating incrementally:
stale_headingsIf --incremental is NOT set, generate the full document as before:
Generate the document following the template structure exactly.
Every CODE-FACTUAL paragraph MUST:
<!-- provenance: CODE-FACTUAL -->file:line citation<!-- evidence: symbol=X, literal="Y" --> with tokens from the cited rangeEvery HYPOTHESIS paragraph MUST:
<!-- provenance: HYPOTHESIS -->Every EXTERNAL-REFERENCE MUST cite a URL or paper reference
BridgeBuilder voice:
Banned terms: Never use any term from banned-terms.txt
Citation encoding: Paths must be repo-relative, matching ^[a-zA-Z0-9_./-]+$
Write the generated document to:
grimoires/loa/ground-truth/${DOC_TYPE}.md
Run the full quality gate suite. No LLM in this path.
.claude/scripts/ground-truth/quality-gates.sh "grimoires/loa/ground-truth/${DOC_TYPE}.md" --json
If exit code is 0: proceed to Stage 6 (OUTPUT). If exit code is 1: proceed to Stage 5 (REPAIR).
When quality gates fail, you receive a JSON failure report. Fix each failure.
grimoires/loa/ground-truth/${DOC_TYPE}.mdgrimoires/loa/ground-truth/file:line for the real codeiteration = 0
while iteration < 3:
Fix failures based on JSON report
Rewrite document
Run quality-gates.sh again
If PASS: break
iteration++
If iteration == 3 and still failing:
HALT with detailed failure report
Save last draft for manual review
After each repair, re-run Stage 4 (VERIFY).
After verification passes:
.claude/scripts/ground-truth/stamp-freshness.sh "grimoires/loa/ground-truth/${DOC_TYPE}.md"
Report to the user:
.claude/scripts/ground-truth/write-manifest.sh "grimoires/loa/ground-truth/${DOC_TYPE}.md" \
--citations ${CITATION_COUNT} \
--warnings ${WARNING_COUNT} \
--gates pass
This creates/updates grimoires/loa/ground-truth/generation-manifest.json with:
If br (beads_rust) is available, track generation as a beads task:
if command -v br &>/dev/null; then
# Create task before generation
br create --label "ground-truth:${DOC_TYPE}" --status in_progress
# On success
br close <task-id> --reason "Generated ${DOC_TYPE} with ${CITATION_COUNT} verified citations"
# On repair loop exhaustion
br update <task-id> --status blocked --comment "Repair loop exhausted after 3 iterations"
fi
If br is not available, skip silently — beads integration is optional.
| Failure | Recovery |
|---------|----------|
| /ride output missing | Prompt user to run /ride first |
| /ride output stale (>7 days) | Warn user; proceed with stale data or prompt re-ride |
| Registry files missing | Fail fast with bootstrap command |
| Quality gate fails | Enter REPAIR loop (max 3 iterations) |
| Repair loop exhausted | HALT with failure report; save last draft |
| yq not installed | Warn; skip registry-consistency gate |
If the same document type fails verification 3 consecutive times across separate invocations,
log a warning to grimoires/loa/NOTES.md:
## Blockers
- [{date}] ground-truth: {doc-type} failed verification 3 consecutive times.
Last failure: {gate} on {citation}.
Likely cause: /ride reality is stale or features.yaml is out of date.
Action: Re-run /ride and review features.yaml.
testing
# valid-skill Test skill with valid license for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of valid licenses.
testing
# grace-skill Test skill in license grace period for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of licenses in grace period.
testing
# expired-skill Test skill with expired license for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of expired licenses.
testing
# skill-b Test skill B from test-pack for unit testing. ## Purpose Used in test_pack_support.bats to verify pack validation and skill loading.