RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/AGENTS.md/nexu-io/open-design

AGENTS.md

apps/daemon/src/critique/AGENTS.md
AGENTS.md

Quality

52/100

Scores the file, not the repository.

Length

735 words

5 headings · 0 code blocks

Repository

83k

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
nexu-io/open-design/apps/daemon/src/critique/AGENTS.mdRawGitHub
1# `apps/daemon/src/critique/` (Critique Theater, daemon side)
2 
3Module map agents enter when they need to change anything in the critique
4pipeline. The user-facing feature name is **Design Jury**; the directory
5keeps the **Critique Theater** internal name so the product label can move
6without churning code paths.
7 
8## Layout
9 
10| File | Responsibility |
11|---|---|
12| `config.ts` | `CritiqueConfig` defaults + `OD_CRITIQUE_*` env-var parsing. The single source of truth for thresholds, weights, max-rounds, timeouts. |
13| `orchestrator.ts` | The state machine. Spawns a CLI session, feeds the panelist prompts in order, awaits each round's SHIP / round_end, and decides whether to continue or terminate. |
14| `parser.ts` + `parsers/v1.ts` | Streaming parser that ingests the agent's stdout and yields `PanelEvent`s. Owns the `<CRITIQUE_RUN>`, `<PANELIST>`, `<SHIP>` envelope. |
15| `errors.ts` | Typed parser failures: `MalformedBlockError`, `OversizeBlockError`, `MissingArtifactError`. Each maps to a `DegradedReason` so the wire-level `critique.degraded` event carries the right tag. |
16| `persistence.ts` | SQLite writes for run rows and per-round summaries (`critique_runs`, `critique_rounds`). |
17| `artifact-writer.ts` | Disk persistence for the SHIP artifact body. Owns the byte-budget guard (`ArtifactTooLargeError`) and the `O_NOFOLLOW` path-traversal protections. |
18| `artifact-handler.ts` | HTTP read path: `GET /api/projects/:id/critique/:runId/artifact`. |
19| `interrupt-handler.ts` | Resolves the kill request from `POST /api/projects/:id/critique/:runId/interrupt`. |
20| `adapter-degraded.ts` | In-memory degraded-adapter registry with 24h TTL. The orchestrator + Settings UI consult `isDegraded(adapterId)` before routing a run to it. |
21| `conformance.ts` | Conformance harness entry point. The prerelease cycle calls `runAdapterConformance` per adapter × per brief template and tallies `shipped / degraded / failed`. |
22| `conformance-history.ts` | Reads and summarizes persisted conformance history used by rollout decisions. |
23| `ratchet.ts` + `rollout.ts` | Evaluate conformance evidence and resolve the current feature rollout tier. |
24| `run-registry.ts` | Project-keyed in-process run registry used by interrupt handling. |
25| `scoreboard.ts` | Aggregates per-adapter conformance outcomes for the status surfaces. |
26| `spawn-inputs.ts` | Builds the isolated prompt and filesystem inputs passed to critique subprocesses. |
27| `transcript.ts` | Persists and reads replayable critique event transcripts. |
28| `__fixtures__/v1/` | Canonical transcripts the parser tests + conformance harness consume (happy-3-rounds, malformed-unbalanced, missing-artifact, etc.). |
29| `__fixtures__/adapters/` | Synthetic adapter stubs that emit the v1 fixtures. The conformance harness wraps them in `AsyncIterable<string>` so the parser path is exercised end-to-end without a real model. |
30 
31## Invariants
32 
33- **Parser yields one `PanelEvent` at a time** via async generator. The
34 orchestrator drives the loop; nothing in this directory collects events
35 into an array eagerly.
36- **Terminal phases (`shipped`, `degraded`, `interrupted`, `failed`) are
37 emitted exactly once** per run. The reducer treats them as sticky;
38 duplicate ship events trip `duplicate_ship` in `parser_warning`.
39- **Artifact bytes never travel on the wire.** The SHIP event carries an
40 `artifactRef: { projectId, artifactId }` only; the byte body is written
41 by `artifact-writer.ts` and fetched via the HTTP route.
42- **Round bookkeeping is keyed by round number**, not by "always the
43 last." A stray late panelist event from round 1 must NOT corrupt
44 round 2's bucket. See `withRound` in the web reducer for the parallel.
45- **No `apps/daemon/src/agents/registry.ts`.** The plan refers to that
46 path historically; the actual adapter registry is `runtimes/registry.ts`
47 in this repo. Phase 10 routing extensions land here in
48 `adapter-degraded.ts` instead.
49- **Designer weight is frozen at 0.0 until v2 cast config lands.**
50 `config.ts` exposes the panel weights as `CritiqueConfig.weights`
51 but every production deployment uses the v1 distribution
52 (designer 0 / critic 0.4 / brand 0.2 / a11y 0.2 / copy 0.2). The
53 v2 work is cross-package: the daemon adds per-skill weight
54 overrides driven off `od.critique.cast` in `SKILL.md` frontmatter
55 (this directory) and the web Settings surface adds a per-project
56 weight editor (`apps/web/src/components/SettingsDialog.tsx`). Treat the v1
57 weights as a wire-shape invariant rather than a tuning knob;
58 changing them mid-v1 will break the `composite` numbers persisted
59 in `critique_runs`.
60 
61## When you change anything here
62 
631. The contracts in `packages/contracts/src/critique.ts` are the single
64 source of truth for `PanelEvent`, `DegradedReason`, `FailedCause`,
65 `ParserWarningKind`. Update them before changing this directory.
662. The parser is the natural place to enforce schema strictness; do not
67 loosen it under pressure. The web `sseToPanelEvent` already runs a
68 defence-in-depth variant validator.
693. Add a v1 fixture under `__fixtures__/v1/` for every new failure
70 shape, and a corresponding conformance test case.
714. Bump `CRITIQUE_PROTOCOL_VERSION` in the contracts when the wire
72 shape changes. Adapter conformance auto-marks `degraded` on
73 protocol-version mismatch, so this is load-bearing.
74 
75## Related
76 
77- Spec: `specs/current/critique-theater.md`
78- Plan: `specs/current/critique-theater-plan.md`
79- User docs: `docs/critique-theater.md`
80- Web counterpart: `apps/web/src/components/Theater/AGENTS.md`
81 

