[0.12] Define the .agents contract and kickstart crew

Open
#274 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start by locating the shared agent parsing library and the kickstart, API, MCP, scheduler, and UI entry points named in the issue. Read the existing agent configuration and dispatch tests before tracing how repository content becomes a database projection. Done means all listed consumers use one normalized hash and the acceptance tests cover validation, generation, conflicts, dispatch, and turn metadata.

Written by the indexing model from the issue text.

Description

priority:urgent type:feature

Goal

Make .agents/ the only source of agent configuration and teach kickstart to install the standard crew.

File format

Each agent is a Markdown file with frontmatter. The body is the prompt. The schema supports:

  • name and an optional description
  • engine, initially claude_code or codex
  • an explicit model
  • optional reasoning_effort
  • enabled
  • one or more manual, MCP, UI, GitHub, or schedule triggers

The schema must reject permissions, sandbox, tool allowlists, and related access controls. Facility has one access policy for every agent.

Unknown fields should fail with a message that includes the file and field. Invalid agents must not be partially registered or executed.

Kickstart output

Kickstart writes these files:

  • .agents/architect.md
  • .agents/builder.md
  • .agents/pr-reviewer.md
  • .agents/address-review.md
  • .agents/ci-doctor.md
  • .agents/security-audit.md

Every generated file contains an explicit engine and model. Kickstart lets the user review and change those values before it opens its setup pull request. Existing files are reported as conflicts and are never silently overwritten.

The old codex-architect and codex-builder names are not built-in variants. A repository can define them as ordinary files if it wants those names.

One code path

Put parsing, validation, normalization, and hashing in a shared library. Kickstart, API routes, MCP tools, the scheduler, and the UI must import it. A database projection may cache the commit and parsed result, but it cannot be edited as a second source of truth.

Each dispatched turn stores the agent name, source commit, manifest hash, engine, model, and engine options used for that turn.

Acceptance criteria

  • One shared parser handles every agent file and trigger type.
  • Engine and model are required; reasoning effort is the only initial execution option.
  • Permission, sandbox, and tool restriction fields are rejected.
  • Kickstart renders all six standard agents; a smoke test dispatches each file and the fake engine receives its distinct non-empty prompt and configured trigger payload.
  • Kickstart handles existing files without overwriting them.
  • A repository can add a custom seventh agent without server code changes.
  • Backend, MCP, scheduler, kickstart, and UI use the shared parser.
  • A database cache cannot override repository content.
  • A turn records the exact manifest revision and effective model.
  • Unit tests cover valid Claude and Codex files, each trigger type, unknown fields, malformed frontmatter, duplicate names, and conflicting paths.
  • Contract tests load the same commit through kickstart, API, MCP, scheduler, and UI and get the same normalized hash.

Contributor note

Keep the first schema small. Add a field only when one of the standard crew needs it.

Dominant language
TypeScript
Stars
71
Forks
64
Avg merge
15h 38m
Merged PRs (30d)
66

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from theam/facility

All issues in theam/facility

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.