Skip to content

docs: add the repository specification for stage interfaces - #313

Merged
lanyue-llk merged 6 commits into
mainfrom
docs/repository-spec
Nov 24, 2026
Merged

lanyue-llk merged 6 commits into
mainfrom
docs/repository-spec

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Add docs/spec.md, the repository-level standard for code, documentation and reviews. It turns the existing "extend the current owner" rule into stage interfaces: a method, benchmark or report instance is an adapter plus data, and shared stages take no branch for one instance.

flowchart LR
    P[/"Profile + bound content"/] -- selects --> A["Method and benchmark adapters"]
    A -- plug into --> R["Run"] --> S["Score"] --> B["Build report"] --> K["Check and package"] --> U["Publish to Yours"]
    S --> X["Export result"] --> W["Submit to webstone-site"]
Loading

Contents

  • Model: track, benchmark, method, report instance.
  • Stages and the persisted, schema-versioned artifacts they exchange.
  • Extension points: method, benchmark and environment adapters, track registration, section hooks, release rules, publication targets, result exporters.
  • Report instances as profile plus bound content; no hand-authored build inputs.
  • Report templates in three layers (base, track, benchmark views) with instance content in slots; a default report builds from data alone and always has the same shape.
  • One command surface: webstone <track> run | score | report | check | package | publish | export.
  • Eleven rules, a table of what each kind of change may touch, and three mechanical checks.
  • Migration: new and touched code conforms; existing violations sit in allowlists that only shrink.

AGENTS.md, docs/architecture.md and CONTRIBUTING.md link to it. No code changes.

The audit of main against this standard and the resulting tasks are in #336.

Verification

tests/test_readme_navigation.py, tests/test_source_language_policy.py and scripts/check_track_naming.py pass.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Review complete · 5e76791

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread docs/spec.md Outdated

## Enforcement

Reviews apply this page to every change. Three mechanical checks back them up:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation · medium
These checks and the migration baseline are described as already operational, but the repository's tests/scripts contain no corresponding layering check, instance-literal check, or shrinking violation allowlist, and the accompanying guidance does not defer them. This makes the immediately authoritative migration rule depend on a baseline contributors cannot find. Either include/link the enforcement implementations and baseline, or explicitly label them as planned and state how reviews handle existing violations until they land.

This was referenced Nov 24, 2026

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · 4f7ada2

This review found 2 issue(s), including 2 blocking issue(s).

Comment thread docs/spec.md Outdated
Comment on lines +164 to +165
input. Any file a stage needs is either committed data or produced by a
documented command; a stage must not depend on a file that someone writes by

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation · medium
This input rule conflicts with the explicitly supported authored profiles and bound content: the change-placement table requires them to live outside Git, so newly authored external prose/configuration is neither committed nor command-generated. Exempt explicitly declared external configuration and authored content (while retaining validation/binding requirements), or document the command that imports them into a stage artifact. Otherwise a normal new report instance violates this standard.

Comment thread docs/spec.md Outdated

Defaults:

- **A report builds from scored results and a profile alone.** With no authored

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation · medium
The standalone-build guarantee leaves required report inputs unspecified. The page-role table also requires the frozen dataset, evidence bindings, method identities and review records, while the stage table lists only scored results and bound content. Specify whether scored results embed these inputs or carry validated, portable bindings to them, and define the default when optional records are absent. Otherwise a builder cannot satisfy both this guarantee and the prohibition on undeclared stage dependencies.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · 51b489e

This review found 2 issue(s), including 2 blocking issue(s).

Comment thread docs/spec.md Outdated
Comment on lines +91 to +93
Scored results carry the method identities and hash bindings to the frozen
dataset and to the evidence of each call, so the report stage needs no other
undeclared input. Review records and bound content are optional inputs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation · medium
Hash bindings verify referenced bytes but do not provide or locate them. The report needs dataset contents and call evidence, so the stated cross-machine continuation and data-only build guarantees need a transport/resolution contract. Specify that the scored-result artifact bundles these dependencies or declares resolvable locations (with hash validation and missing-dependency behavior). The linked architecture describes external storage but does not establish this portable artifact contract.

Comment thread docs/spec.md Outdated
Comment on lines +343 to +344
Existing code predates this page. New code and every touched code path conform
from now on. Existing violations are inventoried in the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation · medium
The migration obligation is ambiguous: “every touched code path” must conform, but the later sentence permits a change to leave an existing violation in place without limiting that permission to untouched paths. This gives reviewers conflicting criteria for changes to nonconforming code. Specify whether existing violations may remain in touched paths and align both sentences with that policy.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · 4b6aa1e

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread docs/spec.md Outdated
Comment on lines +98 to +100
Scored results carry the method identities and hash bindings to the frozen
dataset and to the evidence of each call, so the report stage needs no other
undeclared input. Review records and bound content are optional inputs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation · medium
Hash bindings establish integrity but do not specify how a report builder obtains the frozen dataset and raw evidence. The Datasets and Results page contracts need those bytes, and the specification promises that another machine can continue from a saved artifact. Please require either a portable bundle containing the bound inputs or a manifest with resolvable locations and a defined retrieval/validation contract; hashes alone cannot satisfy the stated report inputs.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · b34c69c

This review found 2 issue(s), including 2 blocking issue(s).

Comment thread docs/spec.md Outdated
| Build report | Scored results with their dataset and evidence bindings; optionally review records and bound content | Report directory | `src/harness/reporting/` and the track's report module | Call a method, rescore, or embed instance content |
| Check and package | Report directory | Package | `src/harness/reporting/` | Change scores or evidence |
| Publish | Package, publication target | Publication receipt | `src/harness/reporting/publish.py` | Rebuild the report |
| Export result | Scored results, receipt | Result submission | `src/harness/results/` | Require hand-entered measurements |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation · medium
Please state explicitly whether the publication receipt is optional for export. Figure 2 shows a direct scored-results-to-export path and a dashed receipt dependency, and the reproduction instructions make publication optional, but this table lists the receipt as an unconditional input. An implementation following the table could block export of unpublished evaluations. If unpublished export is supported, label the receipt optional here and define its absence; otherwise make the diagram and command requirements agree.

Comment thread docs/spec.md Outdated
Comment on lines +104 to +105
Scored results also carry the method identities, so the report stage needs the
run directory and nothing else. Review records and bound content are optional

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation · medium
Please define one consistent report-input contract. This paragraph says the run directory is sufficient, but “Report instances” requires a profile passed explicitly to every stage, and “Report templates” promises a build from scored results and a profile alone. The run-directory inventory does not include the profile, while dataset and evidence are needed for the promised pages. Specify whether the profile is embedded and hash-bound in the run directory or supplied separately, and clarify that scored results require their bound dataset and evidence. Otherwise track implementations can satisfy different parts of this standard with incompatible report interfaces.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · 152a3f1

No findings in this incremental review.

@lanyue-llk
lanyue-llk merged commit 43f1119 into main Nov 24, 2026
7 checks passed
@lanyue-llk
lanyue-llk deleted the docs/repository-spec branch November 24, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant