Repository navigation
Commit 48e6651
Let L1 accept new-directory indexes in bootstrap mode, and check index links
kb init (design v3 §9.2/§9.3) must create repos/<repo>/_index.md and
components/<group>/_index.md, which check_changeset refuses outright
("index files are never created or deleted by a change set").
check_changeset gains a keyword `bootstrap` (default False, behaviour
unchanged). When set it relaxes exactly two rules:
- an _index.md may be created in a directory that had no files at base;
it must link every page and child-directory index in its directory, and an
existing parent index must link it. Creating an index in an existing
directory and deleting any index stay refused.
- the shared knowledge/repos/_index.md may be modified (listing a new
repository); adding or deleting it stays refused.
check_index_links(base, head) is the init-side check for index edits that L1
only classifies as prose (tables, cross-directory links): links a change adds
must resolve inside the knowledge tree, a changed index keeps its base links,
and every new page or child index is linked from its parent index.
A test pins that only kb_service/init_stages.py (kb init, a later PR) may pass
bootstrap=True.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 507deed commit 48e6651
4 files changed
Lines changed: 595 additions & 9 deletions
File tree
- doc/architecture/SPEC
- knowledge_service
- src/infermatrix_copilot/knowledge_service
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
27 | 53 | | |
28 | 54 | | |
29 | 55 | | |
30 | 56 | | |
31 | 57 | | |
32 | 58 | | |
| 59 | + | |
| 60 | + | |
33 | 61 | | |
34 | 62 | | |
0 commit comments