Repository navigation
Modules: one module generator in the Platform, with the personal form (M2 1/3, #359) - #394
Conversation
…e personal form The Platform gets the single generator of a new Lazurio Module (root decision 0171, addendum of 2026-10-13, point 3): planModuleScaffold, the stack templates and the slot insert of HumanAndMachines/Lazurio at a5615be0, as a pure TypeScript planner (src/modules/scaffold.ts) with the templates embedded as text in the compiled executable (src/modules/scaffold-templates.ts). An Organization's plan is the root's byte for byte; the tests hold the root's tree hashes for every stack. The planner also has the personal form decided on 2026-10-13: company is the person's login, the slot is private to its owner with the person's own repository, the _personal layer gives the module its own AGENTS.md, and the reserved personal pool 23000-23099 (personalModulePortPool) is declared beside the Environment's own ports. The gateway's labels join the reserved slugs. No command uses it yet: `lazurio module create personalspace/<slug>` follows on this branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dules Records the Operator's decision of 2026-10-13 (root 0171 addendum, plan DEV-6662 M2): the generator ported from the root at a5615be0, the personal form (company is the login, a private slot, the _personal layer), the reserved personal lease range 23000-23099 and why, and the gateway's labels among the reserved slugs; the command follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plan gave a personal app the runtime id <login>-<slug>-v1, and the catalog shows a runtime id as the app's display id, so `lazurio module list --json`, POST /api/catalog and the page would have named the person's login, which no output of a personal module does (the rule the Personalspace tests enforce). A personal app's runtime id is now personalspace-<slug>-v1; an Organization's stays the root's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agentrozjedemeai
left a comment
There was a problem hiding this comment.
Exact-head review of b61f447 (DEV-6662 M2 1/3). The focused scaffold suite passes (23/23), check:static passes, diff --check is clean, and CI is green. No CLI is introduced by this PR; the findings concern the new pure generator itself.
Changes requested:
- [P1] Constrain the personal pool at the generator boundary. planModuleScaffold accepts a personal owner with any otherwise-valid PortPool: owner={kind:"personal",login:"example"}, slug="notes", stack="bun-service", pool={start:24000,end:24099} returns lease 24052. normalizePool (src/modules/scaffold.ts:700-715) checks only generic port validity; choosePort then uses that range (744-785). This permits a personal module plan to lease an Organization-pool port, contrary to F52/0171 and the documented reserved range. The template PR validates its own manifest, but this public core has no such check and callers can pass an older or unvalidated manifest. Refuse any personal pool not wholly within 23000-23099 (including an explicit --port via that pool), and add negative tests to this suite.
- [P2] Align the personal login validator with the Personalspace contract. normalizeOwner accepts login "ab-" (src/modules/scaffold.ts:142,611-626), generating git@github.com:ab-/notes.git; the template validator isValidGitHubLogin rejects that owner. Please reject trailing-hyphen logins here too and test the boundary.
These are independent of #396/#399; please fix on a new head and request a fresh exact-head review.
…d a login GitHub would refuse
planModuleScaffold took any valid pool for a personal owner, so a caller
reading an older or unchecked manifest could lease a personal module a
port of an Organization's range. A personal module's pool now has to lie
within the reserved personal range (decision F52), its explicit port
included, whatever the caller read.
The login pattern also accepted a trailing hyphen ("ab-"), which GitHub
and the Personalspace template's isValidGitHubLogin refuse; it now
follows GitHub's rule for people and Organizations alike.
Review of #394 (P1, P2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agentrozjedemeai
left a comment
There was a problem hiding this comment.
The previous P1/P2 findings are resolved: personal pools are bounded to 23000–23099 before any lease (including an explicit port), and both owner kinds use the GitHub login pattern with no trailing hyphen. I checked the new boundary cases and template/owner paths at this exact head. Local: module-scaffold 23 pass, 0 fail; check:static passes; git diff --check clean. GitHub head checks pass; no unresolved threads. @immakermatty APPROVED for this exact commit; no merge performed.
Main took F52 for the module generator (#394), so the vault decision of this branch, written as F52 before that merged, is F53: its heading, the notes on F43 and F46 that point to it, the section and anchor in docs/machine-handover.md, and every comment, doc and test that names it. The module generator's own references to F52 are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#391 renumbered the Environment's own vault from F52 to F53 when it was rebased onto main, where F52 is the module generator (#394). This pull request's references follow it: the addendum of 2026-10-14 is F53's in decisions.md, hosted-entry.md, environment-access.md, environment-tools.md and launchpad-development.md (with their anchors), and in the comments of server.ts, members.ts and the vault page's HTTP tests. No reference to the module generator's F52 changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main took F52 for the module generator (#394), so the vault decision of this branch, written as F52 before that merged, is F53: its heading, the notes on F43 and F46 that point to it, the section and anchor in docs/machine-handover.md, and every comment, doc and test that names it. The module generator's own references to F52 are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#391 renumbered the Environment's own vault from F52 to F53 when it was rebased onto main, where F52 is the module generator (#394). This pull request's references follow it: the addendum of 2026-10-14 is F53's in decisions.md, hosted-entry.md, environment-access.md, environment-tools.md and launchpad-development.md (with their anchors), and in the comments of server.ts, members.ts and the vault page's HTTP tests. No reference to the module generator's F52 changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#391 renumbered the Environment's own vault from F52 to F53 when it was rebased onto main, where F52 is the module generator (#394). This pull request's references follow it: the addendum of 2026-10-14 is F53's in decisions.md, hosted-entry.md, environment-access.md, environment-tools.md and launchpad-development.md (with their anchors), and in the comments of server.ts, members.ts and the vault page's HTTP tests. No reference to the module generator's F52 changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part 1 of 3 of M2 in plan DEV-6662 (#359): personal module creation,
lazurio module create personalspace/<slug>. This PR is the generator core only; no command uses it yet. PR 2 (the checks and the dry run) and PR 3 (the real run) stack on this branch.Why
The Operator decided on 2026-10-13 (root decision 0171, addendum of 2026-10-13) that a person's own modules live in their Personalspace as private repositories on their own GitHub account, and that the Platform holds the one module generator (root 0167): the root's
planModuleScaffoldand its stack templates move here, the personal form now, the Organization form under #267. No hosted Environment can runlazurio module createtoday (#267).What
src/modules/scaffold.ts: the pure planner ported from HumanAndMachines/Lazuriolazurio/module-scaffold-lib.mjsata5615be0: the same six stacks, slug rules, placeholder engine, tree hash, slug-derived port choice, slot insert and refusal codes, in strict TypeScript with English messages.src/modules/templates/, 46 files from the root byte for byte plus_personal/AGENTS.md.tmpl) are embedded in the compiled executable as text throughsrc/modules/scaffold-templates.ts. Every file ends in.tmpl, so none of them is an input of this repository's TypeScript, Biome or tests. Provenance and each deviation are insrc/modules/templates/README.md.a5615be0. A compiled binary run from/produces the same hash, so the templates really are embedded.owner: {kind: "personal", login}):companyis the person's login. The runtime id ispersonalspace-<slug>-v1, not SHAPING's<login>-<slug>-v1: the catalog shows a runtime id as the app'sdisplay.id, and no output of a personal module names its owner (the rule the Personalspace tests enforce; a test checks that the catalog of generated personal modules never contains the login);default_access: "private",required_roles: ["owner"],git.urlgit@github.com:<login>/<slug>.git,status: "active", no Teams (teams_not_allowed);_personallayer gives the module its ownAGENTS.md.owner_label,pool_label,module_name,verify_command) replace the root's Organization-only wording. For an Organization they render the root's exact words.personalModulePortPool), beside the Environment's own ports (environmentPorts). The reasons are in F52 and below.t3code,mausbot,mausbot-webhook,browser,oauth2,apiandwell-known. A module's hostname is its slug.docs/decisions.md.The chosen port range and why
23000–23099is 100 ports, the size of an Organization's pool. It is chosen to be:24000and grow upward in blocks of 100: the root manual's example is24000–24099and the Organization template's24900–24999. Machines' example Organization uses20100–20199.Deliberately not here
lazurio module setupconformance checks (Installed Platform CLI lacks module create/setup required by Organization skills #267).Verification
bun run check:static: lint, typecheck, the public guard, the proof build and its smoke all pass.bun test --parallel=4 --timeout=20000: 2620 pass, 7 skip, 0 fail across 239 files.tests/module-scaffold.test.ts(23 tests):tests/fixtures/personalspace-template.ts, the template'smaincf50036);personalspace/<module>: Bun apps executable,python-uvlisted withdefault-app-invalidas the plan warns,nonewithout an app;Risks
🤖 Generated with Claude Code
Note
Add Platform module generator for personal-form modules (M2 1/3)
Adds a Platform-owned scaffold planner plus a full set of embedded stack templates (Astro, Astro Starlight, Bun service, Vite React, Python uv, and none). This is the personal-module third of milestone 2.
ModuleScaffoldErrorcodes..tmplimports..envloading.Macroscope summarized b61f447.