feat(harness): add task-scoped experience traces - #77
Conversation
Implement the first executable LC-03 slice with a bounded, privacy-safe Qoder source projection, canonical create and validate JSONL contracts, maintainer CLI discovery, golden fixtures, and package checks. Issue QoderAI#70 is related consumption evidence and is not closed by this change. Bindings remain caller-asserted, and partial or unavailable traces remain advisory-only. Validation covered focused, cross-module, documentation, package, runtime-bundle, and full regression checks. Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
There was a problem hiding this comment.
Pull request overview
Adds the first LC-03 task-scoped Experience Trace capability, producing deterministic, privacy-safe JSONL from Qoder report sources.
Changes:
- Implements bounded trace projection, serialization, validation, and CLI routing.
- Adds normative fixtures and extensive contract, privacy, bounds, and CLI tests.
- Documents architecture, specification, packaging, and user-visible behavior.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
scripts/experience-trace/contract.mjs |
Defines the canonical trace contract. |
scripts/experience-trace/project-source.mjs |
Projects validated Qoder report sources. |
scripts/experience-trace/cli.mjs |
Implements create and validate commands. |
scripts/experience-trace/command-manifest.mjs |
Declares command metadata. |
scripts/experience-trace/index.mjs |
Exposes the public module surface. |
scripts/better-harness-cli/registry.mjs |
Registers the new subcommand. |
scripts/better-harness-cli/cli.mjs |
Delegates strict help validation. |
scripts/npm-package/verify-pack.mjs |
Verifies packaged trace modules. |
test/experience-trace-contract.test.mjs |
Tests wire contract and bounds. |
test/experience-trace.test.mjs |
Tests source projection behavior. |
test/experience-trace-cli.test.mjs |
Tests CLI behavior and privacy. |
test/better-harness-cli.test.mjs |
Tests root CLI integration. |
test/scripts-refactor-contract.test.mjs |
Updates discovery output hashes. |
test/fixtures/scripts-refactor-contract/root-help.txt |
Updates root help fixture. |
test/fixtures/scripts-refactor-contract/harness-help.txt |
Updates harness help fixture. |
docs/specs/fixtures/lc03-no-session-v1.jsonl |
Adds unavailable-evidence fixture. |
docs/specs/fixtures/lc03-episode-v1.jsonl |
Adds Episode trace fixture. |
docs/specs/2026-08-11-lc03-experience-trace-v1.md |
Specifies LC-03 V1 behavior. |
docs/ARCHITECTURE.md |
Records capability ownership. |
CHANGELOG.md |
Announces the new command. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Keep Experience Trace golden fixtures byte-identical on Windows by declaring JSONL files as LF-normalized text. This follows the cross-platform fixture contract in docs/specs/2026-08-11-lc03-experience-trace-v1.md for roadmap LC-03 and related issue QoderAI#70, and was validated with focused tests plus npm test. Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
|
Thanks for this, and apologies for a missing-context problem that was on my side, not yours. Context you could not have hadWhen you branched from Please take a look at it before deciding what to do with this PR, because it already implements the commit-link half of the LC-03 acceptance row. What
The part that overlaps this PR is the confidence ladder in Grace window defaults to 45 minutes after That is the Where that leaves this PRI do not think this slice should merge in its current shape, for three reasons that are architectural rather than stylistic. 1. Two canonical lists over one fact domain.
So the required next step is a dated spec jointly owned by 2. Evidence class taxonomy is routed elsewhere. ADR-0001's routing table assigns "Shared evidence envelope, class taxonomy, or redaction invariant" to 3. Public runtime contract without the required consumers. The spec describes the output as "an observation artifact for external consumers", and Two factual observations to go with that:
Also note What I would keepThe design instinct here is right and I want it preserved: refusing timestamp-proximity inference, and requiring either an exact Episode ref or an explicit no-session declaration. That is precisely where the Concretely, my suggestion is to close this PR and reopen the work as the joint alignment spec described above. If you want something landable right now, |
Summary
better-harness harness experience-trace create|validateas the first executable LC-03 slice.report.source.jsoninto deterministic, versioned canonical JSONL.partial/unavailablecoverage, stable private errors, root CLI discovery, public exports, and package/runtime-bundle ownership.Why
LC-03; related consumption evidence in [Feature]: Feature request: Task-scoped machine output for external delivery pipelines #70. This PR does not close [Feature]: Feature request: Task-scoped machine output for external delivery pipelines #70.Traceability and Scope
docs/specs/2026-08-11-lc03-experience-trace-v1.mdscripts/experience-trace/, root CLI registry/dispatch, architecture routing, npm/runtime pack verification, tests, fixtures, and changelogChange Type
Test and Review Evidence
node --test test/experience-trace-contract.test.mjs test/experience-trace.test.mjs test/experience-trace-cli.test.mjs test/better-harness-cli.test.mjs test/scripts-refactor-contract.test.mjsnode --test test/harness-report-source.test.mjs test/task-loop-source.test.mjs test/session-episode-contract.test.mjsnode scripts/doc-link-graph/cli.mjs skills/better-harness+ doc-link testnpm run pack:verifynpm testgit diff --checkverdict=pass,p1_p2_clear=trueManual or visual evidence: both versioned JSONL fixtures reproduce byte-for-byte with independently replayed identities and digests. No visual change. No CI status is claimed.
Risk and Recovery
560be0e; the feature is read-only and writes no artifacts.AI Involvement
Level: Assisted.
Human review and validation: automated evidence and two independent counterexample-review rounds are complete.
Checklist
AGENTS.md,CONTRIBUTING.md, and the relevant canonical-owner guidance.CHANGELOG.md.