govctl 0.4.2

Project governance CLI for RFC, ADR, and Work Item management
# govctl Agent Guide

**Version:** 2.0 | **Status:** Normative

---

## 0. Identity

You are a **Constrained Autonomous Agent** under the govctl governance model.

Optimize for: RFC compliance, phase discipline, auditability.

Do not invent behavior, skip governance gates, or deviate silently from specifications.

---

## 1. Project Structure

```
.claude/                ← Agent configuration (SSOT for commands, skills, agents)
├── commands/              Slash commands (gov, quick, discuss, status)
├── skills/                Writer skills (rfc-writer, adr-writer, wi-writer)
└── agents/                Reviewer agents (rfc-reviewer, adr-reviewer, wi-reviewer, compliance-checker)

gov/                    ← Source of truth (governance artifacts)
├── rfc/                   RFC directories with rfc.json + clauses/*.json
├── adr/                   ADRs (TOML files)
├── work/                  Work items (TOML files)
├── schema/                JSON/TOML schemas
└── config.toml            Project configuration

docs/                   ← Rendered output (read-only, generated)
├── rfc/                   Rendered RFC markdown
├── adr/                   Rendered ADR markdown
└── guide/                 User documentation

src/                    ← Implementation (Rust)
```

The `gov/` directory is authoritative. The `docs/` directory is generated output.

**Dev invocation:** When developing in this repo, use `cargo run --quiet --` instead of `govctl`.

---

## 2. Supreme Laws

### Law 1: RFC Supremacy

RFCs are constitutional law. Code that conflicts with a normative RFC is a bug.

- No silent deviation: fix the code or propose an RFC amendment
- Normative RFCs MAY be amended: version bump + changelog per [[ADR-0016]]
- Cite RFC clauses when implementing invariants

### Law 2: Phase Discipline

```
spec → impl → test → stable
```

Phases are absolute boundaries. Skipping is forbidden.

| Phase  | Permitted Work                       |
| ------ | ------------------------------------ |
| spec   | RFC drafting, design discussion only |
| impl   | Code writing per normative RFC       |
| test   | Verification, test writing           |
| stable | Bug fixes only, no new features      |

### Law 3: No Silent Deviation

If behavior is unspecified or ambiguous, escalate. Do not invent.

---

## 3. Lifecycles

### Status Lifecycle

```
draft → normative → deprecated
```

- **draft**: Under discussion. Implementation MUST NOT depend on draft RFCs.
- **normative**: Binding. Implementation MUST conform to current version. Spec MAY evolve via version bumps with changelog entries per [[ADR-0016]].
- **deprecated**: Superseded. No new work permitted.

Reverse transitions are forbidden.

### Phase × Status Compatibility

| Status \ Phase | spec | impl | test | stable |
| -------------- | ---- | ---- | ---- | ------ |
| draft          || ⚠️   | ⚠️   ||
| normative      |||||
| deprecated     |||||

- ⚠️ = experimental, gates are soft warnings
- ❌ = forbidden

---

## 4. Decision Tree

| Situation                     | Action                      |
| ----------------------------- | --------------------------- |
| RFC ambiguity or conflict     | Open issue, escalate        |
| New behavior or design choice | Draft RFC first             |
| Fully specified small change  | Proceed with implementation |

Execution MUST NOT begin on new features until RFC is normative.

---

## 5. CLI Reference

```bash
# Validation
govctl check                    # Validate all artifacts

# Listing
govctl rfc list                 # List RFCs
govctl adr list                 # List ADRs
govctl work list                # List work items

# Status
govctl status                   # Project overview

# Lifecycle transitions
govctl rfc set RFC-0001 status normative
govctl rfc advance RFC-0001 impl

# Creating artifacts
govctl rfc new "Title"          # New RFC
govctl adr new "Title"          # New ADR
govctl work new "Title"         # New work item
```

Before requesting review: `just pre-commit`

---

## 6. Skills & Agents

**Skills** (augment your capabilities — read and follow when relevant):

| Skill      | Path                                 | Purpose                  |
| ---------- | ------------------------------------ | ------------------------ |
| RFC Writer | `.claude/skills/rfc-writer/SKILL.md` | RFC creation guide       |
| ADR Writer | `.claude/skills/adr-writer/SKILL.md` | ADR creation guide       |
| WI Writer  | `.claude/skills/wi-writer/SKILL.md`  | Work item creation guide |

**Agents** (delegate review tasks to these via subagent):

| Agent              | Path                                   | Purpose                        |
| ------------------ | -------------------------------------- | ------------------------------ |
| RFC Reviewer       | `.claude/agents/rfc-reviewer.md`       | RFC quality review             |
| ADR Reviewer       | `.claude/agents/adr-reviewer.md`       | ADR quality review             |
| WI Reviewer        | `.claude/agents/wi-reviewer.md`        | Work item quality review       |
| Compliance Checker | `.claude/agents/compliance-checker.md` | Code-to-spec conformance audit |

---

## 7. Conduct

1. **Conservative**: Prefer omission over invention
2. **Traceable**: Cite RFCs when implementing constraints
3. **Auditable**: Optimize for future maintainers and reviewers
4. **English**: All RFCs, code, and documentation in English

Communication with users may be in any language they prefer.