You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`config/pkl/check-generated.sh` (stale-output detection against committed generated files)
25
+
-`config/pkl/check-generated.sh` (dev-shell integration stale-output detection against committed generated files)
26
+
-`.github/workflows/pkl-generated-parity.yml` (CI wrapper that runs the parity check on `push` and `pull_request`)
26
27
27
28
The scaffold provides stable canonical content-unit identifiers and reusable target-agnostic text primitives for all planned authored generated classes (agents, commands, skills, shared library file).
- Both renderers expose per-class rendered document objects (`agents`, `commands`, `skills`) consumed by `config/pkl/generate.pkl`.
37
38
-`config/pkl/generate.pkl` emits deterministic `output.files` mappings for all authored generated targets: OpenCode/Claude agents, commands, skills, and `lib/drift-collectors.js` in both trees.
38
39
- Generated-file safety markers are part of emitted artifacts: Markdown outputs include an HTML warning comment after frontmatter, and the shared library output carries a leading JS generated warning header.
40
+
-`config/pkl/check-generated.sh` is intentionally dev-shell scoped (`nix develop -c ...`): it requires `IN_NIX_SHELL`, runs `pkl eval -m <tmp> config/pkl/generate.pkl`, and fails when generated-owned paths drift.
Copy file name to clipboardExpand all lines: context/patterns.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,8 @@
29
29
- Use `config/pkl/generate.pkl` as the single generation module for authored config outputs.
30
30
- Use `config/pkl/README.md` as the contributor-facing runbook for prerequisites, ownership boundaries, regeneration steps, and troubleshooting.
31
31
- Run multi-file generation with `nix develop -c pkl eval -m . config/pkl/generate.pkl` to emit to repository-root mapped paths.
32
-
- Run stale-output detection with `nix develop -c ./config/pkl/check-generated.sh`; it regenerates into a temporary directory and fails if generated-owned paths differ from committed outputs.
32
+
- Run stale-output detection with `nix develop -c ./config/pkl/check-generated.sh`; the script is a dev-shell integration test, exits non-zero outside `nix develop`, regenerates into a temporary directory, and fails if generated-owned paths differ from committed outputs.
33
+
- Keep CI parity enforcement aligned with local workflow by running the same command in `.github/workflows/pkl-generated-parity.yml` on both `push` and `pull_request`.
33
34
- For non-destructive verification during development, run `nix develop -c pkl eval -m context/tmp/t04-generated config/pkl/generate.pkl` and inspect emitted paths under `context/tmp/`.
34
35
- Keep `output.files` limited to generated-owned paths only (`config/{opencode_root}/{agent,command,skills,lib}` and `config/{claude_root}/{agents,commands,skills,lib}` where roots map to `.opencode` and `.claude`).
35
36
- Keep the shared drift library generated warning marker in `config/.opencode/lib/drift-collectors.js` (the canonical copied source) so both target library outputs inherit a stable, non-duplicating safety header.
Copy file name to clipboardExpand all lines: context/plans/pkl-config-generation.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ Create a deterministic Pkl-based generation workflow that produces both configur
132
132
- Regenerated all generated-owned outputs with `nix develop -c pkl eval -m . config/pkl/generate.pkl` and verified clean-state determinism via `nix develop -c ./config/pkl/check-generated.sh`.
133
133
- Ran task-level checks and light build gate: `nix develop -c pkl eval config/pkl/renderers/metadata-coverage-check.pkl`, `nix develop -c pkl eval config/pkl/generate.pkl`, and `nix flake check --no-build`.
134
134
135
-
-[] T08: Validation and cleanup (status:todo)
135
+
-[x] T08: Validation and cleanup (status:done)
136
136
- Task ID: T08
137
137
- Goal: Run final end-to-end validation, ensure docs and generated outputs are aligned, and clean temporary artifacts.
138
138
- Boundaries (in/out of scope):
@@ -144,6 +144,15 @@ Create a deterministic Pkl-based generation workflow that produces both configur
144
144
- Temporary planning/execution artifacts are cleaned.
145
145
- Verification notes (commands or checks):
146
146
- Run full planned validation checks and capture evidence in the plan update.
147
+
- Evidence:
148
+
- Added Nix dev-shell integration parity behavior to `config/pkl/check-generated.sh`: the check now requires `IN_NIX_SHELL`, evaluates `config/pkl/generate.pkl` with `pkl` directly inside the shell, and diffs generated-owned paths against committed outputs.
149
+
- Updated `config/pkl/README.md` command guidance to describe `nix develop -c ./config/pkl/check-generated.sh` as the Nix dev-shell integration stale-output test and documented the outside-shell non-zero expectation.
150
+
- Captured clean-state parity evidence with `nix develop -c ./config/pkl/check-generated.sh` (pass: "Generated outputs are up to date.").
151
+
- Re-ran generator and metadata validations: `nix develop -c pkl eval config/pkl/generate.pkl` and `nix develop -c pkl eval config/pkl/renderers/metadata-coverage-check.pkl`.
152
+
- Validation report (commands, exit codes, key outputs): `nix develop -c ./config/pkl/check-generated.sh` (exit 0; output includes `Generated outputs are up to date.`), `nix develop -c pkl eval config/pkl/generate.pkl` (exit 0), `nix develop -c pkl eval config/pkl/renderers/metadata-coverage-check.pkl` (exit 0), `nix flake check --no-build` (exit 0), and `nix flake check` (exit 0).
153
+
- Lint/format validation note: this repository currently defines no separate global lint/format gate beyond the Nix-based checks above for this scope.
154
+
- Confirmed temporary artifact cleanliness for this task: `context/tmp/` contains only `.gitignore`.
155
+
- Residual risk: full multi-platform flake validation remains host-scoped; Nix reported incompatible systems omitted (`aarch64-darwin`, `aarch64-linux`, `x86_64-darwin`).
0 commit comments