12 -Before any write, explain that `.system/SYSTEM.md`, `.system/MISSION.md`, and `.system/RULES.md` are privileged instructions future agents may receive as authority.
13 -Tell the user not to place secrets, credentials, raw private data, or binary bytes in them.
14 -Preserve unrelated dirty work.
15 -Never overwrite an existing core file.
16 -Never silently repair malformed config, root conflict, prefix conflict, newer project version, or unsafe path.
17 -Resolve `../../scripts/init.mjs` and `../../scripts/doctor.mjs` against this skill directory.
18 -Use absolute paths with `node --no-warnings --experimental-strip-types`.
12 +Before any write, explain that `.system/SYSTEM.md`, `.system/MISSION.md`, and
13 +`.system/RULES.md` are privileged instructions future agents may receive as
14 +authority. Tell the user not to place secrets, credentials, raw private data, or
15 +binary bytes in them.
17 +Preserve unrelated dirty work. Never overwrite an existing core file. Never
18 +silently repair malformed config, root conflict, prefix conflict, newer project
19 +version, or unsafe path. Resolve `../../scripts/init.mjs` and
20 +`../../scripts/doctor.mjs` against this skill directory. Use absolute paths with
21 +`node --no-warnings --experimental-strip-types`.
22 25 Use `scripts/init.mjs inspect`:
23 26 `node --no-warnings --experimental-strip-types <absolute-init-path> inspect <current-cwd>`.
24 -Pass a command prefix only as a proposal, not approval.
25 -Report every `ROOT`, `PREFIX`, `CORE`, `CREATE`, and `UPGRADE` line; stop on `ERROR`.
26 -Read existing `.system`, README/purpose docs, agent instructions, package/language manifests, build files, task config, conventional tests, top-level structure, and security/data/release config without mutation.
27 -Summarize facts, conflicts, and unknowns; never ask the user to repeat a consistent inspected fact.
27 +Pass a command prefix only as a proposal, not approval. Report every `ROOT`,
28 +`PREFIX`, `CORE`, `CREATE`, and `UPGRADE` line; stop on `ERROR`.
30 +Read existing `.system`, README/purpose docs, agent instructions, package/language
31 +manifests, build files, task config, conventional tests, top-level structure, and
32 +security/data/release config without mutation. Summarize facts, conflicts, and
33 +unknowns; never ask the user to repeat a consistent inspected fact.
31 -For first initialization or missing core truth, ask one focused question at a time and wait.
32 -Cover unresolved topics in order: purpose/outcome; audience/operators; non-goals/boundaries; engineering constraints/environments; security/trust; data ownership/retention/privacy/migration; tests/verification; release expectations/compatibility/rollout/rollback.
33 -Challenge vagueness or conflict with one follow-up at a time.
34 -When all cores exist on rerun, preserve settled truth and ask only about a machine upgrade or explicit requested gap.
37 +For first initialization or missing core truth, ask one focused question at a time and wait. Cover unresolved topics in order: purpose/outcome;
38 +audience/operators; non-goals/boundaries; engineering constraints/environments;
39 +security/trust; data ownership/retention/privacy/migration; tests/verification;
40 +release expectations/compatibility/rollout/rollback. Challenge vagueness or
41 +conflict with one follow-up at a time.
36 -##
Prefix and machine assets 43 +When all cores exist on rerun, preserve settled truth and ask only about a
44 +machine upgrade or explicit requested gap.
46 +##
Prefix and machine state 48 +Propose one prefix from prompt argument, repository name, package name, or title,
49 +in that order. Require `[A-Z][A-Z0-9]{1,7}` and ask `Approve project prefix
50 +PREFIX?`. Only explicit yes approves; otherwise request one replacement,
51 +validate, and ask again. Existing config prefix is authoritative; stop rather
52 +than change a conflict.
54 +config.json is the only machine-owned file. Document bundles contain index.md and assets.
55 +New initialization creates the `.system` topology, typed document directories,
56 +and config; it does not create or copy CSS. No new initialization creates or copies CSS.
38 -Propose one prefix from prompt argument, repository name, package name, or title, in that order.
39 -Require `[A-Z][A-Z0-9]{1,7}` and ask `Approve project prefix PREFIX?`.
40 -Only explicit yes approves; otherwise request one replacement, validate, and ask again.
41 -Existing config prefix is authoritative; stop rather than change a conflict.
42 58 After approval, use `scripts/init.mjs apply`:
43 59 `node --no-warnings --experimental-strip-types <absolute-init-path> apply <root> <approved-prefix>`.
44 -Relay every `WROTE` and `PENDING` line.
45 -If pending, display every config transition and CSS replacement, then ask `Approve the reported machine-owned config/CSS upgrade?`.
46 -On yes, use `scripts/init.mjs upgrade`:
60 +Relay every `WROTE`, `REMOVED`, and `PENDING` line. If pending, display every
61 +config transition and the removal of obsolete machine-owned `system.css` before
62 +asking `Approve the reported machine-owned config upgrade?`. On yes, use
63 +`scripts/init.mjs upgrade`:
47 64 `node --no-warnings --experimental-strip-types <absolute-init-path> upgrade <root> <approved-prefix>`.
48 -On no, preserve assets, state doctor remains non-green, and do not claim completion.
65 +On no, preserve assets, state doctor remains non-green, and do not claim
50 68 ##
Separate core approvals 52 -Use inspected facts and answers; never invent an unanswered rule.
53 -Do not modify, reformat, or seek blanket reapproval for a `preserve` core.
54 -For missing mission, show the whole project-specific draft with `# Mission`, `## Purpose`, `## Audience`, `## Outcomes`, and `## Non-goals`.
55 -Ask exactly: `Approve writing .system/MISSION.md?`
56 -Revise and redisplay when requested.
57 -Write .system/MISSION.md only after explicit approval of that displayed draft.
58 -For missing rules, show the whole project-specific draft with `# Rules`, `## Engineering constraints`, `## Security and data`, `## Testing`, and `## Release`.
59 -Ask exactly: `Approve writing .system/RULES.md?`
60 -Revise and redisplay when requested.
61 -Write .system/RULES.md only after explicit approval of that displayed draft.
70 +Use inspected facts and answers; never invent an unanswered rule. Do not modify,
71 +reformat, or seek blanket reapproval for a `preserve` core.
73 +For missing mission, show the whole project-specific draft with `# Mission`,
74 +`## Purpose`, `## Audience`, `## Outcomes`, and `## Non-goals`. Ask exactly:
75 +`Approve writing .system/MISSION.md?` Revise and redisplay when requested. Write .system/MISSION.md only after explicit approval of that displayed draft.
77 +For missing rules, show the whole project-specific draft with `# Rules`,
78 +`## Engineering constraints`, `## Security and data`, `## Testing`, and
79 +`## Release`. Ask exactly: `Approve writing .system/RULES.md?` Revise and redisplay when requested. Write .system/RULES.md only after explicit approval of that displayed draft.
62 81 For missing topology, show this complete canonical draft without project facts:
69 88 MISSION.md defines why this project exists.
70 89 RULES.md defines how work must be done.
71 90 Approved specs define what behavior must exist.
72 -Metadata is the authority for system-document relationships.
91 +YAML frontmatter is the authority for system-document relationships.
76 -Humans own SYSTEM.md, MISSION.md, RULES.md, specs, and accepted spec-owned mockups.
77 -Agents may draft roadmaps and plans for human review and maintain issues and research.
78 -Machine-owned config.json and system.css change only through initialization.
95 +Humans own core laws and every existing file in a spec bundle.
96 +Agents author roadmaps/plans for review and maintain issues/research.
97 +config.json is machine-owned.
82 -Authored documents are editable HTML in matching .system directories.
83 -Each uses ../system.css and exactly one system-meta JSON block.
101 +Authored documents live at .system/<
type>/<
ID>-<
slug>/index.md.
102 +Every other file in that directory belongs to the document.
84 103 Specs are leaf truth.
85 104 Roadmaps reference one spec; plans reference one spec and optionally one matching roadmap phase; issues reference violated specs.
86 105 Tests use SYSTEM-SPEC comments.
87 -Accepted mockups live beside and belong to their spec.
92 110 Invalid or outdated state is reported and never silently repaired.
95 -Ask exactly: `Approve writing .system/SYSTEM.md?`
96 -Revise and redisplay when requested.
97 -Write .system/SYSTEM.md only after explicit approval of that displayed draft.
98 -Denied approval leaves the core absent and initialization incomplete.
113 +Ask exactly: `Approve writing .system/SYSTEM.md?` Revise and redisplay when
114 +requested. Write .system/SYSTEM.md only after explicit approval of that displayed draft. Denied approval leaves the core absent and initialization incomplete.
102 118 Use `scripts/doctor.mjs` after approved writes:
103 119 `node --no-warnings --experimental-strip-types <absolute-doctor-path> <root>`.
104 -Preserve report order; never hide or automatically repair findings.
105 -Exit 0 with `OK The System is valid` means completion; exit 1 means incomplete or invalid.
106 -Report root, prefix, created machine paths, preserved/new cores, upgrade decision, and doctor status.
107 -Never launch a browser or editor.
108 -Do not commit unless separately asked.
120 +Preserve report order; never hide or automatically repair findings. Exit 0 with
121 +`OK The System is valid` means completion; exit 1 means incomplete or invalid.
122 +Report root, prefix, created machine paths, preserved/new cores, upgrade decision,
123 +and doctor status. Never launch a browser or editor. Do not commit unless