Skip to content

fix: plan-feature before init, packed core ships its pinned catalog, extensions add updates empty-project guidance (#1000, #1002, #1003) - #1011

Merged
jimhoyd merged 2 commits into
mainfrom
claude/trial4-cli-1000
Sep 30, 2026
Merged

jimhoyd merged 2 commits into
mainfrom
claude/trial4-cli-1000

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Three findings from the fourth agent trial (#1006).

Fixes #1000
Fixes #1002
Fixes #1003

#1000: plan-feature before init

planFeature(project | undefined, goal). The CLI plans without a project when all three hold: no --project, no --host-file, and no urlcode.yaml where it runs. In that case it reads only the recipe and extension catalogs. project is null. withoutProject says what was not read and names urlcode init <directory> --with <needed extensions>. A --project that names nothing is still a no-project error. The help and docs/TOOLING.md say this. MCP always has a project, so it is unchanged.

#1002: the packed core ships its pinned catalog

  • scripts/pack-addons.ts packs core from a staged copy of the files npm would pack. That copy carries the addons.json written beside it, with sha512-pinned tarballs. The checkout's development dist/addons.json is never written, and the old pinCore mutation is gone. It refuses to pack an unpinned manifest (shippedManifestProblems), and it checks that the tarball carries exactly that manifest. release-pack uses the same path.
  • extensions add and init --with look at the catalog. If it pins local add-on tarballs, jimhoyd-urlcode-<version>.tgz sits beside them, and the site names core by bare version, they point core at that tarball and say so in a note. That removes the version-skew round.
  • Tests: a unit test packs a tiny package and asserts the pinned manifest ships, a dev manifest is refused, the source is untouched and prepare is dropped. packedCoreBeside has a unit test. A new integration test installs the packed core on its own and runs init site --with auth with no URLCODE_ADDONS. The site pins file:<core tgz> and the auth tarball. I ran it locally and it passes.

#1003: extensions add/remove keep the empty-project guidance true

When the configured route count crosses zero, extensions add|remove makes two changes:

  • It swaps the generated AGENTS.md audit paragraph between the empty and active forms.
  • It removes or restores the workflow's allow-empty-project: true # remove after adding the first active route line.

This works the same way as the app/tests/audit.json move (#955). Text that is no longer what init generated is left alone. Both files are in the rollback snapshot. AGENTS.md no longer bakes {"expectRoutes": 0}. The starter README now uses wording that stays true after an extension is added. docs/STARTERS.md is updated.

Evidence

Limitations: the release workflow was not run end to end. Windows was not exercised; PR CI is Linux-only.

🤖 Generated with Claude Code

jimhoyd and others added 2 commits September 29, 2026 19:06
…extensions add updates empty-project guidance (#1000, #1002, #1003)

- plan-feature with no --project, no --host-file and no project in the
  working directory plans from the catalogs alone: project is null and
  withoutProject names what was skipped and the `init --with` to run.
  A named --project that does not exist is still a no-project error.
- pack-addons packs core from a staged copy carrying the addons.json it
  writes beside it, never the build's development manifest; it refuses an
  unpinned manifest and checks the tarball. The checkout's dist/ is not
  written. extensions add (and init --with) point a site that names core by
  bare version at the core tarball packed beside local add-on tarballs.
- extensions add|remove swap the generated AGENTS.md audit paragraph and
  add/remove the workflow's allow-empty-project line when the route count
  crosses zero; edited text is left alone. The starter README no longer goes
  stale, and AGENTS.md no longer bakes the route count.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	packages/core/src/agents-guide.ts
#	starters/default/AGENTS.md
@jimhoyd
jimhoyd enabled auto-merge (squash) September 30, 2026 00:09
@jimhoyd
jimhoyd merged commit 326c412 into main Sep 30, 2026
25 checks passed
@jimhoyd
jimhoyd deleted the claude/trial4-cli-1000 branch September 30, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment