mikoshi-construct 0.1.3 → 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 +34 -5
- package/dist/cli.js +2060 -525
- package/package.json +15 -10
- package/templates/ai/claude/_claude/agents/architect.md +7 -11
- package/templates/ai/claude/_claude/agents/harness.md +7 -11
- package/templates/ai/claude/_claude/agents/implementer.md +6 -10
- package/templates/ai/claude/_claude/commands/plan.md +2 -0
- package/templates/ai/claude/_claude/skills/implement/SKILL.md +43 -8
- package/templates/ai/claude/scripts/construct/implement.workflow.mjs +103 -30
- package/templates/ai/cursor/_cursor/rules/construct.mdc +1 -1
- package/templates/ai/shared/_claude/commands/construct-discover.md +25 -4
- package/templates/base/architecture/decisions/README.md +26 -0
- package/templates/base/architecture/principles.md +3 -1
- package/templates/presets/monorepo/baseline/eslint.config.mjs.eta +22 -6
- package/templates/presets/monorepo/sample/scripts/tests/lint/syntax-policy.test.ts.eta +99 -25
- package/templates/presets/node-backend/baseline/eslint.config.mjs +11 -3
- package/templates/presets/node-backend/sample/scripts/tests/lint/syntax-policy.test.ts +73 -18
- package/templates/presets/node-frontend/baseline/eslint.config.mjs +12 -3
- package/templates/presets/node-frontend/sample/scripts/tests/lint/syntax-policy.test.ts +78 -0
package/README.md
CHANGED
|
@@ -9,8 +9,14 @@ npx mikoshi-construct init # interactive: preset, agent, project name
|
|
|
9
9
|
pnpm install && pnpm run quality # green before you write a line
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
> **v0.
|
|
12
|
+
> **v0.3.** Presets `node-backend`, `node-frontend`, `node-library` and `monorepo`. Claude Code gets
|
|
13
13
|
> the full lifecycle; Cursor gets the rules, the conventions and the discovery protocol.
|
|
14
|
+
> `construct sync` moves a repository already carrying a construct onto newer templates.
|
|
15
|
+
|
|
16
|
+
**Documentation — [e1i.github.io/mikoshi-construct](https://e1i.github.io/mikoshi-construct/)**:
|
|
17
|
+
getting started, [the development cycle](https://e1i.github.io/mikoshi-construct/guide/the-cycle),
|
|
18
|
+
the reasoning budget, [upgrading](https://e1i.github.io/mikoshi-construct/guide/upgrading) and the
|
|
19
|
+
CLI reference.
|
|
14
20
|
|
|
15
21
|
## What it does
|
|
16
22
|
|
|
@@ -76,10 +82,14 @@ npx mikoshi-construct init --yes --preset node-frontend --ai both
|
|
|
76
82
|
|
|
77
83
|
```bash
|
|
78
84
|
npx mikoshi-construct doctor # baseline intact, harness intact, markers filled
|
|
85
|
+
npx mikoshi-construct sync # what newer templates would change; writes nothing
|
|
79
86
|
npx mikoshi-construct soulkill # what the detector sees; writes nothing
|
|
80
87
|
npx mikoshi-construct cost --last
|
|
81
88
|
```
|
|
82
89
|
|
|
90
|
+
`sync` reports and changes nothing until you ask for `--apply`, and even then it writes only what
|
|
91
|
+
the construct itself wrote and you have not touched.
|
|
92
|
+
|
|
83
93
|
Every command, flag and exit code: [docs/cli.md](https://github.com/E1i/mikoshi-construct/blob/main/docs/cli.md).
|
|
84
94
|
|
|
85
95
|
## Three principles
|
|
@@ -95,10 +105,22 @@ Every command, flag and exit code: [docs/cli.md](https://github.com/E1i/mikoshi-
|
|
|
95
105
|
runtime, composition models render the diagrams and are checked against the code, the dependency
|
|
96
106
|
policy lives in lint, and every security invariant names the check that enforces it.
|
|
97
107
|
|
|
98
|
-
The second principle in numbers, from
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
108
|
+
The second principle in numbers, from thirteen `/implement` runs on this repository (Claude Opus).
|
|
109
|
+
Two `low` tasks cost 557k and 740k billable tokens. Nine `medium` tasks cost between 847k and 5.9M —
|
|
110
|
+
the class is a weak predictor on its own. Two `high` tasks, each with an architect designing before
|
|
111
|
+
any code, cost 14.19M and 14.14M.
|
|
112
|
+
|
|
113
|
+
Almost none of that is the work. It is each agent's entry into the repository: a fresh exploration,
|
|
114
|
+
paid in full before anything is produced, and paid again by every agent that starts. A `low` run pays
|
|
115
|
+
it twice — an implementer, and the harness that refuses to let the implementer mark its own homework.
|
|
116
|
+
A `high` run pays it three times. The class mostly decides how deep each entry goes; the ladder
|
|
117
|
+
decides how many entries there are, and that is what it is for.
|
|
118
|
+
|
|
119
|
+
The same arithmetic prices a bad brief. One run escalated to an architect after the implementer
|
|
120
|
+
stopped on a contradiction in the task, and the architect spent 3.66M without returning a valid
|
|
121
|
+
answer — 4.16M for the run, for nothing. That is why a response the schema rejects is not re-asked by
|
|
122
|
+
default: a second attempt buys another entry, not another answer. `construct cost` prints all of this
|
|
123
|
+
for your own runs, and reconciles it against the ledger the ladder writes.
|
|
102
124
|
|
|
103
125
|
## The lifecycle
|
|
104
126
|
|
|
@@ -127,6 +149,7 @@ with a named check, not a second fix.
|
|
|
127
149
|
|---|---|
|
|
128
150
|
| `construct init` | Detect, configure, materialize. `--yes --preset node-backend\|node-frontend\|node-library\|monorepo --ai claude\|cursor\|both --review claude --dir . --dry-run` |
|
|
129
151
|
| `construct doctor` | Baseline files present, harness intact, discovery markers filled — `GLITCH` by name when not |
|
|
152
|
+
| `construct sync` | Classify every path against today's templates and report; `--apply` writes only what the construct owns and you have not changed (`--json`) |
|
|
130
153
|
| `construct soulkill` | Print what the detector sees, write nothing (`--json`; aliases `inspect`, `capture`) |
|
|
131
154
|
| `construct cost` | Token usage of the `/implement` runs in this directory, per agent, billable and price-weighted (`--last`, `--json`) |
|
|
132
155
|
|
|
@@ -164,6 +187,12 @@ The names are a tribute to Cyberpunk 2077 and mean exactly one thing each here.
|
|
|
164
187
|
| Soulkiller | `construct soulkill`: extracts the facts about a repository and writes nothing |
|
|
165
188
|
| Netrunner | The coding agent — Claude Code, Cursor — that connects to the project through the construct |
|
|
166
189
|
| Relic | The files at the root the agent reads first: `AGENTS.md`, `CLAUDE.md`, `construct.json` |
|
|
190
|
+
| Engram | The record `init` cut into `construct.json`: what the construct wrote, and the version that wrote it |
|
|
191
|
+
| Braindance | `construct sync`: replaying that engram against today's templates and reporting where the two disagree |
|
|
192
|
+
| Relic write | `construct sync --apply`: the one write into a repository the construct did not create |
|
|
193
|
+
| Blackwall | Where a construct block whose template variant cannot be established sits — not yours, not ours, and nothing is written there |
|
|
194
|
+
| Glitch | A warning in the output. Something wants a human; nothing has failed |
|
|
195
|
+
| Flatlined | A check that failed outright: a missing baseline file, or no `construct.json` where one was required |
|
|
167
196
|
| Harness | No lore. `pnpm run quality`. The one word that must be understood without this table |
|
|
168
197
|
|
|
169
198
|
Not affiliated with CD Projekt Red.
|