@artale/pi-real-engineering 0.2.1 → 0.3.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 +70 -59
- package/docs/receipts/singularity-proof-20260619.md +159 -0
- package/extensions/real-engineering.ts +30 -6
- package/package.json +35 -34
package/README.md
CHANGED
|
@@ -1,59 +1,70 @@
|
|
|
1
|
-
# @artale/pi-real-engineering
|
|
2
|
-
|
|
3
|
-
Plan → Build → Test → Review → Ship for Pi, with verifier guardrails and receipts.
|
|
4
|
-
|
|
5
|
-
This is not a loose skills pack. It installs one workflow command plus the small skills that make the loop work.
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
pi install npm:@artale/pi-real-engineering
|
|
11
|
-
/reload
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Golden path
|
|
15
|
-
|
|
16
|
-
```text
|
|
17
|
-
idea → safety gate → ADW plan/build/test/review → receipt → guarded deploy
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Run it:
|
|
21
|
-
|
|
22
|
-
```text
|
|
23
|
-
/real-engineering build the smallest safe version of <idea>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
The command makes Pi:
|
|
27
|
-
|
|
28
|
-
1. restate the idea
|
|
29
|
-
2. run a safety gate before risky writes/commands/deploys
|
|
30
|
-
3. plan/build/test/review in the smallest useful loop
|
|
31
|
-
4. produce a receipt: changed files, commands run, test output, review result, deploy decision
|
|
32
|
-
5. deploy only when explicitly requested and verified
|
|
33
|
-
|
|
34
|
-
## Included skills
|
|
35
|
-
|
|
36
|
-
| Skill | Purpose |
|
|
37
|
-
|---|---|
|
|
38
|
-
| `setup-artale-skills` | Create repo conventions: `AGENTS.md`, `CONTEXT.md`, `docs/adr/`, `.pi/plans/` |
|
|
39
|
-
| `grill-with-docs` | Interview against docs/context before implementation |
|
|
40
|
-
| `tdd` | Red-green-refactor one vertical slice at a time |
|
|
41
|
-
| `diagnosing-bugs` | Reproduce, minimize, hypothesize, instrument, fix |
|
|
42
|
-
| `domain-modeling` | Maintain shared language in `CONTEXT.md` and ADRs |
|
|
43
|
-
| `codebase-design` | Design deep modules with small interfaces and clean seams |
|
|
44
|
-
|
|
45
|
-
## Receipt format
|
|
46
|
-
|
|
47
|
-
```md
|
|
48
|
-
## Real Engineering Receipt
|
|
49
|
-
- Idea:
|
|
50
|
-
- Safety gate:
|
|
51
|
-
- Plan:
|
|
52
|
-
- Changed files:
|
|
53
|
-
- Commands run:
|
|
54
|
-
- Test output:
|
|
55
|
-
- Review result:
|
|
56
|
-
- Deploy decision:
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
No new infra. The workflow uses Pi commands, verifier discipline, and your existing deploy path.
|
|
1
|
+
# @artale/pi-real-engineering
|
|
2
|
+
|
|
3
|
+
Plan → Build → Test → Review → Ship for Pi, with verifier guardrails and receipts.
|
|
4
|
+
|
|
5
|
+
This is not a loose skills pack. It installs one workflow command plus the small skills that make the loop work.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pi install npm:@artale/pi-real-engineering
|
|
11
|
+
/reload
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Golden path
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
idea → safety gate → ADW plan/build/test/review → receipt → guarded deploy
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Run it:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
/real-engineering build the smallest safe version of <idea>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The command makes Pi:
|
|
27
|
+
|
|
28
|
+
1. restate the idea
|
|
29
|
+
2. run a safety gate before risky writes/commands/deploys
|
|
30
|
+
3. plan/build/test/review in the smallest useful loop
|
|
31
|
+
4. produce a receipt: changed files, commands run, test output, review result, deploy decision
|
|
32
|
+
5. deploy only when explicitly requested and verified
|
|
33
|
+
|
|
34
|
+
## Included skills
|
|
35
|
+
|
|
36
|
+
| Skill | Purpose |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `setup-artale-skills` | Create repo conventions: `AGENTS.md`, `CONTEXT.md`, `docs/adr/`, `.pi/plans/` |
|
|
39
|
+
| `grill-with-docs` | Interview against docs/context before implementation |
|
|
40
|
+
| `tdd` | Red-green-refactor one vertical slice at a time |
|
|
41
|
+
| `diagnosing-bugs` | Reproduce, minimize, hypothesize, instrument, fix |
|
|
42
|
+
| `domain-modeling` | Maintain shared language in `CONTEXT.md` and ADRs |
|
|
43
|
+
| `codebase-design` | Design deep modules with small interfaces and clean seams |
|
|
44
|
+
|
|
45
|
+
## Receipt format
|
|
46
|
+
|
|
47
|
+
```md
|
|
48
|
+
## Real Engineering Receipt
|
|
49
|
+
- Idea:
|
|
50
|
+
- Safety gate:
|
|
51
|
+
- Plan:
|
|
52
|
+
- Changed files:
|
|
53
|
+
- Commands run:
|
|
54
|
+
- Test output:
|
|
55
|
+
- Review result:
|
|
56
|
+
- Deploy decision:
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
No new infra. The workflow uses Pi commands, verifier discipline, and your existing deploy path.
|
|
60
|
+
|
|
61
|
+
## Package aliases
|
|
62
|
+
|
|
63
|
+
Both packages install the same workflow:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pi install npm:pi-real-engineering
|
|
67
|
+
pi install npm:@artale/pi-real-engineering
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Prefer `npm:pi-real-engineering` for the short golden path install.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Codebase Singularity proof — 2026-06-19
|
|
2
|
+
|
|
3
|
+
## Idea
|
|
4
|
+
Prove the Pi/Artale agentic layer can run the golden path with live truth:
|
|
5
|
+
|
|
6
|
+
```text
|
|
7
|
+
idea → safety gate → ADW plan/build/test/review → receipt → guarded deploy decision
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Safety gate
|
|
11
|
+
Allowed:
|
|
12
|
+
|
|
13
|
+
- one local receipt file write
|
|
14
|
+
- read-only package/version checks
|
|
15
|
+
- read-only command-contract grep
|
|
16
|
+
- read-only factory status request
|
|
17
|
+
- read-only live Docker count/list over SSH
|
|
18
|
+
- read-only git diff/status checks
|
|
19
|
+
|
|
20
|
+
Forbidden:
|
|
21
|
+
|
|
22
|
+
- no deploy
|
|
23
|
+
- no npm publish
|
|
24
|
+
- no service/container restart
|
|
25
|
+
- no secret access
|
|
26
|
+
- no runtime/package code changes
|
|
27
|
+
- no new infra
|
|
28
|
+
|
|
29
|
+
## ADW plan/build/test/review
|
|
30
|
+
|
|
31
|
+
### Plan
|
|
32
|
+
Create exactly one receipt proving the current singularity substrate and recording the stale factory-status mismatch.
|
|
33
|
+
|
|
34
|
+
### Build
|
|
35
|
+
Created this file only:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
packages/pi-real-engineering/docs/receipts/singularity-proof-20260619.md
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Test
|
|
42
|
+
Ran read-only checks and captured output below.
|
|
43
|
+
|
|
44
|
+
### Review
|
|
45
|
+
Diff must be limited to this receipt file. Any runtime/package file change means `ISSUES`.
|
|
46
|
+
|
|
47
|
+
### Ship / deploy decision
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
NO DEPLOY
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Reason: this is documentation/proof only. Factory state is also partially stale (`factory-status` says 25 containers, live Docker says 13), so deploy is explicitly forbidden by the safety gate.
|
|
54
|
+
|
|
55
|
+
## Commands run and outputs
|
|
56
|
+
|
|
57
|
+
### Package version
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
node -e "const p=require('./packages/pi-real-engineering/package.json'); console.log(p.name, p.version)"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Output:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
@artale/pi-real-engineering 0.2.2
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Golden-path command contract
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
grep -n "idea → safety gate" packages/pi-real-engineering/extensions/real-engineering.ts
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Output:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
9:idea → safety gate → ADW plan/build/test/review → receipt → guarded deploy
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Factory status endpoint
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
curl -fsS --max-time 5 http://77.42.112.29:8099/factory-status
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Output:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{"status": "ok", "phase": 4, "containers": 25, "agents": 6, "infra": 14, "monitoring": 5, "skills": 63}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Live Docker count
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
ssh -o BatchMode=yes -o ConnectTimeout=8 engine 'docker ps --format "{{.Names}}" | wc -l'
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Output:
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
13
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Live Docker containers
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
ssh -o BatchMode=yes -o ConnectTimeout=8 engine 'docker ps --format "{{.Names}}" | sort'
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Output:
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
cloudflared
|
|
115
|
+
deploy-webhook
|
|
116
|
+
docs-site
|
|
117
|
+
forgejo
|
|
118
|
+
fullyhermes
|
|
119
|
+
hermes
|
|
120
|
+
mc-postgres
|
|
121
|
+
mission-control
|
|
122
|
+
openvoiceui
|
|
123
|
+
qdrant
|
|
124
|
+
redis
|
|
125
|
+
site-fdsa-ai
|
|
126
|
+
site-n-art-io
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Live-truth reconciliation
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
STALE_FACTORY_STATE
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
`factory-status.containers=25` conflicts with `live_docker_count=13`.
|
|
136
|
+
|
|
137
|
+
Rule: **live Docker/API probes beat memory and catalog summaries when they disagree.**
|
|
138
|
+
|
|
139
|
+
## Verification criteria
|
|
140
|
+
|
|
141
|
+
PASS only if:
|
|
142
|
+
|
|
143
|
+
- package version is `@artale/pi-real-engineering 0.2.2`
|
|
144
|
+
- `/real-engineering` command contract contains the golden path
|
|
145
|
+
- this receipt exists
|
|
146
|
+
- changed files are limited to this receipt unless explicitly approved
|
|
147
|
+
- deploy decision is `NO DEPLOY`
|
|
148
|
+
|
|
149
|
+
## Residual risks
|
|
150
|
+
|
|
151
|
+
- `/factory-status` still reports stale container count.
|
|
152
|
+
- No production deploy was attempted or proven in this proof.
|
|
153
|
+
- This proves the receipt/golden-path discipline, not full autonomous production shipping.
|
|
154
|
+
|
|
155
|
+
## Result
|
|
156
|
+
|
|
157
|
+
PASS for documentation-only Codebase Singularity proof.
|
|
158
|
+
|
|
159
|
+
ISSUES remain for factory-status live-state drift until the endpoint reports live container truth or explicitly labels catalog counts as advisory.
|
|
@@ -8,12 +8,36 @@ export default function (pi: ExtensionAPI) {
|
|
|
8
8
|
Golden path:
|
|
9
9
|
idea → safety gate → ADW plan/build/test/review → receipt → guarded deploy
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
Safety gate:
|
|
12
|
+
- Identify writes, deletes, network calls, deploys, secret access, and shell commands before doing them.
|
|
13
|
+
- Ask before dangerous or irreversible actions.
|
|
14
|
+
- Stop if the requested outcome is unclear.
|
|
15
|
+
|
|
16
|
+
ADW loop:
|
|
17
|
+
1. Plan the smallest useful change.
|
|
18
|
+
2. Build only that change.
|
|
19
|
+
3. Test with one command that would fail if the change broke.
|
|
20
|
+
4. Review the diff as if you did not write it.
|
|
21
|
+
5. Ship/deploy only when explicitly requested and verified.
|
|
22
|
+
|
|
23
|
+
Verifier rule:
|
|
24
|
+
- PASS only when checks actually ran.
|
|
25
|
+
- If tests, runtime, publish/install, or deploy state are not verified, say ISSUES/Unverifiable.
|
|
26
|
+
- No loop: perform one pass per request and do not rework the same unresolved issue indefinitely; if a loop would continue without new evidence, stop and report \`ISSUES/No progress loop\`.
|
|
27
|
+
- Deployment is evidence-scoped: if you claim any \`auto_patch_proven\` status, cite a concrete receipt path and the exact recovery command/output that proves it.
|
|
28
|
+
|
|
29
|
+
Receipt required:
|
|
30
|
+
## Real Engineering Receipt
|
|
31
|
+
- Idea:
|
|
32
|
+
- Safety gate:
|
|
33
|
+
- Plan:
|
|
34
|
+
- Changed files:
|
|
35
|
+
- Commands run:
|
|
36
|
+
- Test output:
|
|
37
|
+
- Review result:
|
|
38
|
+
- Auto-patch proof receipts (if applicable):
|
|
39
|
+
- Deploy decision:
|
|
40
|
+
- Residual risks:
|
|
17
41
|
|
|
18
42
|
Start by restating the idea and the safety gate.`,
|
|
19
43
|
});
|
package/package.json
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@artale/pi-real-engineering",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Real Engineering Workflow for Pi: Plan
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"pi-package",
|
|
9
|
-
"pi",
|
|
10
|
-
"pi-extension",
|
|
11
|
-
"pi-skill",
|
|
12
|
-
"real-engineering",
|
|
13
|
-
"adw",
|
|
14
|
-
"verifier",
|
|
15
|
-
"receipts"
|
|
16
|
-
],
|
|
17
|
-
"files": [
|
|
18
|
-
"README.md",
|
|
19
|
-
"extensions/**/*",
|
|
20
|
-
"skills/**/*",
|
|
21
|
-
"docs/receipts/**/*"
|
|
22
|
-
],
|
|
23
|
-
"peerDependencies": {
|
|
24
|
-
"@earendil-works/pi-coding-agent": "
|
|
25
|
-
},
|
|
26
|
-
"pi": {
|
|
27
|
-
"extensions": [
|
|
28
|
-
|
|
29
|
-
]
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@artale/pi-real-engineering",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Real Engineering Workflow for Pi: Plan → Build → Test → Review → Ship with verifier guardrails and receipts.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"pi-package",
|
|
9
|
+
"pi",
|
|
10
|
+
"pi-extension",
|
|
11
|
+
"pi-skill",
|
|
12
|
+
"real-engineering",
|
|
13
|
+
"adw",
|
|
14
|
+
"verifier",
|
|
15
|
+
"receipts"
|
|
16
|
+
],
|
|
17
|
+
"files": [
|
|
18
|
+
"README.md",
|
|
19
|
+
"extensions/**/*",
|
|
20
|
+
"skills/**/*",
|
|
21
|
+
"docs/receipts/**/*"
|
|
22
|
+
],
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@earendil-works/pi-coding-agent": ">=0.44.0"
|
|
25
|
+
},
|
|
26
|
+
"pi": {
|
|
27
|
+
"extensions": ["./extensions"],
|
|
28
|
+
"skills": ["./skills"],
|
|
29
|
+
"commands": ["real-engineering"]
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "cd ../../ && npx tsc --noEmit --skipLibCheck --project tsconfig.json",
|
|
33
|
+
"test": "pi -ne --no-tools -e extensions/real-engineering.ts -p \"real-engineering loaded\""
|
|
34
|
+
}
|
|
35
|
+
}
|