Skip to content

T-PDDK-gs-scaffold-package-and-tooling

Status: closed/done · Impact: high · Complexity: small

Stand up packages/ts/graph-scheduler/ as a standalone bun + moon workspace package with the same tooling shape as packages/ts/intersect/, so every later task has a place to add code and tests. No scheduling logic yet.

Greenfield: packages/ts/graph-scheduler/ does not exist yet. The relevant context is the workspace root and the reference package this scaffold mirrors.

LocationRole today
packages/ts/Bun workspace directory; root package.json globs packages/ts/*. Holds dashboard-client and intersect today — no graph-scheduler/.
packages/ts/intersect/Reference TypeScript package whose tooling shape (package.json, tsconfig.json, moon.yml, .gitignore, README.md, index.ts) this scaffold mirrors.

A compiling, testable, zero-runtime-dependency package skeleton: package.json (name graph-scheduler, type: module, exports map for ., ./graph, ./tracker, ./pull), tsconfig.json, moon.yml, biome/lint wiring matching the repo, a bun test entry that runs (zero tests is fine), an index.ts re-export stub, a README.md skeleton, and .gitignore.

  1. Study packages/ts/intersect/ (package.json, tsconfig.json, .gitignore) and copy its tooling shape.
  2. Create packages/ts/graph-scheduler/ with package.json, tsconfig.json, moon.yml, .gitignore, empty index.ts, README.md.
  3. Wire it into the bun workspace (root already globs packages/ts/*); confirm bun install resolves it.
  4. Confirm bun test packages/ts/graph-scheduler exits clean (no tests yet).
LocationKindChange
packages/ts/graph-scheduler/package.jsonnewPackage manifest + exports map
packages/ts/graph-scheduler/tsconfig.jsonnewTS config mirroring intersect
packages/ts/graph-scheduler/moon.ymlnewmoon project wiring
packages/ts/graph-scheduler/index.tsnewRoot re-export stub
packages/ts/graph-scheduler/README.mdnewREADME skeleton
packages/ts/graph-scheduler/.gitignorenewIgnore build artifacts
  • packages/ts/graph-scheduler/ exists with package.json, tsconfig.json, moon.yml, index.ts, README.md.
  • exports declares ., ./graph, ./tracker, ./pull.
  • bun install resolves the workspace package; bun test packages/ts/graph-scheduler runs and exits 0.
  • No runtime dependencies in package.json.
  • Any scheduling logic, tests, or fixtures (later tasks).
  • none

Captured by /sdlc:task-work on 2026-07-04. PR: pending.

  • AC-1 (packages/ts/graph-scheduler/ exists with package.json, tsconfig.json, moon.yml, index.ts, README.md): auto — files present, bunx tsc --noEmit clean.
  • AC-2 (exports declares ., ./graph, ./tracker, ./pull): auto — verified in packages/ts/graph-scheduler/package.json; each subpath points at a real stub module.
  • AC-3 (bun install resolves the workspace package; bun test packages/ts/graph-scheduler runs and exits 0): agent-manual — ran bun install (workspace symlink + bun.lock entry created) and bun test packages/ts/graph-scheduler (exit 0, 1 pass).
  • AC-4 (no runtime dependencies): auto — no dependencies/devDependencies field in package.json.
  • The packages/ts/intersect/ reference package (post-M-0010 migration) was an exact tooling template — package.json/tsconfig.json/moon.yml/.gitignore copied cleanly to a coherent zero-dependency skeleton.
  • start_task.ts’s reset onto the fresh origin/main tip surfaced that the reference had migrated (plugin/lib/intersectpackages/ts/intersect) before the implementer used the stale path — the worktree reflected reality, not the divergent local checkout.
  • bunx tsc --noEmit and the package smoke test gave fast, deterministic AC verification independent of the noisy repo-wide gate.
  • Quality baseline captured against the working tree, not origin/main’s tree — sdlc quality baseline capture <sha> runs verbs against the caller’s cwd while labelling the output with origin/main’s SHA. Here local main was 2 commits ahead of and corpus-divergent from origin/main (a completed intersect migration), so Step 7’s baseline-gated diff produced 12 false new-drift: lines (migration-related closed-task OK lines, count summaries, a non-deterministic bun-test PID/port line). Fix: capture the baseline against the resolved origin/main tree (ephemeral worktree at the SHA) so the label matches the tree. → T-7FPF-baseline-capture-against-origin-main-tree
  • bun test exits 1 on zero test files — the spec said “a bun test entry that runs (zero tests is fine)” but AC-3 requires exit 0, which bun does not give with no test files. Required adding a trivial smoke test. Fix: scaffolding specs that assert bun test … exits 0 should require ≥1 smoke test, or the AC should tolerate bun’s no-tests exit.
  • autonomy: autonomous/pr gap-fill is discarded by start_task’s reset — the auto-defined ## Today section lands on the task branch, but start_task.ts’s reset --hard origin/main wipes it, so the readiness stamp reached origin/main while the required Today section did not (this PR re-adds it branch-side to reconcile on merge). Fix: the ensure-ready autonomy gate’s auto-define body edits should land on origin/main (like the stamp does), not on the soon-to-be-reset task branch. → T-RNHP-autonomy-body-fill-lands-on-main
  • No plugin verb lands arbitrary task-body edits on origin/main — task-work Step 5 says to land body edits on origin/main before the gate, but only frontmatter has a --commit-on main path (ensure_ready_mutate/start_task). Landing the Today body edit needed an ad-hoc git push origin HEAD:main, which the sandbox auto-mode classifier denied (while the plugin’s own subprocess --commit-on main pushes were allowed). Fix: a --commit-on main body-edit primitive, or route the autonomy Today-fill through the existing main-commit path. → primitive in flight as T-NXAM-task-doc-edit-commit-on-main; autonomy wiring folded into T-RNHP-autonomy-body-fill-lands-on-main
  • Pre-existing bun test failures on origin/main add gate noise — 2 stale sdlc --help goldens (missing the get-spawn-policy config op that another change added without regenerating top-help.txt) and 1 task_auto_define test that needs an origin remote its temp repo lacks. Not introduced here, but they muddy the quality signal.

← Back to Tasks