deepclause-pi 0.1.4 → 0.2.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/README.md +23 -0
- package/dist/diagram/extract.d.ts +5 -0
- package/dist/diagram/extract.js +701 -0
- package/dist/diagram/grade.d.ts +41 -0
- package/dist/diagram/grade.js +70 -0
- package/dist/diagram/validate.d.ts +36 -0
- package/dist/diagram/validate.js +148 -0
- package/dist/diagram/viewer.d.ts +30 -0
- package/dist/diagram/viewer.js +94 -0
- package/dist/diagram/workspace.d.ts +24 -0
- package/dist/diagram/workspace.js +106 -0
- package/dist/index.js +142 -2
- package/dist/model.d.ts +16 -0
- package/dist/model.js +28 -0
- package/docs/BLOG_POST_PI_EXTENSION.md +253 -0
- package/docs/DIAGRAM_INTEGRATION_PROPOSAL.md +154 -0
- package/package.json +6 -2
- package/skills/handbook-dml/SKILL.md +265 -0
- package/src/assets/AGENTS.md +16 -0
- package/src/assets/vendor/mermaid.min.js +3636 -0
- package/src/assets/viewer.template.html +319 -0
- package/src/diagram/extract.ts +721 -0
- package/src/diagram/grade.ts +104 -0
- package/src/diagram/validate.ts +188 -0
- package/src/diagram/viewer.ts +133 -0
- package/src/diagram/workspace.ts +109 -0
- package/src/index.ts +158 -2
- package/src/model.ts +46 -0
package/README.md
CHANGED
|
@@ -131,6 +131,29 @@ The resulting `.dml` file is the plan. Steps use one of two executors:
|
|
|
131
131
|
|
|
132
132
|
For each pi step, only the exact tools named in the committed plan are temporarily active. They must still be installed and active when execution begins; existing tool policies, UI, and approvals remain authoritative. DeepClause control tools cannot be requested recursively. The prior active-tool set is restored after success, failure, or cancellation.
|
|
133
133
|
|
|
134
|
+
## Diagrams
|
|
135
|
+
|
|
136
|
+
Ask pi for a diagram of any DML file in plain language:
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
Make a presentation-grade diagram of .pi/deepclause/skills/deep_research.dml
|
|
140
|
+
Give me a specification-grade diagram of src/report.dml
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Pi calls the always-active `dc_diagram` model tool, which:
|
|
144
|
+
|
|
145
|
+
1. extracts a deterministic Mermaid seed from the DML in-process,
|
|
146
|
+
2. has the active pi model rewrite it in the requested grade,
|
|
147
|
+
3. validates each attempt (structural checks, plus the real Mermaid parser when Chrome is available),
|
|
148
|
+
4. writes the sidecar under `.pi/deepclause/diagrams/`, rebuilds the self-contained offline `viewer.html`, and opens it.
|
|
149
|
+
|
|
150
|
+
Grades:
|
|
151
|
+
|
|
152
|
+
- **presentation** — about 8-12 nodes, plain language, headline numbers; for slides and overviews.
|
|
153
|
+
- **specification** — function names, task/tool roles, post-conditions; for engineers.
|
|
154
|
+
|
|
155
|
+
Selecting `both` produces both sidecars. The DML source may be anywhere (workspace-relative or absolute); only the generated viewer is confined to `.pi/deepclause/`. `dc_diagram` never executes the DML and needs no shell approval. Regenerating a grade replaces only that grade's sidecar (`<name>.presentation.mmd` / `<name>.specification.mmd`). The Mermaid bundle is vendored so the viewer works offline.
|
|
156
|
+
|
|
134
157
|
## Runtime tools and approval
|
|
135
158
|
|
|
136
159
|
The extension never exposes pi's general tool registry directly to ordinary DML. The optional `dc_run` tool runs an existing DML program; inside that runtime, only these host operations are registered:
|