# IETF Draft Team

Lean multi-agent workspace for taking existing `ietf-draft-analyzer` outputs through:

1. research
2. architecture
3. drafting
4. specialist reviews
5. review synthesis
6. revision loops

This project is optimized for Codex-style execution with low token usage:

- Stable role rules live in `AGENTS.md` files instead of being repeated in prompts.
- Each cycle stores short handoff artifacts with fixed filenames.
- Every role reads only the current cycle files plus the smallest relevant source set.
- Research starts from your existing analyzer outputs before proposing new investigation.

## Default source repo

This scaffold assumes your analysis data lives in:

`/home/c/projects/ietf-draft-analyzer`

See `references/analyzer-integration.md`.

## Structure

- `AGENTS.md`: common operating rules
- `researcher/AGENTS.md`: evidence and gap analysis role
- `architect/AGENTS.md`: spec alignment and design role
- `author/AGENTS.md`: draft writing role
- `security-reviewer/AGENTS.md`: security, privacy, trust, abuse review
- `software-reviewer/AGENTS.md`: implementability and operational review
- `architecture-reviewer/AGENTS.md`: coherence and scope review
- `ietf-senior-reviewer/AGENTS.md`: IETF-style and publishability review
- `review-lead/AGENTS.md`: synthesis and revision planning role
- `templates/`: handoff templates
- `cycles/`: one folder per draft effort
- `scripts/new-cycle.sh`: initialize a new cycle
- `scripts/run-cycle.sh`: prepare a versioned run and print the execution order
- `scripts/role-target.sh`: print the target file path for a specific role
- `scripts/update-status.sh`: generate a lightweight status dashboard for a cycle/version
- `Makefile`: thin wrappers around the helper scripts

## Basic use

Create a cycle:

```bash
./scripts/new-cycle.sh dynamic-trust
```

Prepare or inspect a cycle run:

```bash
./scripts/run-cycle.sh dynamic-trust 1
```

Get the output path for a role:

```bash
./scripts/role-target.sh dynamic-trust architect 1
```

Or use `make`:

```bash
make prepare SLUG=dynamic-trust VERSION=1
make targets SLUG=dynamic-trust ROLE=author VERSION=1
make status SLUG=dynamic-trust VERSION=1
```

Then work in order against `cycles/<slug>/`:

1. Fill `00-user-spec.md`
2. Run the researcher on that cycle
3. Run the architect on the same cycle
4. Run the author on the same cycle
5. Run the specialist reviewers on the same draft version
6. Run the review lead to produce `55-review-synthesis-vN.md` and `60-revision-plan-vN.md`
7. Iterate

The user remains the final approver before publication.

## Review board

Each draft version should usually get these focused review files:

- `50-reviews-vN/security.md`
- `50-reviews-vN/software.md`
- `50-reviews-vN/architecture.md`
- `50-reviews-vN/ietf-senior.md`

This is cheaper than one broad reviewer because each role reads the same compact inputs but only reasons about one concern area.
