pi-aia-asf 0.5.0 → 0.6.0

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/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.0] - 2026-08-28
11
+
12
+ ### Added
13
+
14
+ - **06c Rule 9 — Documents are code: refactor them when they outgrow
15
+ editability** (new mandatory rule, Ai Applied tenet): when a document starts
16
+ causing writing/editing issues (edit-tool matching failures, truncation,
17
+ multi-topic bloat, every change touching the same big file), it is time to
18
+ refactor it — split by topic, keep the parent as an index/map, keep
19
+ cross-references exact, preserve content (Rule 8 applied to documents),
20
+ verify, and refactor before it hurts rather than after.
21
+ - **Wiring**: 06c "Where this applies" (Phase 6 + Phase 7), 06c anti-patterns
22
+ (letting a document grow until edits break; wall-of-prose SKILL.md), SKILL.md
23
+ Phase 6 note, Phase 7 modularity DoD (documents too), SKILL.md anti-pattern,
24
+ and the reference index (now 9 rules).
25
+
10
26
  ## [0.5.0] - 2026-08-28
11
27
 
12
28
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-aia-asf",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Ai Applied Agentic Software Factory — codifies the full software development flow: intake, research, spec capture, adversarial analysis, planning with approval gates, test-first implementation, and release. Requires pi-vigilant, pi-smart-web-search, pi-smart-fetch, pi-aia-browser, and pi-intercom.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -180,7 +180,10 @@ Keep the plan **implementation-ready**: any competent engineer (or agent) can ex
180
180
  > SSOT); no hardcoding (config-driven); **testable outside the host then integrated
181
181
  > verbatim** (same modules in tests and production); refactor what is too complex to
182
182
  > understand; layered with clear boundaries and an architecture writeup; full I/O debug
183
- > logging with replay; nothing breaks existing functionality.
183
+ > logging with replay; nothing breaks existing functionality. **Documents are code too
184
+ > (Rule 9): when a document outgrows editability (failing edits, truncation, multi-topic
185
+ > bloat), split it by topic and keep the parent as an index — never let it grow until
186
+ > editing breaks.**
184
187
 
185
188
  > **Read `references/06d-delegation.md` before delegating.** Work may be delegated two ways:
186
189
  > **intercom** (message another live pi session that owns relevant context — always `list`
@@ -212,7 +215,7 @@ Execute the task list milestone by milestone. Discipline rules:
212
215
 
213
216
  Run the **Definition of Done checklist** in `references/06b-testing-qa.md` (Rule 10). Every box must hold.
214
217
 
215
- Also check the **modularity DoD** from `references/06c-code-quality.md` (Phase 7 section): no duplicated shared logic, no hardcoded config values, every module tested standalone with the same calls it gets in the host, architecture writeup exists, existing functionality still green.
218
+ Also check the **modularity DoD** from `references/06c-code-quality.md` (Phase 7 section): no duplicated shared logic, no hardcoded config values, every module tested standalone with the same calls it gets in the host, architecture writeup exists, existing functionality still green. **Documents too (06c Rule 9)**: no document so large that editing it is fragile — if a doc you worked on started causing edit failures/truncation, it was refactored (split by topic, parent kept as index, cross-references updated).
216
219
 
217
220
  **Large work:** run `/asf verify` — it mechanically validates the **spec-to-code traceability matrix** (M1): every `met` spec must carry `trace` (outcome → codePath → testFile + assertion), testFile must exist, assertion must appear in it. FAIL rows block delivery. **Verify ingested specs from external planning docs too** — the doc's ✅ markers are claims, not evidence.
218
221
 
@@ -256,6 +259,7 @@ Also check the **modularity DoD** from `references/06c-code-quality.md` (Phase 7
256
259
  - ❌ Escalation/fallback logic re-implemented per caller instead of one shared escalation path
257
260
  - ❌ Shipping a module that cannot run/test standalone outside the host
258
261
  - ❌ Refactoring without the architecture writeup (see `references/06c-code-quality.md`)
262
+ - ❌ Letting a document grow until edits start breaking instead of splitting it (06c Rule 9)
259
263
  - ❌ Running parallel subagents that touch the same file — edits are silently lost (see `references/06d-delegation.md`)
260
264
  - ❌ Trusting a subagent's exit code or self-report instead of verifying the actual code/test result
261
265
  - ❌ Re-deriving context another live session already has instead of asking it over intercom
@@ -274,6 +278,6 @@ Also check the **modularity DoD** from `references/06c-code-quality.md` (Phase 7
274
278
  - `references/05-plan.md` — PLAN.md template with examples (incl. spec-to-code traceability matrix)
275
279
  - `references/06-implementation.md` — coding discipline details (incl. M4 challenge designs, M5 trace before claiming)
276
280
  - `references/06b-testing-qa.md` — **mandatory testing & QA standard** (14 rules + definition of done)
277
- - `references/06c-code-quality.md` — **mandatory modularity & maintainability standard** (8 rules, SSOT, testable-standalone, single escalation path)
281
+ - `references/06c-code-quality.md` — **mandatory modularity & maintainability standard** (9 rules, SSOT, testable-standalone, single escalation path, documents-are-code)
278
282
  - `references/06d-delegation.md` — **intercom & subagents**: when to message another session, when to spawn isolated workers, the no-mutual-dependencies rule, and why exit codes lie
279
283
  - `references/07-release.md` — release workflow (versioning, CHANGELOG, tags, npm, CI/CD)
@@ -141,6 +141,38 @@ existing functionality. Each rule below carries the lesson.
141
141
  - This is the SSOT/refactor safety net: refactoring restructures *structure*,
142
142
  never *behavior*.
143
143
 
144
+ ## Rule 9 — Documents are code: refactor them when they outgrow editability
145
+
146
+ > *"Whenever documents you work on become so big that they start causing
147
+ > writing / editing issues, it's time to refactor them."* — Ai Applied tenet
148
+
149
+ A document that is too big to edit safely is a **maintainability bug**, not a
150
+ fact of life. The same triggers that say "extract a module" for code say
151
+ "split this document" for docs:
152
+
153
+ - **Edit-tool failures**: `oldText` matching starts failing or needs huge
154
+ context; edits become fragile and overlapping.
155
+ - **Truncation**: the file approaches context limits; reads get cut off;
156
+ you can no longer see the whole document.
157
+ - **Multi-topic bloat**: one file covers several distinct subjects (e.g. a
158
+ SKILL.md that has grown into a wall of prose instead of a map).
159
+ - **Every change touches the same big file**: constant conflict risk, slow
160
+ review, no single place to look.
161
+
162
+ **The refactor pattern (documents):**
163
+
164
+ 1. **Split by topic** — one subject per document (like one responsibility per
165
+ module). Move detail into focused references; keep the parent as an
166
+ **index/map** that points to them.
167
+ 2. **Keep cross-references exact** — every pointer to the old content is
168
+ updated; nothing dangles.
169
+ 3. **Preserve content** — a doc refactor moves text, it does not rewrite or
170
+ drop it (Rule 8 applied to documents).
171
+ 4. **Verify** — re-read the split docs, confirm every referenced rule/topic
172
+ still exists and is reachable, and that the frontmatter/format stays valid.
173
+ 5. **Refactor before it hurts, not after** — if you notice edit friction
174
+ starting, that is the moment. Do not wait for a broken edit.
175
+
144
176
  ---
145
177
 
146
178
  ## Where this applies in ASF
@@ -152,11 +184,14 @@ existing functionality. Each rule below carries the lesson.
152
184
  their boundaries, the one-way dependencies, where shared truth lives, and
153
185
  how each module is tested standalone.
154
186
  - **Phase 6 (implementation)**: apply Rules 1–8 as you build; extract modules
155
- when triggers fire; write the architecture doc alongside the code.
187
+ when triggers fire; write the architecture doc alongside the code. Apply
188
+ Rule 9 to the documents you write: SKILL.md, references, PLAN.md, README —
189
+ split them when they outgrow editability.
156
190
  - **Phase 7 (verification)**: the DoD checklist includes: no duplicated shared
157
191
  logic (Rule 2), no hardcoded config values (Rule 3), every module tested
158
192
  standalone with the same calls (Rule 4), architecture doc written (Rule 6),
159
- existing functionality still green (Rule 8).
193
+ existing functionality still green (Rule 8). Documents: no doc so large that
194
+ editing it is fragile (Rule 9).
160
195
 
161
196
  ## Anti-patterns
162
197
 
@@ -168,3 +203,6 @@ existing functionality. Each rule below carries the lesson.
168
203
  - ❌ Refactoring "for fun" without the testability/debugging payoff
169
204
  - ❌ Shipping a module that cannot run outside the host
170
205
  - ❌ Skipping the architecture writeup ("the code is self-documenting")
206
+ - ❌ Letting a document grow until edits start breaking instead of splitting it
207
+ (Rule 9)
208
+ - ❌ A SKILL.md that is a wall of prose instead of a map to focused references