dld-goal: run state, event log, and contract schema - #30
Closed
jimutt wants to merge 4 commits into
Closed
Conversation
Adds the durable state layer for goal runs (DL-001): - create-run.sh scaffolds .dld/runs/<slug>/ with contract.md, state.json and events.jsonl, and gitignores run artifacts unless the project sets goal_run_artifacts: commit - run-state.sh reads and mutates state atomically (temp file + rename), refreshing updatedAt on every write - append-event.sh appends one compact JSON object per event - common.sh gains config_get_optional, get_runs_dir, get_run_dir, require_jq, validate_slug and utc_timestamp Schema is specified in docs/framework/run-contract.md so the bash scripts and the future Pi extension cannot drift. 39 new tests, suite at 218. Co-Authored-By: Claude Opus 5 <noreply@pi.dev> Generated-By: pi 0.84.2
/dld-goal start now presents how the decisions group into items, why each batch exists, and the ordering, and iterates until the user agrees before the contract is written. The agreed slicing is recorded in the contract body, which is immutable for the life of the run. Adds the AskUserQuestion interaction-style section other interactive skills carry. Co-Authored-By: Claude Opus 5 <noreply@pi.dev> Generated-By: pi 0.84.2
Bounds are now derived from the agreed slicing and offered as a recommendation: max items equals the planned item count, max minutes defaults to roughly 20 per decision in scope, adjusted for how wide-reaching the decisions are. Co-Authored-By: Claude Opus 5 <noreply@pi.dev> Generated-By: pi 0.84.2
Per-decision, not per-item, and the example now shows the multiplication so the two counts cannot be confused. Co-Authored-By: Claude Opus 5 <noreply@pi.dev> Generated-By: pi 0.84.2
jimutt
force-pushed
the
feat/dld-goal-state
branch
from
August 21, 2026 11:49
6f90806 to
3362119
Compare
Owner
Author
|
Superseded by feat/pi-harness-extension — all commits from this branch are merged there. See #41 for the findings log on top. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on #29. Implements DL-001.
What
The durable state layer for goal runs, under
.dld/runs/<slug>/:contract.md(immutable objective),state.json(atomic writes, camelCase),events.jsonl(append-only).New scripts:
create-run.sh,run-state.sh,append-event.sh.common.shgainsconfig_get_optional,get_runs_dir,get_run_dir,require_jq,validate_slug,utc_timestamp.docs/framework/run-contract.mdspecifies the format normatively, so the bash scripts and the future Pi extension cannot drift.Notable
jq, scoped todld-goaland declared in itscompatibilityfrontmatter. The item schema is genuinely nested and hand-parsing it in bash is where correctness bugs live.goal_run_artifacts: commit.skills/dld-*/dir to be registered in plugin.json and to carry a SKILL.md, so the skill file grows across the stack.39 new tests.