Sections

  • `apps/daemon/src/critique/` (Critique Theater, daemon side)
  • Layout
  • Invariants
  • When you change anything here
  • Related

What it covers

architecturetesting-strategymonorepo

Stack — with the evidence

typescript

(1.00)

node

(0.70)

react

(0.70)

nextjs

(0.70)

astro

(0.70)

express

(0.70)

tailwind

(0.70)

vitest

(0.70)

playwright

(0.70)

aws

(0.70)

desktop-app

(0.70)

javascript

(0.60)

monorepo

(0.60)

pnpm

(0.60)

kubernetes

(0.60)

github-actions

(0.60)

vercel

(0.60)

Format

AGENTS.md

A plain-markdown README for coding agents, deliberately unopinionated: no frontmatter, no globs, no vendor keys. That minimalism is why it became the one file a dozen different agents will read, and why it carries the least per-file targeting power of any format here.

What the corpus says about it

Repository

Owner
nexu-io
Language
—
License
—
Archived
no

All configs in this repo

Also in nexu-io/open-design

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
nexu-io/open-designplugins/AGENTS.md · 83kAGENTS.mdtypescriptnode+15stylearchsecuritydo-not68/1003 days ago
nexu-io/open-design.github/AGENTS.md · 83kAGENTS.mdtypescriptmonorepo+15stylearchgitapi+383/1003 days ago
nexu-io/open-designAGENTS.md · 83kAGENTS.mdtypescriptnode+15setupteststylearch+974/1003 days ago
nexu-io/open-designapps/AGENTS.md · 83kAGENTS.mdtypescriptplaywright+15testarchmonorepo90/1003 days ago
nexu-io/open-designapps/daemon/AGENTS.md · 83kAGENTS.mdtypescriptvitest+15teststylearchtesting-strategy+486/1003 days ago
nexu-io/open-designapps/landing-page/AGENTS.md · 83kAGENTS.mdtypescriptastro+16apideploymentmonorepo82/1003 days ago
nexu-io/open-designapps/packaged/AGENTS.md · 83kAGENTS.mdtypescriptvitest+15monorepodo-not54/1003 days ago
nexu-io/open-designapps/web/src/components/Theater/AGENTS.md · 83kAGENTS.mdtypescriptvitest+15testarchmonorepo72/1003 days ago
nexu-io/open-designdesign-systems/_schema/AGENTS.md · 83kAGENTS.mdtypescriptnode+15archtesting-strategyapi58/1003 days ago
nexu-io/open-designdesign-templates/AGENTS.md · 83kAGENTS.mdtypescriptnode+15apiui43/1003 days ago
nexu-io/open-designe2e/AGENTS.md · 83kAGENTS.mdtypescriptvitest+15teststylearchtesting-strategy+393/1003 days ago
nexu-io/open-designpackages/AGENTS.md · 83kAGENTS.mdtypescriptnode+15archdependenciesmonorepo86/1003 days ago
nexu-io/open-designskills/AGENTS.md · 83kAGENTS.mdtypescriptnode+15no sections39/1003 days ago
nexu-io/open-designtools/AGENTS.md · 83kAGENTS.mdtypescriptplaywright+15testing-strategy82/1003 days ago
nexu-io/open-designtools/pack/AGENTS.md · 83kAGENTS.mdtypescriptvitest+16styletesting-strategyperformancedeployment+185/1003 days ago
nexu-io/open-designtools/serve/AGENTS.md · 83kAGENTS.mdtypescriptvitest+15do-not32/1003 days ago
Diff against plugins/AGENTS.md Diff against .github/AGENTS.md Diff against AGENTS.md Diff against apps/AGENTS.md Diff against apps/daemon/AGENTS.md Diff against apps/landing-page/AGENTS.md Diff against apps/packaged/AGENTS.md Diff against apps/web/src/components/Theater/AGENTS.md Diff against design-systems/_schema/AGENTS.md Diff against design-templates/AGENTS.md Diff against e2e/AGENTS.md Diff against packages/AGENTS.md Diff against skills/AGENTS.md Diff against tools/AGENTS.md Diff against tools/pack/AGENTS.md Diff against tools/serve/AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
aaif-goose/gooseAGENTS.md · 52kAGENTS.mdrusttypescript+2setupbuildtestlint-format+6100/1003 days ago
TryGhost/Ghoste2e/AGENTS.md · 55kAGENTS.mdtypescriptjavascript+12setupteststylearch+2100/1003 days ago
duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70AGENTS.mdtypescriptjavascript+5buildteststylearch+3100/1003 days ago
n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16buildteststylearch+3100/1003 days ago
mui/material-uiAGENTS.md · 99kAGENTS.mdtypescriptjavascript+13setupbuildtestlint-format+9100/1003 days ago
SkeneTechnologies/skene-cookbookAGENTS.md · 51AGENTS.mdpythoneslint+4setupbuildtestlint-format+7100/1002 days ago
trick77/agents-md-syncAGENTS.md · 2AGENTS.mdtypescriptnode+4setupbuildteststyle+5100/1003 days ago
code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67kAGENTS.mdtypescriptbun+10setupbuildtestlint-format+6100/1002 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack