mikoshi-construct 0.3.1 → 0.5.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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mikoshi-construct",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"description": "Bootstrap for AI-native software projects. Start with a proven engineering workflow instead of an empty repository.",
|
|
6
6
|
"author": "Eli Tabrisov",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@antfu/eslint-config": "^9.5.1",
|
|
45
|
+
"@anthropic-ai/sdk": "^0.127.0",
|
|
45
46
|
"@changesets/changelog-github": "^1.0.0",
|
|
46
47
|
"@changesets/cli": "^3.0.0",
|
|
47
48
|
"@types/node": "^22.18.0",
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"yaml": "^2.9.1"
|
|
55
56
|
},
|
|
56
57
|
"scripts": {
|
|
58
|
+
"bench:architect": "tsx scripts/bench/run.ts",
|
|
57
59
|
"build": "tsup",
|
|
58
60
|
"changeset": "changeset",
|
|
59
61
|
"ci": "pnpm run quality",
|
|
@@ -37,7 +37,10 @@ repository's CLAUDE.md and `construct.json`.
|
|
|
37
37
|
- `degraded` — a rung passed the harness, but a design step was rejected by the schema and the
|
|
38
38
|
run continued without it. The result's `effort` is the class that actually executed.
|
|
39
39
|
- `design incomplete` — a high-effort run whose architect was rejected by the schema. No
|
|
40
|
-
implementer ran without a spec; the result carries the validator's text in `validationError
|
|
40
|
+
implementer ran without a spec; the result carries the validator's text in `validationError` and
|
|
41
|
+
the way out in `recovery`, which is a measured route rather than advice: re-running one class
|
|
42
|
+
lower with the design written into the brief produced the design on three of the three occasions
|
|
43
|
+
it has been tried on the construct's own repository.
|
|
41
44
|
- `failed` — every rung ran and the harness stayed red; `lastFailure` carries the excerpt.
|
|
42
45
|
- `blocked` — the last rung stopped on a question; `question` carries it verbatim.
|
|
43
46
|
4. Record the run: append one JSON line to `.construct/runs.jsonl` (create the directory if needed)
|
|
@@ -66,8 +69,9 @@ repository's CLAUDE.md and `construct.json`.
|
|
|
66
69
|
5. Relay the result: status, the effort rung that succeeded and how many attempts it took, the
|
|
67
70
|
files changed, and the harness tail. When the status is `blocked`, put the architect's or
|
|
68
71
|
implementer's question to the user verbatim. When `failed`, give the last failure excerpt. When
|
|
69
|
-
`design incomplete`, say that the design step did not complete
|
|
70
|
-
runtime reported it
|
|
72
|
+
`design incomplete`, say that the design step did not complete, give `validationError` as the
|
|
73
|
+
runtime reported it, and relay `recovery` verbatim — a dead end that names no way out is how the
|
|
74
|
+
next person decides the ladder is broken rather than that this run needs re-running lower; when `degraded`, say which design step was rejected and that the reported
|
|
71
75
|
class is the one that executed, not the one that was requested.
|
|
72
76
|
Unless `construct.json` sets `report.usage` to `false`, end with one usage line for this run,
|
|
73
77
|
from the Workflow tool's own accounting: agents, subagent tokens, tool uses, wall time — so the
|
|
@@ -52,6 +52,8 @@ const SPEC = {
|
|
|
52
52
|
},
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
const DESIGN_RECOVERY = 'Re-run this task one class lower with the design written into the brief. That is the measured route out: three of three such re-runs on the construct\'s own repository produced the design the architect had failed to return. The run does not retry the design step itself, because a second agent entry pays for the exploration again.'
|
|
56
|
+
|
|
55
57
|
const DEFAULT_RETRY_LIMIT = 0
|
|
56
58
|
const DESIGN_EFFORT = 'xhigh'
|
|
57
59
|
const EFFORT_WITHOUT_DESIGN = { high: 'medium', xhigh: 'medium' }
|
|
@@ -150,7 +152,7 @@ async function design(rung, reason, label) {
|
|
|
150
152
|
designFailed = true
|
|
151
153
|
designError = lastValidationError ?? ''
|
|
152
154
|
attempts.push({ rung, effort: DESIGN_EFFORT, outcome: 'design schema invalid', reason: designError })
|
|
153
|
-
log(`${label}: the design step did not complete`)
|
|
155
|
+
log(`${label}: the design step did not complete. ${DESIGN_RECOVERY}`)
|
|
154
156
|
return false
|
|
155
157
|
}
|
|
156
158
|
spec = result
|
|
@@ -165,6 +167,7 @@ function designIncomplete(effort, question) {
|
|
|
165
167
|
effort: performedEffort(effort),
|
|
166
168
|
attempts,
|
|
167
169
|
validationError: designError,
|
|
170
|
+
recovery: DESIGN_RECOVERY,
|
|
168
171
|
question: question ?? '',
|
|
169
172
|
lastFailure: feedback ?? '',
|
|
170
173
|
}
|