Repository navigation
Modules: lazurio module create personalspace/<slug> --dry-run, and module prepare dispatched (M2 2/3, #359) - #396
Merged
Conversation
immakermatty
force-pushed
the
agent/LP-359-module-create-plan
branch
from
October 13, 2026 20:05
384b764 to
a56fe15
Compare
immakermatty
force-pushed
the
agent/LP-359-module-create-plan
branch
from
October 14, 2026 10:11
a56fe15 to
d6c6254
Compare
…own module The command's plan (decision F52, M2 of plan DEV-6662, #359): every check a real run makes, reading only, and a dry run that writes nothing and asks GitHub only GETs. In order: the name and the stack (the Organization form is refused with a pointer to #267, --teams is a usage error), a Personalspace on this preset and installed, the holder decision of #186, the layout (the task worktree, the manifest that receives the slot, its pool in the reserved range 23000-23099, workspace/<slug> ignored by the Personalspace's Git, no directory or slot of that name), the plan with a lease that avoids every lease the Folder's modules declare, and no <login>/<slug> on GitHub. A Personalspace that still holds the template's placeholders (#377) is a warning with its next step; the template's example slot stays a declared slot. The report is the root's lazurio.module_create.report.v1 with the person's repository, the target manifest, the task worktree and the plan's digest. src/cli.ts now dispatches module create, and module prepare, which fell to the catalog's usage (#114). Docs: F52 point 6 and "Module creation" in docs/launchpad-development.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
immakermatty
force-pushed
the
agent/LP-359-module-create-plan
branch
from
October 14, 2026 10:27
d6c6254 to
5661392
Compare
immakermatty
changed the base branch from
agent/LP-359-module-generator
to
main
October 14, 2026 10:27
immakermatty
marked this pull request as ready for review
October 14, 2026 10:27
agentrozjedemeai
approved these changes
Oct 14, 2026
agentrozjedemeai
left a comment
Collaborator
There was a problem hiding this comment.
@immakermatty — APPROVED on exact head 5661392 (base 32427a4). I reviewed this planning PR independently of #399: selector/slug/stack refusals, holder and manifest checks, pool/slot/directory/repository checks, deterministic scaffold and digest, and CLI dispatch. In an isolated detached checkout, 39 focused tests passed, check:static passed, and git diff --check was clean. Live readback immediately before review: same head/base, 0 unresolved threads, no competing reviewer request; only the Macroscope check was skipped on this PR. No merge performed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of 3 of M2 in plan DEV-6662 (#359). Stacked on #394 (the generator core): its base is
agent/LP-359-module-generator, so the diff shows only this part. Merge #394 first; this PR's base then becomesmain.Why
lazurio module create personalspace/<slug>must check everything before anything is written, and show the person the exact plan before the real run creates a repository on their account (root decision 0171, addendum of 2026-10-13). Two CLI gaps meet here:lazurio module createdoes not exist in the Platform (Installed Platform CLI lacks module create/setup required by Organization skills #267).lazurio module prepareis documented and implemented, butsrc/cli.tsnever dispatched it, so it fell to the catalog's usage error (A module that declares lazurio.preparation cannot start from a fresh checkout: no prepare verb, and its start installs nothing #114).What
lazurio module create personalspace/<slug> --stack <stack> [--name] [--port N] --dry-run [--folder] [--json](src/modules/module-create.ts,src/modules/module-create-cli.ts). Every check reads only, in this order:invalid_selector,unknown_stack,invalid_slug,reserved_slug(the gateway's labels included).<Organization>/<slug>is refused asorganization-form-unavailable, with a pointer to Installed Platform CLI lacks module create/setup required by Organization skills #267 and to the root's command meanwhile.--teamswithpersonalspace/is a usage error (exit 2).personalspace-not-here, orpersonalspace-absentwith the next steplazurio personalspace install.github-signed-out,github-unavailable,github-identity-mismatch,personalspace-ambiguous,-unavailable,-foreign,-not-owned,-public.modules.manifest.json:modules_manifest_missing,manifest_invalid.module_port_poolmust lie in 23000–23099 (personalspace-pool-invalid). Without one, the slot's pull request will declare it.workspace/<slug>(personalspace-workspace-tracked).directory_exists,slot_exists.workspace/*,mission-controlanddesign-system, and the Personalspace's modules) and the Environment's own ports.<login>/<slug>on GitHub, letter case ignored (repository-exists). An existing repository is never taken over.The placeholders of #377 (the coordinator's heads-up):
owner-github-username) is a warning with a next step pointing to personalspace install leaves the template's placeholders in the person's Personalspace #377. It is never a refusal. Nothing here names the owner or runs the template's bootstrap, which also creates a gbrain repository.workspace/personal-notes(no repository) stays an ordinary declared slot and is left as it is. It conflicts only with the slugpersonal-notes. A new slot goes after it.maincf50036, byte for byte with their placeholders (tests/fixtures/personalspace-template.ts).The report is the root's
lazurio.module_create.report.v1, with these additions:repository(full_name,private: true,create);manifest: the file that receives the slot, its pool, and whether the pool is added;worktreeandmodule_root;plan: a digest of everything the person confirms (repository, module, stack, name, slot, lease, files and the pool the manifest gains).With
--jsonthere is one JSON line per step, aspersonalspace installprints, then the report. Exit status: 0 planned, 2 refused or usage.CLI dispatch.
module creategets its own handler. Every verb ofmoduleVerbsnow reachesrunModuleCommand, somodule prepareworks (#114).Git, read-only:
ContentGit.worktree(top, git dir, common dir, branch) andContentGit.ignored(git check-ignore).Docs: F52 point 6, the section "Module creation" in
docs/launchpad-development.md, and the CLI help (moduleHelpincludes the create help).Deliberately not here
--dry-runthe command says so (a usage error).Verification
bun run check:staticpasses.bun test --parallel=4 --timeout=20000: 2636 pass, 7 skip, 0 fail across 241 files.tests/personal-module-create.test.ts(10 tests, the content world: a stub GitHub with a call log and the product's real git):viewerandrepositoryreads;tests/module-create-cli.test.ts(6 tests, throughrunCli):module preparereaching the lifecycle (folder-unreadableinstead of the catalog's usage), and the help;src/cli.ts, with a fake gh on its PATH and the real git. Its gh call log is exactlyapi user,api repos/example/example_GEN3andapi repos/example/notes.Risks
personalspace/.worktrees/<task>is guidance in the next steps, not enforced. A worktree created next to the owner directory makes the Personalspace ambiguous, and the command then refuses with that reason.🤖 Generated with Claude Code
Note
Add read-only
lazurio module createdry-run planning and dispatchmodule preparelazurio module create personalspace/<slug> --dry-run, a read-only plan that validates selector, stack, slug, holder ownership, manifest, pool, ports, worktree, and GitHub repository state, then reports an actionable plan or a stable refusal. No files, repositories, or slots are created; that happens in a later revision.worktreeandignoredGit capabilities in git.ts.module createto the new planning command (exit 0 for actionable, 2 for refusals) and replaces the fixed verb list withmoduleVerbs, somodule preparereaches the lifecycle command instead of falling through to usage.gh.module createpreviously fell through to module catalog usage; it now runs planning and exits 2 on usage errors and refusals.module prepareand othermoduleVerbsentries now reachrunModuleCommandinstead of catalog usage.Macroscope summarized 5661392.