@karmaniverous/stan-core 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/mjs/index.js +1 -1
- package/dist/stan.system.md +5 -7
- package/package.json +1 -1
package/dist/stan.system.md
CHANGED
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
1. Integrity-first intake: enumerate archive.tar and verify bytes read match header sizes; stop and report on mismatch.
|
|
7
7
|
2. Dev plan first: keep stan.todo.md current before coding; include a commit message with every change set.
|
|
8
|
-
3. Plain unified diffs only:
|
|
8
|
+
3. Plain unified diffs only: include a/ and b/ prefixes; ≥3 lines of context; LF endings.
|
|
9
9
|
4. Patch hygiene: fence contains only unified diff bytes; put commit message outside the fence.
|
|
10
10
|
5. Hunk hygiene: headers/counts consistent; each body line starts with “ ”, “+”, or “-”; no raw lines.
|
|
11
11
|
6. Coverage: one Patch per changed file. Full Listings are not required by default in normal replies; include them only on explicit request. Diagnostics replies require Full Listings only (no patches). Skip listings for deletions.
|
|
12
12
|
7. Services‑first: ports & adapters; thin adapters; pure services; co‑located tests.
|
|
13
13
|
8. Long‑file rule: ~300 LOC threshold; propose splits or justify exceptions; record plan/justification in stan.todo.md.
|
|
14
14
|
9. Fence hygiene: choose fence length dynamically (max inner backticks + 1); re‑scan after composing. **Table of Contents**
|
|
15
|
+
|
|
15
16
|
- Role
|
|
16
17
|
- Vocabulary aliases
|
|
17
18
|
- Separation of Concerns: System vs Project
|
|
@@ -80,7 +81,6 @@ Key rules
|
|
|
80
81
|
- Create/delete:
|
|
81
82
|
- New file: `--- /dev/null` and `+++ b/<path>`
|
|
82
83
|
- Delete: `--- a/<path>` and `+++ /dev/null`
|
|
83
|
-
- Forbidden wrappers (not valid diffs): `*** Begin Patch`, `*** Add File:`, `Index:` or mbox/email prelude lines. Do not use them.
|
|
84
84
|
|
|
85
85
|
Canonical examples
|
|
86
86
|
|
|
@@ -660,7 +660,6 @@ This is a HARD GATE: the composition MUST fail when a required documentation pat
|
|
|
660
660
|
- Patches must be plain unified diffs.
|
|
661
661
|
- Prefer diffs with a/ b/ prefixes and stable strip levels; include sufficient context.
|
|
662
662
|
- Normalize to UTF‑8 + LF. Avoid BOM and zero‑width characters.
|
|
663
|
-
- Forbidden wrappers: do not emit `*** Begin Patch`, `*** Add File:`, `Index:` or other non‑unified preambles; they are not accepted by `git apply` or `stan patch`.
|
|
664
663
|
- Tool preference & scope
|
|
665
664
|
- File Ops are the preferred method for moving, copying, and deleting files or directories (single or bulk).
|
|
666
665
|
- Diff Patches are the preferred method for creating files or changing them in place.
|
|
@@ -1151,7 +1150,6 @@ Before sending a reply, verify all of the following:
|
|
|
1151
1150
|
- There is exactly one Patch block per changed file.
|
|
1152
1151
|
- Each Patch block MUST contain exactly one `diff --git a/<path> b/<path>` header.
|
|
1153
1152
|
- No Patch block contains more than one `diff --git a/<path> b/<path>`.
|
|
1154
|
-
- Forbidden wrappers are not present: `*** Begin Patch`, `*** Add File:`, `Index:` (or similar non‑unified preludes).
|
|
1155
1153
|
- For new files, headers MUST be `--- /dev/null` and `+++ b/<path>`.
|
|
1156
1154
|
- For deleted files, headers MUST be `--- a/<path>` and `+++ /dev/null`.
|
|
1157
1155
|
- Never mix a Patch and a Full Listing for the same file in the same turn.
|
|
@@ -1184,11 +1182,10 @@ Before sending a reply, verify all of the following:
|
|
|
1184
1182
|
|
|
1185
1183
|
Follow the canonical rules in “Patch Policy” (see earlier section). The Response Format adds presentation requirements only (fencing, section ordering, per‑file one‑patch rule). Do not duplicate prose inside patch fences; emit plain unified diff payloads.
|
|
1186
1184
|
|
|
1187
|
-
Optional Full Listings — Normal replies only: when explicitly requested by the user in a non‑diagnostics turn, include Full Listings for the relevant files; otherwise omit listings by default.
|
|
1188
|
-
Diagnostics replies (after patch‑failure envelopes) MUST provide Full, post‑patch listings as described above (no patches, union across envelopes, no commit message).
|
|
1189
|
-
Skip listings for deletions.
|
|
1185
|
+
Optional Full Listings — Normal replies only: when explicitly requested by the user in a non‑diagnostics turn, include Full Listings for the relevant files; otherwise omit listings by default. Diagnostics replies (after patch‑failure envelopes) MUST provide Full, post‑patch listings as described above (no patches, union across envelopes, no commit message). Skip listings for deletions.
|
|
1190
1186
|
|
|
1191
1187
|
Dev plan Completed enforcement (pre‑send)
|
|
1188
|
+
|
|
1192
1189
|
- If `<stanPath>/system/stan.todo.md` is patched in this turn, enforce late‑append semantics for the “Completed” section:
|
|
1193
1190
|
- “Completed” MUST remain the final major section of the document.
|
|
1194
1191
|
- Only append new lines at the end of “Completed”. Do NOT modify existing lines above the final append point (no edits, no insertions, no re‑ordering).
|
|
@@ -1199,6 +1196,7 @@ Dev plan Completed enforcement (pre‑send)
|
|
|
1199
1196
|
## File Ops (optional pre‑ops; structural changes)
|
|
1200
1197
|
|
|
1201
1198
|
Use “### File Ops” to declare safe, repo‑relative file and directory operations that run before content patches. File Ops are for structure (moves/renames, creates, deletes), while unified‑diff Patches are for editing file contents.
|
|
1199
|
+
|
|
1202
1200
|
- Verbs:
|
|
1203
1201
|
- mv <src> <dest> # move/rename a file or directory (recursive), no overwrite
|
|
1204
1202
|
- cp <src> <dest> # copy a file or directory (recursive), no overwrite; creates parents for <dest>
|
package/package.json
CHANGED