Controlled procedure for revising top-level specifications (FOUNDATIONS.md, DSL.md, GQL.md, architecture.md). REQUIRED when these documents need correction...
REQUIRED when you need to modify:
specification/1_FOUNDATIONS.mdspecification/2_DSL.mdspecification/3_GQL.mdimplementation/architecture.mdFor 0_META_ONTOLOGY.md, use revise-meta-ontology skill instead.
Specifications are the source of truth. Incorrect changes cascade into:
This procedure ensures changes are deliberate, justified, and propagated.
Before proceeding, verify:
If any checkbox is false, stop and reconsider.
Create a revision record:
cat >> .spec-revisions.log << 'EOF'
---
Date: [date]
Document: [which spec]
Section: [which section]
Problem: [what's wrong]
Evidence: [how you discovered it]
EOF
The document you're fixing must not contradict a higher document:
1_FOUNDATIONS.md β Philosophical principles (highest)
2_DSL.md β Must conform to FOUNDATIONS
3_GQL.md β Must conform to FOUNDATIONS
architecture.md β Must conform to all specification/ docs
If higher doc contradicts your fix, you must fix the higher doc first.
Write the corrected text. Be minimal β change only what's necessary.
## BEFORE (quote exact text)
[original text]
## AFTER (your revision)
[corrected text]
## JUSTIFICATION
[why this is correct]
Identify what else must change:
# What references this concept?
grep -r "[concept]" implementation/
grep -r "[concept]" specification/
List affected documents:
implementation/architecture.mdimplementation/components/*.mdimplementation/tests/*.md# Edit the specification file
# Make the minimal change documented in step 3
For each affected downstream document:
cat >> .spec-revisions.log << 'EOF'
Resolution: [what you changed]
Propagated to: [list of updated files]
---
EOF
# Check nothing is broken
cargo check --workspace
cargo test --workspace
Problem: GQL.md says KILL cascades to edges, but architecture.md says it doesn't.
Document: specification/3_GQL.md
Section: KILL statement
Problem: Says "KILL removes node only", but implementation/architecture.md
says "KILL removes node AND all incident edges"
Evidence: Implementing KILL, unclear which behavior is correct
Hierarchy check: FOUNDATIONS.md doesn't specify cascade behavior.
This is a GQL-level decision.
Architecture should conform to GQL, not vice versa.
BEFORE (GQL.md):
"KILL removes the specified node from the graph."
AFTER (GQL.md):
"KILL removes the specified node and all incident edges from the graph.
Higher-order edges about deleted edges are also deleted (cascade)."
JUSTIFICATION:
Dangling edges (edges with missing endpoints) violate graph integrity.
Cascade deletion is the only consistent behavior.
Downstream impact:
- architecture.md: Already says cascade, no change needed
- components/mutation.md: Verify cascade is specified β
- components/graph.md: Verify delete_node cascades β
- tests/mutation.md: Verify kill_cascades_edges test exists β