Skip to content

T-JWP9-s0001-stragglers

Status: closed/done · Impact: medium · Complexity: medium

Two direct S-0001-co-locate-first-promote-when-shared violations survive: lib/services/index/ops/generate.ts imports from plugin/skills/index/ (a lib→skill dependency inversion), and new_standard.ts — a thin shim over a lib op that already exists — lives in skills/standard-new/. Fix both so no lib file imports from skills/ and the standard-new skill calls the CLI directly.

LocationRole today
plugin/lib/services/index/ops/generate.tsop handler imports buildIndexData/renderIndex across into skills/
plugin/skills/index/generate_index.tsthe index-generation capability, living in a skill dir
plugin/skills/index/markdown_extract.tsmdast helper used by the generator (entity-agnostic)
plugin/skills/index/index_template.etarender template, reached by a six-.. climb from lib
plugin/skills/standard-new/new_standard.tsthin shim over @lib/model/entities/standard/ops/create; skill prose invokes it
plugin/skills/standard-new/SKILL.md~10 references to the shim

generate_index.tslib/services/index/generate.ts (plain module beside the op); markdown_extract.tslib/util/markdown_extract.ts; the template → lib/services/index/index_template.eta; the op imports siblings. new_standard.ts deleted; standard-new SKILL.md invokes sdlc standard create (the op already exists and is CLI-surfaced).

  1. git mv the index trio into lib; fix the op’s imports and the template path. Own commit.
  2. Idempotence check: sdlc index generate twice → no diff on the second run.
  3. Re-point the ~10 standard-new SKILL.md references to sdlc standard create; delete new_standard.ts.
  4. Smoke: create a standard against a tmp project root through the skill’s documented command.
LocationKindChange
plugin/skills/index/generate_index.tsdeletegit mv → lib/services/index/generate.ts
plugin/skills/index/markdown_extract.tsdeletegit mv → lib/util/markdown_extract.ts
plugin/skills/index/index_template.etadeletegit mv → lib/services/index/
plugin/lib/services/index/ops/generate.tsmodifysibling imports; template path
plugin/skills/standard-new/new_standard.tsdeleteretired; CLI replaces it
plugin/skills/standard-new/SKILL.mdmodifyinvoke sdlc standard create
plugin/skills/index/tests/modifyre-point generator imports to lib home
  • AC-1: grep -rn "skills/" plugin/lib/ returns zero import references.
  • AC-2: sdlc index generate is idempotent (second run produces no diff) and its output matches the pre-move golden.
  • AC-3: standard-new SKILL.md contains no script invocation; a standard scaffolds end-to-end via sdlc standard create.
  • AC-4: git log --follow shows history for all three moved files; full bun test green.
  • Regen/site reference pages for the moved files (T-YXM5-site-docs-long-tail).
  • Changes to index content or the standard create op contract.
  • T-NV49-op-path-substrate — ports wait for the substrate PR to merge (ordering discipline; this task itself uses only existing 2-level machinery).
  • S-0001’s own anti-example list and the planning-phase finding that lib imports from skills/ — docs/plans/op-substrate-full-sweep.md §Context.

T-NV49-op-path-substrate


← Back to Tasks