Skip to content

Add repo-shape fixtures and init-modes.bats runtime tests for /archcore:init (scale x depth) #11

Description

@ivklgn

Paths updated for v0.7.0 — the detection catalogs moved from skills/init/lib/ to skills/_shared/grounding/, and init grew a second axis (--depth). The gap is unchanged: no runtime test, no repo-shape fixtures.

Problem

/archcore:init is the flagship first-run flow. Its only test is test/structure/init-skill.bats — now 34 tests, but all still static greps over SKILL.md and the catalog files (reference resolution, prose invariants, cap agreement between SKILL.md and detect-hotspots.md). There are no repo-shape fixtures — test/fixtures/ holds hook stdin JSON, track goldens and routing rows, nothing resembling a project — and no test that scale/language detection produces the right preview manifest and seeded-document set.

Since the rewrite the matrix is two-dimensional, which widens the gap:

  • scale (--mode=small|medium|large, auto-detected via _shared/grounding/detect-scale.md) — plus the empty route decided in Step 0b;
  • depth (--depth=light|standard|deep, default standard) — the synthesis budget, with five "Universality invariants" (ceiling-not-quota, when-detected-never-always, light-is-never-empty, depth-lives-in-compose, deep-follows-the-repo) that are asserted in prose and checked nowhere against a real repo.

Expected result

Synthetic fixture repos per scale/language shape (small TS SDK, medium service, large pnpm monorepo, small Python, small Go, plus a sparse repo for the light-is-never-empty and empty-route invariants) and an init-modes.bats suite that runs init against each and asserts the preview manifest and the set of seeded documents per mode — and, at least for one fixture, per depth.

test/structure/track-goldens.bats + test/helpers/extract-gates.sh are the closest existing precedent for a golden-based harness with a documented regeneration procedure; reuse that shape rather than inventing a new one.

Impact

Locks the behavior of the most visible onboarding surface so scale detection, depth budgeting and document seeding cannot silently regress, and makes future changes to init safe to review.

Proposed approach (small PRs)

  • bats harness + one TS fixture family (small / medium / large).
  • Polyglot fixtures (small Python, small Go) + a sparse repo for the universality invariants.
  • Assertions for the preview manifest + seeded-document set per mode, and per depth on one fixture.

Acceptance criteria

  • Each mode produces the expected preview manifest and seeded-document set against its fixture.
  • Changing a detector without updating expectations fails the suite.
  • A depth change moves only the synthesis budget, never the artifact checklist (invariant 2).

References

Design rationale: .archcore/plugin/magic-first-day-init.plan.md (M6) and bootstrap-scale-modes.plan.md (M7). Code: plugins/archcore/skills/init/SKILL.md, plugins/archcore/skills/_shared/grounding/detect-*.md, test/structure/init-skill.bats, test/fixtures/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:onboarding/archcore:init and first-run experiencearea:testsTest suite (bats fixtures/harness)priority:P1Core value / correctnesssize:M1-3 days

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions