T-9FH9-the-script-vocabulary-lands-across-solutions
State: closed/done · Impact: high · Complexity: medium
solutions/ holds 107 of the repo’s 162 tracked package.json — the larger
half of the missing-vocabulary problem, and the half where two apps
(learn_web, vimit_prototype) declare a lint script that runs
eslint . --fix. Because moon’s lint task runs bun run lint, a
moon run of either app’s lint target rewrites source today. This task adds the missing
baseline scripts across solutions/ — same mechanical shape as
T-076A-the-script-vocabulary-lands-in-packages-apps-and-sites — and fixes
the two mutating gates so nothing in the repo rewrites source under a
read-only verb name.
101 tracked package.json under solutions/ (excluding node_modules and
the 6 synthetic fixtures under crates/manifest-graph/tests/mini-repo/, one
of which is deliberately malformed JSON) sit outside the baseline vocabulary:
4 have format, 2 have format:check, 4 have lint, and 20 of the 36 that
own a tsconfig.json have typecheck. 32 of the 107 counted package.json
(fixtures included) declare zero gate scripts at all — 22 of those are
determined/experiences Nuxt layers.
| Location | Role today |
|---|---|
solutions/determined/products/*/package.json | 24 Nuxt products. Build-only today; own no tsconfig.json, cannot be typechecked in isolation. |
solutions/determined/experiences/*/package.json | 24 Nuxt layers (22 of the 24 have zero gate scripts). Own no tsconfig.json either — narrowing include to one layer drops the generated types and reports ~83 errors that aren’t real. |
solutions/augmented/apps/learn_web/package.json | lint: "eslint . --fix" — mutating gate; moon run learn_web:lint rewrites source. |
solutions/augmented/apps/vimit_prototype/package.json | lint: "nuxt prepare && eslint . --fix" — same defect. |
solutions/augmented/apps/augmented_web/package.json | Already correct: lint: "eslint ." (read-only) plus a separate lint:fix: "eslint . --fix". The shape task 4 brings the other two toward. |
solutions/ontological/crates/manifest-graph/tests/mini-repo/**/package.json | 6 synthetic fixtures exercising the manifest-graph crate’s own tests (one is intentionally malformed JSON, to test error handling). Not gated projects — excluded from this task. |
Proposed
Section titled “Proposed”Every one of the 101 real solutions/ manifests carries the verbs the
which-verb-which-project rule assigns it:
| Verb | Applies to | In this tier |
|---|---|---|
format, format:check, lint | every manifest — operates on source files, no compilable unit required | all 101 |
typecheck | manifests owning a real tsconfig.json | 36 of 101 |
test | manifests with tests | unchanged — scripts already present are left as-is |
build | manifests that emit | unchanged — scripts already present are left as-is |
Products and experience layers (48 manifests: 24 + 24) get format,
format:check and lint but never typecheck — they own no tsconfig.json
and cannot be typechecked in isolation; that coverage comes through the
composed product via .moon/tasks/nuxt-product.yml in
T-PJ8G-the-tool-and-product-tiers-get-their-gates.
learn_web and vimit_prototype match augmented_web’s shape: lint runs
read-only (eslint ., and nuxt prepare && eslint . for vimit_prototype),
and the --fix form moves to a new lint:fix script. No script named lint
or format:check contains --fix or --write anywhere under solutions/.
Approach
Section titled “Approach”- Enumerate the 101 manifests:
find solutions -name package.json -not -path '*/node_modules/*' -not -path '*/tests/mini-repo/*'. - 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. Existingbuild/test/app-specific scripts are left untouched. - Fix the two mutating gates by hand, not by the mechanical diff: split
learn_web’s andvimit_prototype’slintinto a read-onlylintand a newlint:fixcarrying the--fixform, matchingaugmented_web. - Point the new
lint/format/format:check/typecheckscripts at the same toolsaugmented_weband the sibling tier already use, so the vocabulary is consistent across both tiers 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 from each category (a product, an experience, a publish-channel library) to confirm the new scripts execute without behavior change. - Do not touch any
moon.ymland do not touch the 6mini-repofixtures — both are out of scope.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
solutions/determined/products/*/package.json | modify | Add format, format:check, lint. No typecheck — no own tsconfig.json. |
solutions/determined/experiences/*/package.json | modify | Same additions as products. |
solutions/determined/apps/*/package.json | modify | Add missing format, format:check, lint, and (where a local tsconfig.json exists) typecheck. |
solutions/determined/packages/*/package.json | modify | Same additions as apps/*. |
solutions/determined/package.json | modify | Add missing format, format:check, lint to the workspace-root manifest (already has typecheck). |
solutions/determined/.claude/skills/family-events/scripts/package.json | modify | Add missing format, format:check, lint. |
solutions/augmented/apps/learn_web/package.json | modify | lint: "eslint . --fix" → lint: "eslint ."; add lint:fix: "eslint . --fix". |
solutions/augmented/apps/vimit_prototype/package.json | modify | lint: "nuxt prepare && eslint . --fix" → lint: "nuxt prepare && eslint ."; add lint:fix: "nuxt prepare && eslint . --fix". |
solutions/augmented/**/package.json | modify | Add missing baseline scripts to the remaining manifests in this tier. |
solutions/ontological/**/package.json | modify | Add missing baseline scripts to the 8 real manifests (the 6 tests/mini-repo/ fixtures are excluded). |
solutions/agent-pants/**/package.json | modify | Add missing baseline scripts across this tier’s manifests. |
Acceptance criteria
Section titled “Acceptance criteria”AC-1 through AC-3 share one file list, computed once:
F=$(find solutions -name package.json -not -path '*/node_modules/*' -not -path '*/tests/mini-repo/*').
- AC-1:
for f in $F; do jq -e '.scripts.format and .scripts["format:check"] and .scripts.lint' "$f" >/dev/null || echo "$f"; doneprints nothing. - AC-2: every manifest with a
tsconfig.jsonin its own directory has atypecheckscript:for f in $F; do d=$(dirname "$f"); [ -f "$d/tsconfig.json" ] && ! jq -e '.scripts.typecheck' "$f" >/dev/null && echo "$f"; doneprints nothing. - AC-3: no
lintorformat:checkscript contains--fixor--write:for f in $F; do jq -r '.scripts.lint // "", .scripts["format:check"] // ""' "$f"; done | grep -E -- '--fix|--write'returns nothing. - AC-4:
jq -r '.scripts.lint, .scripts["lint:fix"]' solutions/augmented/apps/learn_web/package.jsonprintseslint .theneslint . --fix. - AC-5:
jq -r '.scripts.lint, .scripts["lint:fix"]' solutions/augmented/apps/vimit_prototype/package.jsonprintsnuxt prepare && eslint .thennuxt prepare && eslint . --fix. - AC-6:
git diff --stat -- solutions -- '*.moon/**'is empty — nomoon.ymlundersolutions/changed.
Out of scope
Section titled “Out of scope”packages/,apps/,sites/andtools/manifests — that is T-076A-the-script-vocabulary-lands-in-packages-apps-and-sites.- The 6 synthetic fixtures under
solutions/ontological/crates/manifest-graph/tests/mini-repo/— they exercise the crate’s own parsing/error-handling tests and are not gated projects. - Wiring moon tasks to delegate to these scripts — that is T-0DSA-the-typescript-aspect-delegates-and-spans-both-stacks and T-PJ8G-the-tool-and-product-tiers-get-their-gates.
- 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. - The conformance guard that would catch a future mutating gate — that is T-0G2O-a-guard-for-project-shape-conformance.
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, andlearn_web/vimit_prototypeare the repo’s only two gates that mutate the tree under a read-only verb name.
Depends on
Section titled “Depends on”T-VAF5-a-standard-for-the-baseline-task-vocabulary, T-BBYP-shared-eslint-oxlint-layer