@behaghel/pi-domain-tree 0.4.0 → 0.4.1
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/README.md +2 -0
- package/package.json +1 -1
- package/pi/extension.ts +12 -3
package/README.md
CHANGED
|
@@ -168,6 +168,8 @@ Rigor scales with classification:
|
|
|
168
168
|
- **Supporting** domains: warning when missing
|
|
169
169
|
- **Generic** domains: only when the integration boundary changes
|
|
170
170
|
|
|
171
|
+
The Pi spec-on-touch guard permits `write` and `edit` of `.md` files directly in the owning domain's specification directory, including a missing or invalid `README.md`. This allows specification creation and repair without disabling enforcement. The directory is the explicit `spec:` override or, otherwise, the first `code:` path. Markdown elsewhere and non-Markdown files in that directory are not exempt. Core and shared-kernel code changes remain blocked until the domain's `README.md` passes normative validation; repairing it unlocks code changes in the same session.
|
|
172
|
+
|
|
171
173
|
## License
|
|
172
174
|
|
|
173
175
|
`domain-tree` is free software licensed under the [Mozilla Public License 2.0](LICENSE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@behaghel/pi-domain-tree",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Domain-driven structure with explicit groups, strict manifests, normative domain and system corpora, and specification-wiki integrity.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MPL-2.0",
|
package/pi/extension.ts
CHANGED
|
@@ -384,6 +384,13 @@ For detailed reference, load the \`domain-navigator\` skill.
|
|
|
384
384
|
const resolved = await resolveDomainForFile(targetPath, domainRoot, domainsCache);
|
|
385
385
|
if (!resolved) return; // not in any domain
|
|
386
386
|
|
|
387
|
+
// Specs must be writable before they can satisfy the code-change gate.
|
|
388
|
+
// Exempt only sibling Markdown in this owner's canonical spec directory.
|
|
389
|
+
const entry = entryForResolution(domainsCache, resolved);
|
|
390
|
+
const specDir = entry ? specDirForEntry(domainRoot, entry) : null;
|
|
391
|
+
const absoluteTarget = resolve(domainRoot, targetPath);
|
|
392
|
+
if (specDir && absoluteTarget.endsWith(".md") && dirname(absoluteTarget) === resolve(specDir)) return;
|
|
393
|
+
|
|
387
394
|
// Check spec-on-touch for core domains
|
|
388
395
|
const domainType = resolved.type;
|
|
389
396
|
if (domainType === "core" || domainType === "shared-kernel") {
|
|
@@ -399,8 +406,9 @@ For detailed reference, load the \`domain-navigator\` skill.
|
|
|
399
406
|
reason:
|
|
400
407
|
`⚠️ **Domain boundary violation: ${domainLabel}** (type: **core**)\n\n` +
|
|
401
408
|
`This is a **core** domain — it is the competitive advantage of the project. ` +
|
|
402
|
-
`No spec exists for this domain yet. **Spec required before any code change.**\n\n` +
|
|
403
|
-
`
|
|
409
|
+
`No valid spec exists for this domain yet. **Spec required before any code change.**\n\n` +
|
|
410
|
+
`Create or repair the domain's \`README.md\`; specification Markdown edits are allowed. ` +
|
|
411
|
+
`Run \`/domain-tree:check\` for validation diagnostics.`,
|
|
404
412
|
};
|
|
405
413
|
}
|
|
406
414
|
|
|
@@ -410,7 +418,8 @@ For detailed reference, load the \`domain-navigator\` skill.
|
|
|
410
418
|
reason:
|
|
411
419
|
`⚠️ **Domain boundary violation: ${domainLabel}** (type: **shared-kernel**)\n\n` +
|
|
412
420
|
`This is **shared kernel** — changes affect ALL consuming domains. ` +
|
|
413
|
-
`No spec exists yet. **Spec required and all consumers must be notified.**\n\n` +
|
|
421
|
+
`No valid spec exists yet. **Spec required and all consumers must be notified.**\n\n` +
|
|
422
|
+
`Create or repair the domain's \`README.md\`; specification Markdown edits are allowed. ` +
|
|
414
423
|
`Check the context map in \`domains.yaml\` for which domains depend on this.`,
|
|
415
424
|
};
|
|
416
425
|
}
|