This repository was archived by the owner on May 4, 2026. It is now read-only.
Splitter: structural rules + tests; regenerate as 14-part hierarchy#1
Open
postpersonality wants to merge 4 commits intoCodeAlive-AI:mainfrom
Open
Splitter: structural rules + tests; regenerate as 14-part hierarchy#1postpersonality wants to merge 4 commits intoCodeAlive-AI:mainfrom
postpersonality wants to merge 4 commits intoCodeAlive-AI:mainfrom
Conversation
Update FPF submodule from a25a0a7 to b18acde — upstream "terminology cleanup in E.8, E.9, E.19" plus accumulated semio R1+ changes: - E.17.SD.* renamed to E.17.AUD.* (AuthoredUnitDiscipline) - New patterns under A.6 (RSIG, CSC), A.19 (SURF-SPACE, SUPPORT-VIEW), C.11 Decision Theory, C.22.1, C.26 Quantum-Like Modeling family, E.11 First-Practical Entry, I.2 walkthroughs, J.4 neighborhood index Sections regenerated with the existing splitter; no script changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…erarchy Three deviations in the upstream FPF spec produced spurious or mis-nested folders under naive H1/H2 splitting: A. False H1s from markdown table rows (`# | col | ...`) — two table rows in Part F were parsed as section headings, creating spurious `block-fpf-u-type-...` and `block-base-concept-scale-map` folders. B. Empty H1 wrappers — `# Part E` and `# Part F` are top-level wrappers whose only child is another `# H1` (`Section E-I`, `Cluster F.I`), producing two empty folders next to two real ones. C. Misplaced clusters — `# Cluster A.IV.A` and `# Cluster A.V` are semantic children of Part A, but authored as `# H1`, so they appeared as siblings of Part A instead of nested under it. The splitter now applies three rules: - Filter `^# \|` lines (table rows pretending to be H1). - Fold empty H1 wrappers into the next H1's preamble; the merged folder takes the wrapper's title (canonical Part name). - Nest H1s whose pattern ID matches the previous Part's letter as subfolders of that Part. Result on the current spec: 20 top-level folders → 14 Parts plus 2 nested clusters under Part A (16 directories, 241 files). Add scripts/test_split_spec.py with 6 unittest cases (3 covering the new rules, 3 regression cases ensuring current correct behaviour is preserved) and a .gitignore for __pycache__/*.pyc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adjust navigation to match the new section layout: - SKILL.md thinking-verb router: renumber section references (Part B 07→05, Part C 08→06, Part D 09→07, Part E 11→08, Part F 13→09, Part G 16→10, Part K 20→14); route A.IV.A and A.V via Part A. - SKILL.md Step 2: note that nested clusters require descending into the cluster's own _index.md after the parent Part's. - SKILL.md Section INDEX: collapse from 20 rows to 14, fold A.IV.A and A.V into Part A's row with linked sub-cluster descriptions. - SKILL.md "Sharpen expression" router row: replace stale E.17.SD.SPR / E.17.SD.OOTD references with E.17.AUD umbrella + AUD.LHR / AUD.OOTD branches (renamed in upstream). - SKILL.md: add "Decide under uncertainty" row pointing to C.11 Decsn-CAL (new normative pattern in Part C). - README.md / README-RU.md: rewrite the abstract (16 dirs, 241 files), the structure block (showing nested clusters under Part A), and the Sections table (14 rows + 2 nested cluster rows). - FPF-SKILL-UPDATE-GUIDE.md: refresh router-row example and add a note about nested-cluster path syntax. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates the FPF specification structure, introducing a hierarchical organization with sub-clusters and improving the split_spec.py script to handle these changes. Several documentation files were updated to reflect these structural improvements. I have identified a systematic search-and-replace error where U. was incorrectly replaced by s. in sections/04-part-a-kernel-architecture-cluster/cluster-a-v---constitutional-principles-of-the-kernel/04-a-10---evidence-graph-referring.md, and a logic issue in scripts/split_spec.py where an empty 'Contents' header is generated for sections containing only sub-clusters.
…dren When a Part has only nested sub-clusters and no own H2 children, build_toc was emitting a stray `## Contents` header with no entries below it. This case does not occur in the current FPF spec but would manifest if a Part is authored with no `## H2` patterns and only nested cluster H1s. Guard the header behind `if h2_entries:`. Add a test covering the synthetic case (Part with preamble + nested cluster, no own H2s). Reported via gemini-code-assist on PR review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three deviations were producing spurious or mis-nested folders under the
naive H1/H2 split:
# | Block | FPF U.Type | …) — twomarkdown table rows in Part F were parsed as section headings, creating
empty
block-fpf-u-type-…andblock-base-concept-scale-mapfolders.# Part Eand# Part Fare top-levelwrappers whose only child is another
# H1(Section E-I,Cluster F.I), producing two empty folders next to two real ones.# Cluster A.IV.Aand# Cluster A.Varesemantic children of Part A but authored as
# H1, so they appearedas siblings of Part A instead of nested under it.
This PR adds three rules to
scripts/split_spec.py, covers them withunit tests, regenerates
sections/, and updates SKILL.md and the READMEsto match.
The splitter remains a representation morphism: pattern text in leaf
files is preserved verbatim. Only the directory structure and the
auto-generated
_index.mdTOCs change.Result
.mdfilesThe two new nested folders sit under Part A:
cluster-a-iv-a-…(22 leaffiles for the Signature Stack) and
cluster-a-v-…(31 leaf files forthe Constitutional Principles).
Commits
Each commit is atomic and reviewable independently.
1.
chore: bump FPF submodule and regenerate sections (semio R1+ upstream)Pure upstream sync — no script changes. FPF submodule bumped from
a25a0a7tob18acde(terminology cleanup in E.8/E.9/E.19 plusaccumulated semio R1+ changes: SD→AUD rename, new patterns under A.6,
A.19, C.11, C.22.1, C.26 family, E.11, I.2, J.4). Sections regenerated
with the existing splitter so the structural diff is purely upstream
content evolution.
2.
feat(splitter): structural rules with tests; regenerate as 14-part hierarchySplitter additions:
^# \|lines (table rowspretending to be H1).
merged folder takes the wrapper's title (canonical Part name).
A.IV.A,A.V, …) matches theprevious Part's letter become subfolders of that Part instead of
top-level peers.
Plus
scripts/test_split_spec.pywith six unittest cases — three forthe new rules, three as regression cases ensuring current correct
behaviour is preserved (title-page-with-content does not merge with the
next H1; normal H1 with H2 children is unchanged; H1 with preamble but
no H2 children does not merge with an unrelated peer).
.gitignoreadded for__pycache__/and*.pyc.sections/regenerated under the new rules — same content, fewerfolders, 2 nested clusters under Part A.
3.
docs: update SKILL.md and READMEs for 14-part nested structure(Part B 07→05, Part C 08→06, Part D 09→07, Part E 11→08, Part F 13→09,
Part G 16→10, Part K 20→14); route A.IV.A and A.V via Part A.
into the cluster's own
_index.mdafter the parent Part's.and A.V into Part A's row with linked sub-cluster descriptions.
files), the structure block (showing nested clusters), and the
Sections table.
note about nested-cluster path syntax.
Test plan
python3 scripts/test_split_spec.py— 6/6 PASS on the new rulesand regression cases.
python3 scripts/split_spec.pyon the bumped submodule produces14 top-level Parts + 2 nested clusters; output reports
"Wrote 16 directories, 241 files".
git statusafter regeneration is clean — splitter isidempotent.
_index.mdreferences inSKILL.mdresolve toexisting folders.
Reviewing tips
files). Skim the FPF submodule pointer change and read the spec
diff at the upstream repo for content review.
scripts/split_spec.pyandscripts/test_split_spec.py. Thesections/diff is consequentialand reproducible by re-running the splitter.