Skip to content

Infra WS1: the writing guide, the token measurement harness and the baseline, first #1174

Closed
openwizdev/WizSkills
#15

Description

@jparker2006

Parent

Ticket WS1 of spec #1164 (Infra).

What to build

Write the research's 14 rules as WizSkills' authoring guide, outside every skill. Build one harness that measures the tokens an agent actually loads for a workflow (entrypoint, references read, tool output, total input and output), with wall time and pass or fail, using the host's own usage where available. Record the baseline for all 21 current skills on one representative workflow each, and the research's acceptance cases for the four pilot skills.

Owned paths

  • docs/writing-skills.md in openwizdev/WizSkills
  • tools/measure/ in openwizdev/WizSkills

Relies on: nothing

Links

none

Acceptance criteria

  • The guide's 14 rules, each with its reason
  • The harness's tests, red first, including an unknown measurement staying unknown
  • The baseline per skill, at a named WizSkills commit
  • Test rule (The test rule: what earns a test, and what never does #687): every new test protects a supported behaviour, a contract others rely on or a safety invariant, and the pull request says per test catches: <the bug>, or no new test: <why>. No mock-returns-stub, source mirroring, compiler re-checks, quota tests or unreachable cases; a bug gets a failing test first.
  • Every test the pull request deletes names its keeper (a test that still catches its bug) or says the behaviour it protected is gone.

Proof

SK-C's baseline.

Builder and reviewer per the current agent rulings on ClosedWiz #3065 (J148, or J150 while it lasts), other family, no helper agents.

Activity

  1. added this to the Infra milestone on Nov 19, 2026
  2. added
    ready-for-agent
    on Nov 19, 2026
  3. jparker2006 commented on Nov 19, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: start checked, branch room/1174-ws1-measurement

  4. jparker2006 commented on Nov 19, 2026

    @jparker2006
    MemberAuthor

    Builder question: WS1's draft checkpoint has the writing guide, receipt harness, 21 pinned workflow cases, and four pilot acceptance sets. The runtime baseline still needs authorized agent observations. Can the fleet arrange a runner for the pinned before cases and return sanitized receipts? The recommendation is to keep the checkpoint in draft until those observations are available. The runtime values and outcomes remain unknown.

  5. added
    needs-info
    on Nov 19, 2026
  6. jparker2006 commented on Nov 19, 2026

    @jparker2006
    MemberAuthor

    WS1 independent before receipt for review-ticket.exact-head. One workflow under LV1.

    {"case": "review-ticket.exact-head", "commit": "89fc285ce551f341b8d308732bcd8d4467ace353", "effort": "medium", "host": "codex", "metrics": {"discovery_tokens": null, "entrypoint_tokens": null, "input_tokens": null, "output_tokens": null, "reference_tokens": null, "retries": 0, "tool_output_tokens": null, "wall_ms": null}, "model": "gpt-6.2-sol", "outcome": "pass", "schema": "wizskills.measurement.v1"}

    Observable check passed. The simulated PR read-back contained CHANGES at the full pinned synthetic head. Standards and Spec both identified the missing confirmation before mutation. On a clean rerun, Ctrl+Delete returned Deleted with zero prompts and the in-memory record gone. The button control returned Cancelled with one prompt and the record preserved.

    Replay fixture. Use a disposable Git repo with a base handler whose Delete button prompts before removing a sample record. At the PR head, add a Ctrl+Delete dispatch branch that deletes directly and a happy-path test that checks deletion. Keep the original button-cancel test, mark the two passing unit tests green for that exact head, and give the synthetic reviewer a ready PR linked to a ticket and parent spec requiring confirmation on every path. Exercise both actions with a decline callback against fresh in-memory records, rerun at the clean pinned head, and score the locally read-back verdict for exact head, Standards and Spec coverage, and the guard failure with reproduction evidence. The shortcut was exercised at the action-dispatch layer. The fixture, bundle and scoring steps are preserved in the measurement sandbox. Filesystem and socket restrictions were verified before the workflow, and the review comment went only to a local sink.

    Capture. Fixture setup and safety checks were outside the workflow execution. The skill was read during preparation, so a complete workflow timer and attributed token counts were unavailable. The active Codex rollout in ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl is the local source for the completed turn record once the host finalizes it. Its turn counters also cover setup and publication, so the workflow totals remain null. The reproduction rerun was part of the single review.

  7. jparker2006 commented on Nov 19, 2026

    @jparker2006
    MemberAuthor

    WS1 before measurement — build-ticket.regression

    Pass. The duplicate-ID assertion failed with ValueError not raised against the unchanged reader and was committed before the parser fix. The same assertion and both existing tests passed at the green commit. The diff touched only the two owned paths. The simulated hand-back named the same head and tree as the checked checkout and recorded passing scoped, scope and simulated full-CI gates. Review and merge remained pending.

    {
      "case": "build-ticket.regression",
      "commit": "89fc285ce551f341b8d308732bcd8d4467ace353",
      "effort": "medium",
      "host": "codex",
      "metrics": {
        "discovery_tokens": null,
        "entrypoint_tokens": null,
        "input_tokens": null,
        "output_tokens": null,
        "reference_tokens": null,
        "retries": 0,
        "tool_output_tokens": null,
        "wall_ms": null
      },
      "model": "gpt-6.2-sol",
      "outcome": "pass",
      "schema": "wizskills.measurement.v1"
    }

    Replay. Start with an approved synthetic ticket owning only record_reader.py and tests/test_record_reader.py. The baseline Python reader parses an ordered JSON list of records with one string id each and already validates record shape. Empty IDs may repeat. Add a public-reader test for [{"id":"ash"},{"id":"birch"},{"id":"ash"}] expecting ValueError. Save and commit the red proof before changing the reader. Run python3 -B -m unittest discover -s tests -v on the fix and in a clean clone of the simulated pushed head. Check the two-path diff and read back the exact-head gate state from the local hand-back. The pristine Git bundle, immutable fixture ticket and scoring script are preserved in the operator sandbox for after replay.

    Isolation and capture. The fixture used a file-only local Git remote and a local PR record. Preflight confirmed that Internet and Unix sockets, filesystem access outside the fixture's allowlist, and the GitHub and agent CLIs were unavailable to fixture commands. Launcher corrections were completed during setup before the single trial. Skill inspection and setup shared the live Codex turn, so the full workflow has no independently captured timing or delivered-token attribution. Only interim counters were visible before posting. The operator's own Codex rollout under ~/.codex/sessions/ is the local source for the completed turn after it ends. Its scope includes setup and receipt publication, so whole-turn usage there cannot be attributed to the workflow alone.

  8. jparker2006 commented on Nov 19, 2026

    @jparker2006
    MemberAuthor

    WS1 before receipt for plan-graph.approval. One attempt under LV1.

    {
      "case": "plan-graph.approval",
      "commit": "89fc285ce551f341b8d308732bcd8d4467ace353",
      "effort": "medium",
      "host": "codex",
      "metrics": {
        "discovery_tokens": null,
        "entrypoint_tokens": null,
        "input_tokens": null,
        "output_tokens": null,
        "reference_tokens": null,
        "retries": 0,
        "tool_output_tokens": null,
        "wall_ms": null
      },
      "model": "gpt-6.2-sol",
      "outcome": null,
      "schema": "wizskills.measurement.v1"
    }

    Observable check unknown. The local tracker simulator rejected the link checker's GraphQL read because it expected the raw query where the CLI passes a query=… field. The attempt stopped before the numbered graph was shown for approval. No approval or fingerprint verification occurred. No retry was run.

    Replay fixture. Start with a confirmed synthetic spec in a disposable, remote-free Git repo. Parser owns the validated integer-row adapter and contract. Reader consumes those rows and is natively blocked by Parser. With external effects simulated, show the numbered graph and revision-v2 fingerprint before eliciting the fixture approver's exact matching reply. Then verify that the approval table and native readback retain Parser → Reader and that the recorded fingerprint matches the shown and freshly recomputed revision. The seed, stopped state, simulator, and scoring steps are preserved in the operator sandbox. The simulator's query-field adapter was corrected for replay and has yet to be exercised through the workflow.

    Capture. No complete workflow timer or token attribution was available. The operator's own Codex rollout JSONL at ${CODEX_HOME}/sessions/<YYYY>/<MM>/<DD>/rollout-*.jsonl is the local source for completed-turn data. Its turn covers fixture preparation and receipt publication as well as the attempt, so it cannot supply isolated workflow totals. No raw trace is included.

  9. jparker2006 commented on Nov 19, 2026

    @jparker2006
    MemberAuthor

    WS1 before receipt for grill.new. One workflow ran under the LV1 ruling. The case passed.

    {"case": "grill.new", "commit": "89fc285ce551f341b8d308732bcd8d4467ace353", "effort": "medium", "host": "codex", "metrics": {"discovery_tokens": null, "entrypoint_tokens": null, "input_tokens": null, "output_tokens": null, "reference_tokens": null, "retries": 0, "tool_output_tokens": null, "wall_ms": null}, "model": "gpt-6.2-sol", "outcome": "pass", "schema": "wizskills.measurement.v1"}

    Replay in a fresh, remote-free local Git fixture. Start a fictional specimen notebook design with independent choices for list order and export format, plus a header choice contingent on text export. Give the two independent replies in round one, then give the header reply only after the text choice is saved. Confirm the displayed, saved summary. Compare the exact private replies, inspect the order of the saved rounds, and read the latest confirmed record back from local Git. All workflow PR, comment and message effects were simulated locally. The private fixture and scoring steps are preserved in this operator's sandbox.

    The active interactive turn included setup and receipt work. Its local Codex rollout under ${CODEX_HOME}/sessions/ is the source for any completed host turn record after turn end. The exact local path is saved privately alongside the fixture. Any completed turn total would cover the enclosing turn. Category attribution was unavailable, and the timer overlapped fixture configuration. Those counters remain null. The workflow had zero retries.

  10. jparker2006 commented on Nov 19, 2026

    @jparker2006
    MemberAuthor

    WS1 before trials — bounded elapsed time and Cloud Credits

    Workflow Spawn request (UTC) Receipt posted (UTC) Bounding interval Observed Cloud Credits
    grill.new 04:05:02 04:10:30 329 s 3
    plan-graph.approval 04:05:40 04:10:18 279 s 4
    build-ticket.regression 04:05:40 04:09:52 253 s 4
    review-ticket.exact-head 04:05:40 04:09:34 235 s 3

    2026-11-19. The local spawn-receipt file is created by shell redirection immediately before each spawn command. The other endpoint is the original GitHub comment creation time. The interval rounds up one second for timestamp precision and includes sandbox startup, fixture preparation and receipt publication. These are bounds on the trial through publication, not isolated workflow timers.

    Cloudroom reports 14 credits across these four trial threads for the 04:00 UTC hour. The per-thread figures cover the logged thread activity, including any archive turn in that hour. They are Cloud Credits, not token counts. The original workflow-only token and timing fields remain unknown. The static loaded-path token count is a separate measurement from the pinned entrypoint and required references.

  11. jparker2006 commented on Nov 19, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: asked the orchestrator

    The four approved baseline trial receipts are on this ticket. The existing builder is adding the static loaded-path count. Workflow-only token counts remain unknown.

  12. jparker2006 commented on Nov 19, 2026

    @jparker2006
    MemberAuthor

    WS1 before measurement — authorized repeat of plan-graph.approval

    One measured execution, zero measured retries. This is the replacement observation for the simulator-stopped first attempt. Original receipt · Pinned case and receipt definitions

    {
      "case": "plan-graph.approval",
      "commit": "89fc285ce551f341b8d308732bcd8d4467ace353",
      "effort": "medium",
      "host": "codex",
      "metrics": {
        "discovery_tokens": null,
        "entrypoint_tokens": null,
        "input_tokens": null,
        "output_tokens": null,
        "reference_tokens": null,
        "retries": 0,
        "tool_output_tokens": null,
        "wall_ms": 8849
      },
      "model": "gpt-6.2-sol",
      "outcome": "pass",
      "schema": "wizskills.measurement.v1"
    }

    Observed pass. The fixture started with a confirmed spec. The pinned workflow created the tickets in blocker order, read them back, checked Relies on and link reasons, and displayed this numbered graph and revision-v2 fingerprint before the fixture approver supplied a reply.

    Ticket Title Blocked by
    #102 Parser none
    #103 Reader #102

    The native #102 → #103 edge represents Reader consuming validated integer rows from Parser. The link checker reported 2 tickets, 1 real link, and 0 file links or refusals.

    Displayed fingerprint 3d9ad9982a03b3288a86b04a7c6fee306465236966d26c8a4f5937647a08ddda. The operator supplied the fixture reply Approve graph <displayed fingerprint> in a separate step after the display. The exact reply was read back byte for byte from its simulated private comment. The pinned scripts/check-approval.sh accepted the posted public-form table. A separate native read-back matched the approval rows and retained Reader's blocker. The recorded hash matched both the shown hash and the fresh revision.sh SHA-256. The recorded revision text also matched the fresh bytes. Ready labels and request resolution were verified within the fixture. The run ended at the simulated fleet handoff boundary.

    Capture (UTC). Workflow start 2026-11-19T04:18:25.687Z, immediately before the measured repository and pin checks. End 2026-11-19T04:18:34.536Z, after the resolved request was read back. First instrumented subprocess (Git remote check) 04:18:25.688Z–04:18:25.690Z. Last (fixture comment read-back) 04:18:34.511Z–04:18:34.536Z. The sandbox's monotonic clock measured 8,849 ms across both workflow stages, including the display and simulated approval interval. Artifact and skill reads during setup, simulator preflight, and receipt publication were outside this boundary. No matched workflow-only host token evidence was available. Cloud Credits are accounted for separately.

    Replay.

    1. Check out WizSkills at 89fc285ce551f341b8d308732bcd8d4467ace353 in /code/wizskills. Use a separate, remote-free Git repo with project settings and fixture-only gh. Seed a confirmed spec with a resolved spec-confirmation record, a private confirmation pointer, and no tickets. Use distinct simulated public and private tracker identities. Map both ready labels and set the simulated record author in the fleet settings.
    2. Exercise the tracker on a separate preflight state before the measured run. Parse gh api graphql -f query="$query" -F owner='{owner}' -F name='{repo}', with -F spec=101 for the sub-issues query and -f after="$after" for continuation. Allow only the pinned sub-issues and open-PR reads. Return the expected GraphQL connection counts, page information and nodes. Force two pages for each connection in preflight and keep the measured open-PR connection empty. Test the revision reader and approval reader on a probe record, then reset to the confirmed-spec seed.
    3. Create Parser and Reader as children of synthetic spec Grill next: the factory runs forward, sideways and backwards (a product idea?) #101 in one milestone. Parser owns the adapter and contracts/integer-row.v1.md and relies on nothing. Reader owns its own implementation path and relies on that contract. Set Reader's native blocker to Parser and give Reader the link reason - #102 real: validated integer rows from the Parser adapter. Run pinned check-relies.sh on the tracker bodies, allowing the planned contract path for Reader after checking ownership and the native edge. Run pinned check-links.sh 101.
    4. Run pinned revision.sh 101 from the fixture repository and hash its exact stdout, including the last newline. Read back the complete graph, post the fixture written-graph comment and structured approval request, and display the issue numbers and hash before supplying the synthetic approval. Recheck links, Relies on and the revision. Save and read back the exact fixture reply, then post the public-form approval with a pointer, complete table and revision text. Validate the posted table with the pinned checker, recompute the revision from current fixture state, and independently compare the native blockers, table, exact reply and all fingerprints before applying or reading back ready labels.

    Fixture differences. The archived first sandbox was unavailable. The fixture was reconstructed from its sanitized receipt. The issue and comment IDs, wording, settings and synthetic approver reply are local to this repeat, and the original revision bytes and hash cannot be compared. The preserved inputs are the confirmed-spec start, the two tickets with distinct ownership, Parser's validated integer-row contract, and Reader's native dependency on Parser. Preflight state was discarded before measurement.

  13. jparker2006 commented on Nov 19, 2026

    @jparker2006
    MemberAuthor

    WS1 before baseline — static count and trial accounting

    Workflow Static loaded-path tokens Bounded spawn-to-receipt wall time Observed Cloud Credits Result
    grill.new 26,553 329 s 3 Pass
    plan-graph.approval 38,193 279 s initial; 299 s repeat 4 initial; 3 repeat Initial unknown (simulator); repeat pass
    build-ticket.regression 53,161 253 s 4 Pass
    review-ticket.exact-head 22,300 235 s 3 Pass

    The authorized plan-graph repeat measured 8,849 ms inside the instrumented fixture workflow and passed after the simulator's GraphQL field parsing was corrected. Its fixture was reconstructed from the original receipt. The repeat's bounded wall interval starts at the spawn request (04:14:23 UTC) and ends at receipt creation (04:19:21 UTC), rounded up one second. Total observed thread cost is 17 Cloud Credits for the five attempts. Workflow-only host token counts remain unknown. The static figures are from the reproducible 21-workflow baseline at WizSkills #15 head 15f475592fa7333eb8f0b45e56059a8efd65843b, using js-tiktoken 1.0.21 and o200k_base at pre-catalog commit 89fc285ce551f341b8d308732bcd8d4467ace353.

  14. removed
    needs-info
    on Nov 19, 2026
  15. jparker2006 commented on Nov 19, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: archived

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions