Skip to content

Package the reproducible Lambdasistemi Spec Kit fork - #5

Draft
paolino wants to merge 4 commits into
mainfrom
feat/reproducible-spec-kit-fork
Draft

Package the reproducible Lambdasistemi Spec Kit fork#5
paolino wants to merge 4 commits into
mainfrom
feat/reproducible-spec-kit-fork

Conversation

@paolino

@paolino paolino commented Aug 5, 2026

Copy link
Copy Markdown

Closes #1. Parent epic #4.

What this delivers

A reproducible Nix distribution of the Lambdasistemi Spec Kit fork, plus a
generic repair of template composition in the setup scripts.

After this PR a colleague can run nix run .#specify -- --help from a clean
checkout and get the same CLI locally and in CI, and a project using a preset
that declares append, prepend, or wrap actually receives the composed
template content from plan and task setup.

Why the composition change is here

resolve_template_content (Bash) and Resolve-TemplateContent (PowerShell)
already exist in the shared script libraries and have no callers.
setup-plan copies the winning layer's file and setup-tasks reports the
winning layer's path, so every strategy other than replace is silently
discarded. This PR routes both setup scripts through the resolver that is
already there rather than adding a second composition engine.

Slices

  • S1flake.nix, tracked flake.lock, the packaged specify app,
    machine-readable distribution identity, and an always-present Nix CI gate.
  • S2 — composed template materialization for Bash and PowerShell
    setup-plan / setup-tasks, with focused regressions.

Verification

The ticket mandate lives in specs/1-reproducible-spec-kit-fork/ and carries
ten invariants, each with its observable failure mode. Both slice gates were
proved able to fail at the base commit before any implementation started.

Notable proofs: the app is invoked from a fresh git clone rather than the
working tree; the declared upstream base SHA must be declared exactly once and
be an ancestor of HEAD; and the PowerShell regressions must execute — the
gate fails if they skip, and a negative control confirms they genuinely depend
on the PowerShell interpreter.

Scope

This PR does not define the workflow constitution, the policy pack (#3), agent
guidance (#2), or any repository migration, and submits nothing upstream.

paolino added 2 commits August 5, 2026 10:41
The inherited ignore rules hide two paths this ticket needs. `specs/` excluded
the directory itself, so the issue #1 planning record could never be staged;
replacing it with `/specs/*` plus one negation keeps every other dogfooding
spec directory ignored while making this ticket's mandate reviewable.

`/gate.sh` is added so the per-ticket runtime gate stays untracked by
construction rather than by discipline.
Records the spec, plan, modules/data/functions models, and task list for
packaging the reproducible Lambdasistemi Spec Kit fork.

Two facts drive the plan. The composition resolvers that already exist in the
Bash and PowerShell common libraries have no callers, so preset strategies
other than `replace` are never materialized by plan and task setup. And the
inherited `*.lock` ignore rule would silently drop `flake.lock`, which the
distribution cannot be reproducible without.

The mandate carries ten invariants, each with its observable failure mode, and
splits the work into a Nix distribution slice and a composition slice.
@paolino paolino added experiment Experimental feat New feature labels Aug 5, 2026
@paolino paolino self-assigned this Aug 5, 2026
paolino added 2 commits August 5, 2026 14:47
Package the tracked fork through a locked Nix flake that builds and runs the Specify CLI reproducibly, with the Python suite executed as a flake check.

Expose machine-readable distribution identity and upstream ancestry, route the always-present CI workflow through the shared Nix gate, and enforce its complete permitted step set with a closed-world check.

Assisted-by: Codex (model: GPT-5.6-sol, autonomous)
Tasks: T101, T102, T103, T104, T105, T106, T107
The fourth independent audit of this ticket defeated INV-11 as written. Its
fail clause spoke of workflow *steps*, and over steps the delivered check is
airtight: 15 of 15 step-shape mutations are rejected. The escape was one level
up, in the workflow document — a top-level `defaults: run: shell: 'true {0}'`
neutralises the permitted step, and narrowing `on:` removes the gate from
push and pull_request. Both were demonstrated end to end on clean committed
trees.

That is a defect in the invariant's wording, not in the implementation, so the
invariant is restated at the level it holds rather than left overclaiming.
The residual is recorded in the spec with its measured escapes so a successor
can close the document level deliberately, instead of it being discovered
again by the next audit.

INV-11 was added by the ticket owner mid-ticket after a shipped CI step could
not pass and nothing executed it. It is not among the issue's acceptance
criteria; that is now stated explicitly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

experiment Experimental feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package the reproducible Lambdasistemi Spec Kit fork

1 participant