you-agent-factory
AGENTS.md16 starsChanged 4 months agoMITView on GitHub
This repository is you-agent-factory: a Go, OpenAPI, and React system for scheduling and orchestrating many AI workers concurrently through the you CLI, backend runtime, and dashboard. The product model is a factory: users define work types, work states, workstations, workers, guards, resources, and orchestration policy. The runtime turns submitted work and worker output into ordered events, then derives live and historical world state from that event stream. - The backend core is an event-first factory runtime. Workers and agents do…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,266 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 38
Read these architecture notes when the work touches their area:
- Very specific: line 53
Start with docs/internal/standards/STANDARDS.md, then read the relevant standard before changing code:
- Very specific: line 66
Treat files under docs/internal/standards/ as normative for repository-wide engineering and writing policy.
- Distinctive: line 177
Do not hand-edit generated files:
- Very specific: line 182
Run make generate-api for the bundled OpenAPI and direct Go/dashboard clients.
- Very specific: line 190
Run make api-smoke for public REST contract changes when feasible.
- Very specific: line 196
Run make docs-reference-smoke after changing docs/reference/ or packaged docs behavior.
- Very specific: line 198
Run make readme-check after changing README structure or linked README assets.
- Distinctive: line 200
Keep root docs as routing/index material.
- Distinctive: line 221
When changing frontend behavior, run focused UI tests where possible and inspect the UI in a browser for layout-sensitive work.
- Distinctive: line 229
Prefer existing package boundaries and local helpers over new abstractions.
- Distinctive: line 230
Keep generated files in sync with their source contracts.
- Very specific: line 231
Keep public resource names aligned with docs/architecture/data-model.md.
- Distinctive: line 232
Keep CLI and API behavior equivalent when shared contracts say they are equivalent, especially invocation behavior.
- Very specific: line 234
Use rg/rg --files for code discovery.
- Distinctive: line 235
Add tests proportional to the risk and blast radius of the change.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repository Agent Instructions
This repository is you-agent-factory: a Go, OpenAPI, and React system for
scheduling and orchestrating many AI workers concurrently through the you CLI,
backend runtime, and dashboard.
The product model is a factory: users define work types, work states, workstations, workers, guards, resources, and orchestration policy. The runtime turns submitted work and worker output into ordered events, then derives live and historical world state from that event stream.
Current Architecture
- The backend core is an event-first factory runtime. Workers and agents do not mutate canonical state directly; they emit outputs that re-enter the runtime as events.
- Product behavior is split across Factory Definitions, Factory Runtime,
Factory Sessions, Recordings, Work, Workers, Providers, Models, Automations,
Chat Sessions, Events, Worker Sessions, Provider Sessions, Operator Settings,
Factory Visualization, and System Initialization services.
pkg/wirecomposes these services andpkg/initializerowns application lifecycle. - Public terminology is defined in
docs/architecture/data-model.md:Factory,Factory Session,Current Factory,Work,Work Request, andProvider Session. - The customer-facing model hides the internal Petri-net implementation. Internal packages can use tokens, places, transitions, markings, and guards; public docs and API surfaces should prefer customer-facing vocabulary.
- Factory events and projections are canonical for replay, dashboard state, session lifecycle, dispatch lifecycle, work payload lineage, and historical inspection.
- The frontend consumes generated OpenAPI types and event streams, derives client-side dashboard/editor projections, and sends user actions back through API requests. The backend remains authoritative for runtime state.
- OpenAPI is authored in component fragments under
api/components/and bundled intoapi/openapi.yaml; generated Go and TypeScript clients are derived from that contract.
Read these architecture notes when the work touches their area:
docs/architecture/architecture.mdfor backend loop, service/session boundaries, event stream, frontend composition, and graph-editor state flow.docs/architecture/structures.mdto understand the overall interaction of components within the system.docs/architecture/data-model.mdfor public resource vocabulary and the customer/internal data-model split.docs/architecture/packaged-structure.mdfor the current Go package families, service package convention, dependency direction, and composition boundaries.docs/architecture/service-ownership-rationale.mdfor why each committed service owns what it owns, the destination vocabulary, responsibility clusters, public-surface ownership, and owned roles.
Standards
Start with docs/internal/standards/STANDARDS.md, then read the relevant
standard before changing code:
docs/internal/standards/code/code-review-standards.mdfor reviews and PR quality gates.docs/internal/standards/code/general-backend-standards.mdfor Go backend, state management, architecture, linting, testing, CI, and complexity.docs/internal/standards/code/general-website-standards.mdfor React, accessibility, responsive design, styling, state, performance, and tests.factory/docs/standards/planning-standards.mdand the templates indexed fromfactory/docs/standards/README.mdfor PRDs, behavior lanes, acceptance criteria, implementation tasks, and validation loopbacks.
Treat files under docs/internal/standards/ as normative for repository-wide
engineering and writing policy. Treat files under factory/docs/standards/ as
normative for factory planning and delivery. Development notes and process maps
can provide examples and file inventories, but they do not override the
standards.
Repository Map
api/contains the authored OpenAPI entrypoint, component fragments, reusable parameters/responses/schemas, and generated bundled contract.cmd/contains Go command entrypoints and maintenance tools, including the mainyoubinary undercmd/factory/.docs/contains public docs, architecture notes, comparison docs, examples, and internal maintainer standards/process docs.docs/reference/is the canonical packagedyou docs <topic>markdown. Edit reference topics there, not in generated or embedded copies.examples/contains example factory directories.factory/contains this repository's checked-in factory scaffold and factory-local docs.packages/contains publishable API, model-provider, and packaged-factory sources and generated distribution artifacts. Authored packaged factories live underpackages/packaged-factories/factories/; generated package output lives underpackages/packaged-factories/generated/.pkg/has six approved top-level package families:initializer,platform,root,services,transports, andwire.pkg/root/exposes the caller-facingBuildProcessconstruction boundary.pkg/wire/owns the canonical application dependency graph, andpkg/initializer/activates and unwinds already-constructed lifecycle roles.pkg/transports/owns protocol composition for CLI, HTTP, MCP, ACP, generated transport contracts and clients, and representation mapping. Service-specific adapters may live under the owning service'stransports/directory.pkg/transports/acp/owns ACP protocol negotiation, envelopes, session transport, response bridging, and transport mapping. It consumes service contracts and does not own Factory state.pkg/transports/mapping/owns representation conversion at public boundaries; it translates protocol payloads into service contracts and does not own canonical policy or state.pkg/platform/owns policy-free cross-cutting implementations such as filesystem/replay storage, process and PTY execution, logging, metrics, clocks, and runtime-artifact support. Platform implementations do not choose Factory, Factory Session, Work, worker, provider, model, or scheduling policy.pkg/services/contains the product-domain service families. Service roots expose public contracts and operations; private implementation belongs under the owning service'sinternal/tree, focused construction providers underwire/, and service-owned protocol adapters undertransports/.pkg/services/factory_definitions/owns Factory definition loading, persistence, validation, compilation, authored layout, packaged distribution, catalog behavior, and invocation policy.pkg/services/factory_runtime/owns event-first Factory orchestration, scheduling, dispatch, runtime projections, JavaScript workflows, and checkpoint recovery. Implementation-specific runtime primitives remain behind this customer-facing Factory boundary.pkg/services/factory_sessions/owns live and durable Factory Session state, startup, lifecycle gateways, response streams, invocation, controls, and persisted execution behavior.pkg/services/recordings/owns the canonical Factory Event ledger, recording lifecycle, replay, artifacts, and read-model projections.pkg/services/work/owns Work and Work Request contracts, admission, content, materialization, staging, lineage, read behavior, and pure invocation return policy.pkg/services/workers/owns request-scoped worker and workstation execution, runner selection, prompt/output shaping, worktrees, mock-worker behavior, and worker capability policy. It consumes Providers and Models through their public contracts; provider inference/execution and hosted polling do not belong to Workers.pkg/services/providers/owns provider identity, catalog, configuration, lifecycle, provider protocol and selection, session identity, adapter choice, provider inference, provider execution policy, and one normalized execution attempt. Workers consumes Providers through its public contracts and retains only request-scoped scheduling and retry policy.pkg/services/models/owns the managed local-model catalog, assets, runtime readiness and lifecycle, host supervision, source resolution, cache, pull, and local inference support.pkg/services/automations/owns cron, filesystem watcher, script poller, hosted-source observation and polling, reconciliation, and invocation-schedule behavior. Hosted polling does not belong to Workers.pkg/services/provider_sessions/owns provider-session discovery and transcript/session inspection.pkg/services/chat_sessions/owns the customer conversation and control context used by ACP: selected targets, ordered turns, target episodes, attachments, and control intents. It sequences source-native observations onto the Chat Session's Events topic without owning Factory replay history.pkg/services/events/owns the process-local, in-memory session-scoped source-native stream: append/attachment, retained reads, cursors, subscriptions, retention gaps, and backpressure. It is not the canonical Factory Event ledger.pkg/services/worker_sessions/owns Worker Session identity, attempt supervision, lifecycle classification, dispatch association, and publication of source-native Worker observations to Events. It does not own Worker execution policy or Factory replay history.pkg/services/operator_settings/,pkg/services/factory_visualization/, andpkg/services/system_initialization/own settings resolution, runtime presentation/projection, and system bootstrap/rollback respectively.pkg/services/edges/aggregates the exact replaceable external-effect ports accepted byroot.BuildProcess; it is not a product service locator.pkg/services/factory_runtime/internal/orchestrators/petri/contains internal Petri-net primitives. External packages consume Factory Runtime root contracts instead.pkg/services/factory_runtime/internal/services/orchestration/javascript/contains JavaScript workflow runtime, preview, source lookup, storage, and validation implementations. Public orchestration contracts are exposed atpkg/services/factory_runtime.tests/contains broader functional, release, smoke, and integration tests.ui/contains the React dashboard, generated TypeScript OpenAPI types, feature modules, shared components, theme/styles, Storybook, and frontend tests.
API And Code Generation
- Author OpenAPI changes in
api/openapi-main.yamland component fragments underapi/components/. - Do not hand-edit generated files:
api/openapi.yamlpkg/transports/http/generated/server.gen.gopkg/transports/http/client/client.gen.goui/src/api/generated/openapi.ts
- Run
make generate-apifor the bundled OpenAPI and direct Go/dashboard clients. Usemake interfaces-allwhen a change also affects generated contract schemas or publishable UI package clients; the scopedinterfaces-goandinterfaces-uitargets are available when only one consumer family changed. - For API surface changes, update the matching
pkg/transports/httphandlers,pkg/transports/mappingmappers/normalizers, generated clients, UI API adapters, and contract tests as applicable. - Run
make api-smokefor public REST contract changes when feasible.
Documentation
- Public packaged CLI docs live in
docs/reference/and are embedded foryou docs <topic>. - Run
make docs-reference-smokeafter changingdocs/reference/or packaged docs behavior. - Run
make readme-checkafter changing README structure or linked README assets. - Keep root docs as routing/index material. Avoid duplicating long customer guides or feature inventories outside their canonical docs.
Verification
Choose the narrowest useful verification for the change, then broaden when the surface area is shared or public:
make testruns the short Go suite.make ui-testruns the frontend unit suite.make ui-lintruns frontend lint and UI boundary checks.make lintruns the repository lint suite.make verify-fastruns dashboard typecheck, short UI/unit tests, and short Go tests.make verify-prruns the broader PR verification tier.make build-allregenerates public interfaces and builds the publishable UI packages, dashboard, and Go CLI from canonical sources.make test-full,make test-functional,make test-ui-coverage, and specialty Make targets are available for higher-risk runtime, API, or UI changes.
When changing frontend behavior, run focused UI tests where possible and inspect the UI in a browser for layout-sensitive work. When changing event replay, factory sessions, dispatch lifecycle, or projections, add or update projection and replay tests near the affected package.
Working Rules
- Preserve user work in the tree. Do not revert unrelated changes.
- Prefer existing package boundaries and local helpers over new abstractions.
- Keep generated files in sync with their source contracts.
- Keep public resource names aligned with
docs/architecture/data-model.md. - Keep CLI and API behavior equivalent when shared contracts say they are equivalent, especially invocation behavior.
- Use
rg/rg --filesfor code discovery. - Add tests proportional to the risk and blast radius of the change.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

