Skip to content

Commit 92f067a

Browse files
committed
feat(agent-context): working loop first, universal requirements pages, init --dialect
The always-on file meta init scaffolds now opens with the whole loop for the declared stack: generate (one step per declared server, plus the web client), schema (first migration, apply-pending, rename and allow flags), requirements, and the verify commands. It drops from about 19 KB to about 5 KB; the principles move verbatim to metaobjects-codegen/references/principles.md and the port-sync and upgrade text to metaobjects-verify/references/upgrading.md. It no longer tells agents to read SKILL.md by path. - Requirements reference pages install in every stack (the concern gate observed nodes at init time, before a new project had any). meta gen and meta verify say when a scaffolded context lacks them. - meta gen advises wiring requirementTests() when requirements exist and nothing tests them. - meta init --dialect sqlite|postgres|mysql|d1, dialect-aware next steps, and a shorter scaffolded config comment carrying the generator import line. - migration.md documents --rename-column, --rename-table and --allow. - Skill trigger evals gain mid-task cases. - meta gen --list off a terminal is unchanged: its TOON default is parsed by tools and skills.
1 parent c75c30a commit 92f067a

161 files changed

Lines changed: 5476 additions & 3228 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,25 @@ Each item below is described in full under Added, Changed or Fixed; this list is
5454

5555
### Added
5656

57+
- **A working loop first in the agent context.** The always-on file `meta init` scaffolds
58+
(`.metaobjects/AGENTS.md` and `CLAUDE.md`) now opens with the whole loop for the declared
59+
stack, in order: configure and run the generators (one step per declared server, with the
60+
import or class names to wire, plus the web client when one is declared), the schema
61+
(`meta migrate --from-db` for the first migration, `apply-pending` at boot, and a later
62+
change with `--rename-column`, `--rename-table` and `--allow`), requirements, and the verify
63+
commands to run before calling work done. It shrinks from about 19 KB to about 5 KB. The
64+
principles it carried move, word for word, to `metaobjects-codegen/references/principles.md`,
65+
and the port-sync and upgrade paragraphs to `metaobjects-verify/references/upgrading.md`. It
66+
no longer tells an agent to read a skill's `SKILL.md` by path, and says the loop needs no
67+
skill. The skill trigger evals gain mid-task cases.
68+
- **`meta init --dialect sqlite|postgres|mysql|d1`.** Writes the codegen `dialect` and, for
69+
sqlite, postgres and d1, `migrate.dialect`, and the next steps print that dialect's first
70+
migration. `--dialect d1` is `--d1`; the two together with different dialects are refused.
71+
MySQL is codegen only, as before: the next steps say `meta migrate` does not own its schema.
72+
- **`meta gen` names `requirementTests()` when nothing tests the requirements.** A model that
73+
declares `requirement.*` nodes, with no `requirement-tests` generator wired, gets one advisory
74+
line naming the import. The exit code is unchanged.
75+
5776
- **Cross-port vocabulary that only some ports implement so far (`implementedIn`).** A registry
5877
type or attr may name the ports that implement it so far (`"implementedIn": ["typescript"]` on
5978
its `spec/metamodel` entry, carried into the registry manifest). It is still cross-port
@@ -499,6 +518,18 @@ Each item below is described in full under Added, Changed or Fixed; this list is
499518

500519
### Changed
501520

521+
- **The requirements reference pages install in every stack.** They used to install only when
522+
`meta init` saw a `requirement.*` node, which a new project has not written yet, so a project
523+
that declared requirements later had skills pointing at pages that were not there. `meta gen`
524+
and `meta verify` now say so for a context scaffolded that way, and name
525+
`meta init --docs-only --refresh-docs`.
526+
- **A shorter scaffolded `metaobjects.config.ts` comment.** It now shows the import line for the
527+
usual data layer (`entityFile`, `namesFile`, `barrel`) and the catalog command, and drops the
528+
rest.
529+
- **`meta gen --list` off a terminal is unchanged.** Its default there stays the TOON document,
530+
which tools and the skills parse for `wire.import` and `layer`; the agent context gives a
531+
one-line filter for a compact view instead.
532+
502533
- **A new top-level requirement declared into a dependency's package is refused** with
503534
`ERR_DEPENDENCY_PACKAGE_NOT_OWNED`, as a new object there already was. An overlay of the
504535
dependency's own requirement is still accepted.

‎agent-context/README.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ the slim always-on Markdown (`.metaobjects/AGENTS.md` + `CLAUDE.md`) and the six
66
`metaobjects-*` Claude skills (each a universal `SKILL.md` plus the
77
`references/<token>.md` fragments matching the project's resolved stack).
88

9-
- `servers/<lang>.meta.json` — per-server install + codegen command (drives the always-on).
10-
- `templates/always-on.md.mustache` — the slim always-on body (`{{stackLine}}`, `{{codegenCommand}}`).
9+
- `servers/<lang>.meta.json` — per-server install, codegen command and the always-on's verify step (`verifyStep`).
10+
- `templates/always-on.md.mustache` — the slim always-on body: a working loop first (`{{stackLine}}`, `{{stackLoops}}`, `{{verifySteps}}`), then the rules. The full principles it shortens live in `metaobjects-codegen/references/principles.md`.
11+
- `templates/loops/<server>.md`, `templates/loops/client.md` — the generate steps of that loop, one per declared server (and one for a web client), concatenated by the assembler.
1112
- `skills/<skill>/SKILL.md` — universal skill body.
12-
- `skills/<skill>/references/<token>.md` — language/framework or concern fragment; installed iff `<token>` is in the stack (`Stack.tokens`; concern tokens are OBSERVED from project state, e.g. `requirements` for a project declaring `requirement.*` nodes — see `SDK`'s `CONCERN_TOKENS`).
13+
- `skills/<skill>/references/<token>.md` — language/framework fragment; installed iff `<token>` is in the stack (`Stack.tokens`). The requirements pages are universal topic files: they install in every stack, because whether a project declares `requirement.*` nodes changes after `meta init` runs.
1314
- `skills/<skill>/references/<token>-<topic>.md` — a topic split out of a `<token>.md` fragment; scoped by the same token.
1415
- `skills/<skill>/references/<topic>.md` — any other name is a universal topic file and installs in every stack; the skill's `SKILL.md` says when to open it.
1516

‎agent-context/evals/README.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ one-message prompt plus a `tool_used: Skill` grader: positive cases require the
77
fire, negative cases (near-misses: LLM code in a project that does not use MetaObjects
88
prompts, model edits that need no generated output) forbid it.
99

10+
Most cases are a fresh request. The `*-midtask-*` cases are the shape real work takes: the
11+
prompt states what has already been done in the session (entities declared, `meta gen` run, a
12+
migration applied) and then the next step. A skill that fires only on an opening request and
13+
never once the agent is past the loop in the always-on file is the failure they catch, and the
14+
negative ones catch the opposite: a skill loaded for a step the loop already covers (writing
15+
business logic over generated types, running a rename migration).
16+
1017
- `skill-triggers/<skill>/<NN>-pos-*|neg-*/` — `prompt.md` and `graders/trigger.md`, in the
1118
`claude plugin eval` case format.
1219
- `run-skill-triggers.sh` — wraps `agent-context/skills` in a throwaway plugin (all seven
@@ -18,7 +25,7 @@ prompts, model edits that need no generated output) forbid it.
1825
agent-context/evals/run-skill-triggers.sh <out-dir>
1926
```
2027

21-
It starts real Claude sessions on your own login (25 cases x 3 runs = 75 sessions, a few
28+
It starts real Claude sessions on your own login (31 cases x 3 runs = 93 sessions, a few
2229
minutes with `-j 4`) and writes `<out-dir>/result.json`. Use `--case '<glob>'` to run a
2330
subset. It is manual-only and not part of CI, because model behaviour is not deterministic.
2431

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
type: tool_used
3+
tool: Skill
4+
input_match: metaobjects-codegen
5+
min: 1
6+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
max_turns: 3
3+
timeout_seconds: 180
4+
allowed_tools: [Skill]
5+
runs: 3
6+
---
7+
8+
This project uses MetaObjects (it has .metaobjects/config.json and a metaobjects/ directory of meta.*.json files). Progress so far: you added the Order and OrderLine entities, ran `npx meta gen`, and wired the generated Drizzle tables into the service. The typecheck now fails because the generated OrderLine.ts exports `orderLineInsertSchema` and the service expects `OrderLineInsert` as a named type next to it. Make the generated file export that type on every regen.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
type: tool_used
3+
tool: Skill
4+
input_match: metaobjects-codegen
5+
min: 1
6+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
max_turns: 3
3+
timeout_seconds: 180
4+
allowed_tools: [Skill]
5+
runs: 3
6+
---
7+
8+
This project uses MetaObjects (it has .metaobjects/config.json and a metaobjects/ directory of meta.*.json files). Progress so far: entities are declared, `npx meta gen` writes the Drizzle tables, and the first migration is applied. Next on the task list: the admin service needs a TypeScript map from each entity name to its list of searchable column names, kept in step with the metadata. Nothing in `meta gen --list` emits it. Produce it.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
type: tool_used
3+
tool: Skill
4+
input_match: metaobjects-codegen
5+
min: 0
6+
max: 0
7+
arm: both
8+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
max_turns: 3
3+
timeout_seconds: 180
4+
allowed_tools: [Skill]
5+
runs: 3
6+
---
7+
8+
This project uses MetaObjects (it has .metaobjects/config.json and a metaobjects/ directory of meta.*.json files). Progress so far: the Invoice entity is declared, `npx meta gen` wrote Invoice.ts with its Drizzle table and Zod schemas, and the migration is applied. Next: in src/billing/totals.ts, write the function that sums an invoice's lines, applies the customer's discount percentage and rounds to cents.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
type: tool_used
3+
tool: Skill
4+
input_match: metaobjects-codegen
5+
min: 0
6+
max: 0
7+
arm: both
8+
---

0 commit comments

Comments
 (0)