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.
| Location | Role 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. |
Proposed
Section titled “Proposed”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.
Approach
Section titled “Approach”- Study
packages/ts/intersect/(package.json, tsconfig.json, .gitignore) and copy its tooling shape. - Create
packages/ts/graph-scheduler/withpackage.json,tsconfig.json,moon.yml,.gitignore, emptyindex.ts,README.md. - Wire it into the bun workspace (root already globs
packages/ts/*); confirmbun installresolves it. - Confirm
bun test packages/ts/graph-schedulerexits clean (no tests yet).
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
packages/ts/graph-scheduler/package.json | new | Package manifest + exports map |
packages/ts/graph-scheduler/tsconfig.json | new | TS config mirroring intersect |
packages/ts/graph-scheduler/moon.yml | new | moon project wiring |
packages/ts/graph-scheduler/index.ts | new | Root re-export stub |
packages/ts/graph-scheduler/README.md | new | README skeleton |
packages/ts/graph-scheduler/.gitignore | new | Ignore build artifacts |
Acceptance criteria
Section titled “Acceptance criteria”-
packages/ts/graph-scheduler/exists with package.json, tsconfig.json, moon.yml, index.ts, README.md. -
exportsdeclares.,./graph,./tracker,./pull. -
bun installresolves the workspace package;bun test packages/ts/graph-schedulerruns and exits 0. - No runtime dependencies in package.json.
Out of scope
Section titled “Out of scope”- Any scheduling logic, tests, or fixtures (later tasks).
Dependencies
Section titled “Dependencies”- none
Post-mortem
Section titled “Post-mortem”Captured by /sdlc:task-work on 2026-07-04. PR: pending.
Acceptance criteria coverage
Section titled “Acceptance criteria coverage”- AC-1 (
packages/ts/graph-scheduler/exists with package.json, tsconfig.json, moon.yml, index.ts, README.md): auto — files present,bunx tsc --noEmitclean. - AC-2 (
exportsdeclares.,./graph,./tracker,./pull): auto — verified inpackages/ts/graph-scheduler/package.json; each subpath points at a real stub module. - AC-3 (
bun installresolves the workspace package;bun test packages/ts/graph-schedulerruns and exits 0): agent-manual — ranbun install(workspace symlink +bun.lockentry created) andbun test packages/ts/graph-scheduler(exit 0, 1 pass). - AC-4 (no runtime dependencies): auto — no
dependencies/devDependenciesfield in package.json.
What worked
Section titled “What worked”- 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 freshorigin/maintip surfaced that the reference had migrated (plugin/lib/intersect→packages/ts/intersect) before the implementer used the stale path — the worktree reflected reality, not the divergent local checkout.bunx tsc --noEmitand the package smoke test gave fast, deterministic AC verification independent of the noisy repo-wide gate.
Friction and automation gaps
Section titled “Friction and automation gaps”- 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 withorigin/main’s SHA. Here localmainwas 2 commits ahead of and corpus-divergent fromorigin/main(a completed intersect migration), so Step 7’s baseline-gated diff produced 12 falsenew-drift:lines (migration-related closed-task OK lines, count summaries, a non-deterministic bun-test PID/port line). Fix: capture the baseline against the resolvedorigin/maintree (ephemeral worktree at the SHA) so the label matches the tree. → T-7FPF-baseline-capture-against-origin-main-tree bun testexits 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 assertbun test … exits 0should require ≥1 smoke test, or the AC should tolerate bun’s no-tests exit.autonomy: autonomous/prgap-fill is discarded bystart_task’s reset — the auto-defined## Todaysection lands on the task branch, butstart_task.ts’sreset --hard origin/mainwipes it, so the readiness stamp reachedorigin/mainwhile 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 onorigin/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 onorigin/mainbefore the gate, but only frontmatter has a--commit-on mainpath (ensure_ready_mutate/start_task). Landing the Today body edit needed an ad-hocgit push origin HEAD:main, which the sandbox auto-mode classifier denied (while the plugin’s own subprocess--commit-on mainpushes were allowed). Fix: a--commit-on mainbody-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 testfailures onorigin/mainadd gate noise — 2 stalesdlc --helpgoldens (missing theget-spawn-policyconfig op that another change added without regeneratingtop-help.txt) and 1task_auto_definetest that needs anoriginremote its temp repo lacks. Not introduced here, but they muddy the quality signal.
Spawned follow-up tasks
Section titled “Spawned follow-up tasks”- T-7FPF-baseline-capture-against-origin-main-tree (https://github.com/sksizer/dev/pull/663)
[open/ready] — capture the quality baseline against the resolved origin/main tree, not the
caller’s working tree. Spawned. Distinct axis from the in-flight baseline-dir/superproject PR
cluster (there the failure mode is
baseline not found; here it is falsenew-drift:when local main has diverged). - T-RNHP-autonomy-body-fill-lands-on-main (https://github.com/sksizer/dev/pull/665)
[open/ready] — route the ensure-ready autonomy auto-define body edits to origin/main so
start_task’s reset preserves them. Spawned; merges the “auto-define body discarded by reset”
bullet with the “
--commit-on mainbody-edit primitive” bullet, building atop the in-flight primitive T-NXAM-task-doc-edit-commit-on-main. - The
bun testexits-1-on-zero-tests bullet and the pre-existing-bun test-failures bullet were SKIPPED (non-actionable / pure observation of pre-existing failures).