Repository navigation
Conversation
Add apps/AGENTS.md with its CLAUDE.md symlink: the task studio:* entry points, the generated files, the BFF and SDK boundaries, and how a UI PR captures its screenshots. Add path-scoped rules for the BFF and contracts, the web app, and the Studio tests, and point to apps/AGENTS.md from the root AGENTS.md. Refs #1775 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2 tasks done
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
peppescg
marked this pull request as draft
October 14, 2026 15:42
2 tasks done
This branch has not been deployed
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.
Summary
This PR adds the agent contract for the Studio workspace (
apps/): a leanapps/AGENTS.mdwith itsCLAUDE.mdsymlink, one pointer from the rootAGENTS.md, and three path-scoped rules under.claude/rules/. It changesdocumentation only; no code under
apps/changes. It is the first of two PRs for#1775. The skills follow in a separate PR.
What's in it
apps/AGENTS.md,apps/CLAUDE.md(symlink)task studio:*entry points and their traps:task testandtask lintskip Studio, the approval journey and the integration suite needbin/mecated, and how to run one Playwright journey. The generated files (contracts/openapi.json,contracts/src/generated/,web/src/routeTree.gen.ts) and how each is regenerated. The boundaries: the BFF owns the data the UI shows, the prototype'sstack/08-toolingbranch owns the look (#2210), the BFF uses the checked-out SDK by package name only, andMECATL_*describes the target whileSTUDIO_*configures Studio. Links to the rules. The screenshots a UI PR carries, and how to capture them with the offline Playwright fixtures (fixed clock, SSE handlers, and the output directory Playwright empties on each run)..claude/rules/studio-bff.mdapps/server/**andapps/contracts/**. The Hono route, Zod schema, and problem-details shape, route tests withcreateApp()andcsrfHeaders(), and the BFF security invariants..claude/rules/studio-web.mdapps/web/src/**. TanStack file-route naming, feature folders, data through the generated client, the shadcn/ui primitives (#2201), the 500px breakpoint with its guard test, and the 760px chat-list pivot. Touch-target size is left to #2271..claude/rules/studio-tests.mdapps/web/e2e/**, andapps/server/test/**. The no-isolation Vitest rules that Biome enforces, theofflineBffPlaywright fixture, the daemon-backed suites, and pinning tests in their own commit first.AGENTS.mdapps/AGENTS.md, in the same sentence as theengine/,internal/, andwebsite/pointers.Every command, path, and invariant was checked against the Taskfiles, the
package.jsonscripts, the CIstudiojob, and the code it describes. Where thelist in #1775 differs from the code, the contract follows the code:
@stacklok-oss/mecatl-sdkonly, neversdk/typescript". Since feat: add execution templates with platform-managed identity #2219, the BFF builds the checked-outsdk/typescriptthrough a frozen
file:dependency and imports it by package name only(
apps/README.md,docs/architecture/api-surface.md,apps/server/src/sdk-source.test.ts). The contract states that rule.memoryimports from
settings, andchatfromshortcuts), so the web rule says wherecode lives and leaves the boundary decision to Studio app structure: layout decision and the mechanical move #1777.
fetch. "Nofetchoutsidelib/api-client" is written as what the codedoes: data requests go through the generated client, configured once in
lib/api-client.ts. No lint rule enforces it.prototype (Studio: touch target size of compact controls (44px rule vs prototype density) #2271, linked from the web rule) and the Button API (Studio: use shadcn/ui primitives like the prototype and SEP (no custom components) #2201).
Decisions taken
apps/AGENTS.mdfor now, with aCLAUDE.mdsymlink beside it, as atthe root and in
engine/. A separateapps/web/AGENTS.mdis revisited afterthe structure work in Studio app structure: layout decision and the mechanical move #1777.
.claude/rules/hold the conventions thatapply to specific paths, with the same front matter and
paths:scoping astest-isolation.mdandwire-api-compatibility.md.apps/AGENTS.mdstays alean correction file that links to them.
What's left
.claude/skills/(add a Studio surface and touch Studioconfiguration) come in a later PR. Studio agent contract: apps/AGENTS.md, skills, and web/server rules #1775 names
to-acceptance-plan,plan-orchestrate, andtest-writeras the bar; chore: delete ADRs, acceptance plans, and process scaffolding #2105 removed those skills, sothat PR takes its bar from the current set.
file set from the contract alone) is recorded once the skills exist.
Screenshots
No UI change: documentation only.
Verification
task docspasses. matlatl reports 189 documents, 1828 references, 0 brokenlinks, 0 broken anchors, 0 orphans, and 0 unreachable. The instruction-file
check passes: each rule is at most 25 lines,
apps/AGENTS.mdis under 200 lineswith its
CLAUDE.mdsymlink, and everytaskname it mentions exists.task generatepasses with no changes. Studio agent contract: apps/AGENTS.md, skills, and web/server rules #1775 mentionstask generateforllms.txt, but the repository no longer commits anllms.txt; the site build'splugin produces one from
user-docs/, which this PR doesn't touch.corrections are in the commit.
pnpm run generateandtsr generatereproduce the committed files with no diff.
pnpm run test:browser --list <SPEC> --project=<NAME>selects one journey,while with
--Playwright ignores the arguments and selects all 148 tests. Afull journey run without
bin/mecatedpassed 114 tests and could not run theapproval journey.
Part of #1775
Part of #1774
🤖 Generated with Claude Code