T-076A-the-script-vocabulary-lands-in-packages-apps-and-sites
State: closed/done · Impact: high · Complexity: medium
package.json is Layer A — the layer that survives publish-lib.yml’s
rsync --exclude 'moon.yml' and the only layer a mirrored or standalone
package carries. Today most packages/, apps/, sites/ and tools/
manifests are missing scripts a moon aspect could otherwise assume: only 1
of the 6 publish-channel TS libraries (agent-call) has a typecheck
script, so 5 mirrors ship uncompiled. This task adds the missing baseline
scripts to the ~55 manifests in this tier, mechanically and without
behavior change, so T-0DSA-the-typescript-aspect-delegates-and-spans-both-stacks
has something to delegate to.
55 tracked package.json files sit under packages/, apps/, sites/
and tools/ (excluding node_modules). Coverage of the baseline verbs is
partial and inconsistent — some manifests have test and typecheck but
no build; some have none of the six; the 5 Nuxt src-nuxt/ apps already
carry the full set. None has lint, format or format:check outside
those 5 Nuxt apps.
| Location | Role today |
|---|---|
packages/ts/agent-call/package.json | Has build, typecheck, test. The only one of the 6 publish-channel libraries with typecheck. |
packages/ts/command-seam/package.json | Publish-channel library. Has build, test. No typecheck, lint, format, format:check. |
packages/ts/detect-runners/package.json | Publish-channel library. Has build, test. No typecheck, lint, format, format:check. |
packages/ts/easy-git/package.json | Publish-channel library. Has build, test. No typecheck, lint, format, format:check. |
packages/ts/intersect/package.json | Publish-channel library. Has build, test. No typecheck, lint, format, format:check. |
packages/ts/waypost/package.json | Publish-channel library. Has build, test. No typecheck, lint, format, format:check. |
packages/ts/prettier-config/*/package.json | Three manifests (prettier-config, tsconfig, dashboard-client, agent-plugin, yaml-splice/wasm, admin-types, nuxt_admin_layer) declare no scripts at all. |
apps/*/src-nuxt/package.json | 5 manifests already carry build, test, lint, typecheck, format, format:check — the target shape, unchanged by this task. |
.github/workflows/publish-lib.yml:172 | rsync --exclude 'moon.yml' drops anything declared only in a moon task from every mirror snapshot — the reason package.json must carry these scripts directly. |
Proposed
Section titled “Proposed”Every one of the 55 manifests carries the verbs the which-verb-which-project
rule says it should, using the exact script names from the target
vocabulary (typecheck, lint, lint:fix, format, format:check,
alongside existing build/test):
| Verb | Applies to | In this tier |
|---|---|---|
format, format:check, lint | every manifest — operates on source files, no compilable unit required | all 55 |
typecheck | manifests owning a real tsconfig.json | 42 of 55 already have one directly in their directory |
test | manifests with tests | unchanged — scripts already present are left as-is |
build | manifests that emit | unchanged — scripts already present are left as-is |
Commands follow the Layer A column of the target vocabulary table: bun run typecheck invokes tsc --noEmit (or the package’s existing tsc
invocation shape), lint invokes oxlint against the root .oxlintrc.json
(T-BBYP-shared-eslint-oxlint-layer), format/format:check invoke
prettier. No moon.yml in this tier is touched. No script gains --fix or
--write under the lint or format:check name.
Approach
Section titled “Approach”- Enumerate the 55 manifests:
find packages apps sites tools -name package.json -not -path '*/node_modules/*'. - For each, diff its current
scriptsblock against the target set (format,format:check,lintalways;typecheckwhen atsconfig.jsonsits in the same directory) and add only the missing entries — existing scripts (build,test, app-specific ones) are left untouched. - Skip the 5
apps/*/src-nuxt/package.jsonmanifests — already at the target shape. - Point
lint/format/format:check/typecheckat the same tools the 5 Nuxt manifests already use, so the vocabulary is consistent across the tier before T-0DSA-the-typescript-aspect-delegates-and-spans-both-stacks wires moon tasks to it. - Run
bun run typecheck,bun run lint,bun run format:checkin a sample of touched directories to confirm the new scripts execute without behavior change (no source edits, only manifest edits). - Do not touch any
moon.yml— that is T-0DSA-the-typescript-aspect-delegates-and-spans-both-stacks’s job.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
packages/ts/*/package.json | modify | Add missing format, format:check, lint, and (where a local tsconfig.json exists) typecheck scripts. |
apps/*/package.json | modify | Same additions, excluding the 5 already-complete src-nuxt/package.json files. |
sites/df-docs/package.json | modify | Add missing format, format:check, lint scripts. |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: for every tracked
package.jsonunderpackages/,apps/,sites/,tools/(excludingnode_modules),jq -e '.scripts|has("format") and has("format:check") and has("lint")'returns true — all 55 pass. - AC-2: for every one of those manifests whose own directory holds a
tsconfig.json,jq -e '.scripts.typecheck'returns true. - AC-3:
grep -E -- '--fix|--write'finds nothing inside the value of anylintorformat:checkscript across the 55 manifests. - AC-4:
git diff --statscoped topackages/,apps/,sites/,tools/shows zero changedmoon.ymlfiles. - AC-5: in
packages/ts/command-seam(a publish-channel library with atsconfig.jsonbut notypecheckscript today),bun run typecheckexits 0 after this task adds the script.
Out of scope
Section titled “Out of scope”solutions/manifests — that is T-9FH9-the-script-vocabulary-lands-across-solutions.- Wiring moon tasks to delegate to these scripts — that is T-0DSA-the-typescript-aspect-delegates-and-spans-both-stacks.
- Reformatting source files to pass the new
format:checkscript — that is T-STP8-the-repo-adopts-the-shared-prettier-config. - Adding
bun run typecheckto the publish-lib standalone lane — that is T-ZFM9-the-publish-channel-typechecks-the-snapshot. - Deleting app-local
justfile/Makefilerunners — that is T-TB73-the-app-local-justfiles-and-makefiles-go.
Dependencies
Section titled “Dependencies”- T-VAF5-a-standard-for-the-baseline-task-vocabulary — defines the verb names and the which-verb-which-project rule this task applies.
- T-BBYP-shared-eslint-oxlint-layer — creates the root
.oxlintrc.jsonthe newlintscripts resolve against.
Discovery context
Section titled “Discovery context”- Milestone-level survey in the approved plan for M-3MGB: 153 of 162
tracked
package.jsonare missingformat:check, and 5 of 6 publish-channel TS libraries have notypecheckscript becausepublish-lib.yml:172excludesmoon.ymlfrom every mirror snapshot.
Depends on
Section titled “Depends on”T-VAF5-a-standard-for-the-baseline-task-vocabulary, T-BBYP-shared-eslint-oxlint-layer