Skip to content

Commit bfab7ae

Browse files
norrietaylorclaude
andcommitted
docs: update all docs and slides for CI self-development loop (Phases 7-9)
- README.md: add self-development loop diagram and CI workflow table - CHANGELOG.md: add v0.2.0 section for Phases 7-9 - CLAUDE.md: add CI self-development loop section, update workflow library - BACKLOG.md: add Phases 7-9 completed section, mark issue tools done - workflows/README.md: add planning-pipeline, task-decompose, feature-implement - slides.html: update stats, add self-development loop slide - Add specs 07, 08, 09 (issue triage, CI loop, feature implementation) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 03e0f43 commit bfab7ae

23 files changed

Lines changed: 1200 additions & 39 deletions

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased] — v0.2.0
9+
10+
### Added
11+
12+
#### Phase 7 — Issue Triage Pipeline
13+
- `agentry-planning-pipeline.yml` CI workflow triggers on `issues: [opened, reopened]`
14+
- Runs full planning pipeline (triage, decompose, summarize) and posts results as issue comments
15+
- Applies severity and category labels (`severity:*`, `category:*`) to issues automatically
16+
- `agentry-issue-triage.yml` removed (superseded by planning-pipeline)
17+
18+
#### Phase 8 — Bug-Fix Automation
19+
- `agentry-bug-fix.yml` CI workflow triggers on `issues: [labeled]` when `category:bug` is applied
20+
- Bug-fix workflow updated with `agent:` block, `pr:create`, `issue:comment`, and source mapping
21+
- End-to-end: issue label → diagnose → open fix PR
22+
23+
#### Phase 9 — Feature Implementation
24+
- `workflows/feature-implement.yaml` workflow for feature implementation with scope assessment
25+
- `agentry-feature-implement.yml` CI workflow triggers on `issues: [labeled]` when `category:feature` is applied
26+
- Implements feature directly or creates sub-issues for large scope
27+
28+
#### Binder & Composition Enhancements (Phases 7-9)
29+
- `issue:comment`, `issue:label`, `issue:create` tool bindings added to GitHubActionsBinder
30+
- `StringInput` model extended with `source` and `fallback` fields
31+
- Composition engine resolves binder inputs, passes `output_schema`, calls `map_outputs` per node
32+
- Label extraction from both JSON and markdown prose output
33+
- Workflow YAML files updated with `agent:` blocks and source mapping (`triage`, `bug-fix`, `task-decompose`, `planning-pipeline`)
34+
835
## [v0.1.0] - 2026-03-21
936

1037
### Added

CLAUDE.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## What is Agentry
6+
7+
Agentry is a Python CLI tool for portable agentic workflow orchestration. It defines workflows in YAML, executes them in sandboxed environments (Docker or in-process), and integrates with CI platforms like GitHub Actions. Workflows compose Claude-powered agents with declarative safety constraints, tool manifests, and multi-agent DAG composition.
8+
9+
## Development Commands
10+
11+
```bash
12+
# Install dependencies (use uv, not pip)
13+
uv sync --all-extras
14+
15+
# Linting and formatting
16+
uv run ruff check src/agentry/
17+
uv run ruff format src/agentry/
18+
19+
# Type checking (strict mode enabled)
20+
uv run mypy src/agentry/ --ignore-missing-imports
21+
22+
# Run all tests
23+
uv run pytest tests/
24+
25+
# Run by marker
26+
uv run pytest tests/ -m unit
27+
uv run pytest tests/ -m integration
28+
uv run pytest tests/ -m docker
29+
uv run pytest tests/ -m e2e
30+
31+
# Run a single test file
32+
uv run pytest tests/unit/test_parser.py -v
33+
34+
# Run a single test
35+
uv run pytest tests/unit/test_parser.py::test_function_name -v
36+
```
37+
38+
## Architecture
39+
40+
The system follows a 5-layer pipeline:
41+
42+
1. **Definition** (`src/agentry/models/`) — Pydantic v2 models parse and validate workflow YAML. `WorkflowDefinition` is the top-level model.
43+
2. **Safety** (`src/agentry/security/`) — `SecurityEnvelope` enforces tool manifests, preflight checks, Ed25519 signing/verification, and audit diffing.
44+
3. **Resolution** (`src/agentry/binders/`) — `EnvironmentBinder` protocol resolves inputs from the execution environment (local CLI or GitHub Actions).
45+
4. **Execution** (`src/agentry/runners/`) — `RunnerProtocol` implementations run agents in Docker containers (sandboxed) or in-process (elevated trust).
46+
5. **Agent** (`src/agentry/agents/`) — `AgentProtocol` (PEP 544) abstracts agent runtimes. `ClaudeCodeAgent` is the primary implementation.
47+
48+
**Composition engine** (`src/agentry/composition/`) orchestrates multi-agent DAGs with async execution, failure policies (abort/skip/retry), and file-based data passing between nodes.
49+
50+
**CLI entry point** is `src/agentry/cli.py` using Click. The `agentry` command is registered via `pyproject.toml` entry points.
51+
52+
**Binders are pluggable** via the `agentry.binders` entry point group. The `github-actions` binder ships built-in.
53+
54+
## Key Design Patterns
55+
56+
- All protocols use PEP 544 structural typing (`Protocol` classes), not ABC inheritance
57+
- Pydantic v2 strict validation throughout the model layer
58+
- Runners auto-detected via `detector.py` based on environment and trust level
59+
- Network isolation uses a custom DNS proxy (`dns_proxy.py`) to enforce allowlists
60+
61+
## Code Quality
62+
63+
- **ruff**: line-length 100, target Python 3.10, rules: E/W/F/I/N/UP/B/C4/SIM (E501 ignored — formatter handles it)
64+
- **mypy**: strict mode. Tests are exempted from strict typing.
65+
- **pytest markers**: `unit`, `integration`, `docker`, `e2e` — always mark new tests appropriately
66+
67+
## Workflow Library
68+
69+
`workflows/` contains standard workflow YAML files (code-review, triage, bug-fix, task-decompose, feature-implement, planning-pipeline). These serve as both usable workflows and reference examples for the YAML schema.
70+
71+
## CI Self-Development Loop
72+
73+
Agentry develops itself via GitHub Actions workflows in `.github/workflows/`:
74+
75+
| CI Workflow | Trigger | Agentry Workflow |
76+
|-------------|---------|-----------------|
77+
| `agentry-planning-pipeline.yml` | `issues: [opened, reopened]` | `planning-pipeline.yaml` (triage → decompose → summarize) |
78+
| `agentry-bug-fix.yml` | `issues: [labeled]` (`category:bug`) | `bug-fix.yaml` |
79+
| `agentry-feature-implement.yml` | `issues: [labeled]` (`category:feature`) | `feature-implement.yaml` |
80+
| `agentry-code-review.yml` | `pull_request` | `code-review.yaml` |
81+
82+
The loop: issue filed → planning-pipeline applies labels → label triggers bug-fix or feature-implement → code-review reviews the resulting PR. The GitHubActionsBinder provides `issue:comment`, `issue:label`, `issue:create`, and `pr:create` tool bindings.

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,30 @@ agentry run workflows/triage.yaml \
3838

3939
Agentry resolves inputs (including git refs like `HEAD~1` for diff inputs), selects the appropriate runner, launches the agent runtime, enforces the tool manifest, and validates the output against the declared schema. Execution records are written to `.agentry/runs/` for auditability.
4040

41-
### Self-development
41+
### Self-development loop
4242

43-
Agentry reviews its own PRs. The `.github/workflows/agentry-code-review.yml` workflow runs `agentry run workflows/code-review.yaml` on every pull request, posting findings as PR comments. The bug-fix workflow can create branches and open PRs with proposed fixes — all requiring human review before merge.
43+
Agentry develops itself through a closed-loop CI pipeline:
44+
45+
```
46+
Issue filed
47+
→ planning-pipeline (triage → decompose → summarize)
48+
↓ applies severity/category labels
49+
category:bug → bug-fix workflow → diagnose + open fix PR
50+
category:feature → feature-implement workflow → implement PR or create sub-issues
51+
52+
code-review reviews all PRs
53+
```
54+
55+
CI workflows drive the loop:
56+
57+
| CI Workflow | Trigger | What It Does |
58+
|-------------|---------|--------------|
59+
| `agentry-planning-pipeline.yml` | `issues: [opened, reopened]` | Runs triage → decompose → summarize, posts results as issue comments, applies labels |
60+
| `agentry-bug-fix.yml` | `issues: [labeled]` (`category:bug`) | Diagnoses bug and opens a fix PR |
61+
| `agentry-feature-implement.yml` | `issues: [labeled]` (`category:feature`) | Implements feature or creates sub-issues |
62+
| `agentry-code-review.yml` | `pull_request` | Reviews every PR, posts findings as comments |
63+
64+
All agent-proposed PRs are labeled `agent-proposed` and require human review before merge.
4465

4566
### 3. Generate a GitHub Actions pipeline
4667

@@ -205,9 +226,10 @@ The generated YAML declares minimal token permissions derived from the workflow'
205226
| Workflow | Description |
206227
|----------|-------------|
207228
| `workflows/code-review.yaml` | PR diff review for security, performance, and style |
208-
| `workflows/triage.yaml` | Issue classification and routing |
209-
| `workflows/bug-fix.yaml` | Bug diagnosis and fix suggestion (creates PRs via `pr:create`) |
229+
| `workflows/triage.yaml` | Issue classification and routing (`issue:comment`, `issue:label`) |
230+
| `workflows/bug-fix.yaml` | Bug diagnosis and fix PR (`pr:create`, `issue:comment`) |
210231
| `workflows/task-decompose.yaml` | Issue decomposition into implementation tasks |
232+
| `workflows/feature-implement.yaml` | Feature implementation with scope assessment |
211233
| `workflows/planning-pipeline.yaml` | Composed pipeline: triage → decompose → summarize |
212234

213235
All workflows execute end-to-end via `agentry run`, producing structured JSON output. The `--input diff=HEAD~1` syntax automatically resolves git refs to diff content.

docs/BACKLOG.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@ Items are grouped by category. Each item notes its source and any recommended pr
55

66
---
77

8+
## Phases 7-9 Completed — CI Self-Development Loop
9+
10+
Phases 7-9 close the self-development loop. Issues filed against the repo are automatically triaged, decomposed, and routed to bug-fix or feature-implement workflows that open PRs.
11+
12+
- [x] **Planning pipeline CI**`agentry-planning-pipeline.yml` triggers on `issues: [opened, reopened]`, runs triage → decompose → summarize _(Phase 7)_
13+
- [x] **Issue comments and labels** — pipeline posts results as issue comments, applies `severity:*` and `category:*` labels _(Phase 7)_
14+
- [x] **`issue:comment`, `issue:label`, `issue:create` tool bindings** — added to GitHubActionsBinder _(Phase 7)_
15+
- [x] **Bug-fix CI**`agentry-bug-fix.yml` triggers on `category:bug` label, diagnoses and opens fix PR _(Phase 8)_
16+
- [x] **Feature-implement CI**`agentry-feature-implement.yml` triggers on `category:feature` label, implements or creates sub-issues _(Phase 9)_
17+
- [x] **`feature-implement.yaml` workflow** — new workflow with scope assessment _(Phase 9)_
18+
- [x] **`StringInput` source/fallback** — inputs can declare source mapping and fallback values _(Phases 7-9)_
19+
- [x] **Composition binder integration** — engine resolves binder inputs, passes output_schema, calls map_outputs per node _(Phases 7-9)_
20+
- [x] **Label extraction** — parses labels from both JSON and markdown prose output _(Phase 7)_
21+
- [x] **Deleted `agentry-issue-triage.yml`** — superseded by planning-pipeline _(Phase 7)_
22+
- [ ] **Scheduled pipeline runs** — backlog grooming via cron-triggered planning-pipeline _(deferred)_
23+
- [ ] **Auto-merge for small fixes** — agent PRs that pass CI and are under N lines _(deferred)_
24+
- [ ] **Token budget enforcement** — per-execution cost caps _(deferred)_
25+
- [ ] **Streaming agent output** — real-time output during execution _(deferred)_
26+
27+
_Source: Phase 7, 8, 9 specs_
28+
29+
---
30+
831
## Phase 6 Completed — Self-Development
932

1033
Phase 6 (Self-Development) is complete. Agentry can now execute its own workflows, review its own PRs in CI, resolve git-diff inputs, and propose fixes via agent-generated PRs.
@@ -14,7 +37,7 @@ Phase 6 (Self-Development) is complete. Agentry can now execute its own workflow
1437
- [x] **Git-diff input resolution**`--input diff=HEAD~1` auto-resolves git refs to diff content _(Phase 6, T02)_
1538
- [x] **Self-reviewing PRs in CI**`.github/workflows/agentry-code-review.yml` runs code-review on every PR _(Phase 6, T03)_
1639
- [x] **`pr:create` tool binding** — both LocalBinder (via `gh` CLI) and GitHubActionsBinder (via REST API) _(Phase 6, T04)_
17-
- [ ] **Issue-triggered triage** — run triage workflow on new GitHub issues _(Phase 6 Non-Goals)_
40+
- [x] **Issue-triggered triage** — run triage workflow on new GitHub issues _(completed in Phase 7 as planning-pipeline)_
1841
- [ ] **Scheduled pipeline runs** — backlog grooming via cron-triggered planning-pipeline _(Phase 6 Non-Goals)_
1942
- [ ] **Auto-merge for small fixes** — agent PRs that pass CI and are under N lines _(Phase 6 Non-Goals)_
2043
- [ ] **Token budget enforcement** — per-execution cost caps _(Phase 6 Non-Goals)_
@@ -57,7 +80,7 @@ Phase 4 (GitHub Actions binder & CI generation) is complete. These items were de
5780
- [ ] **Custom runner OS selection**`--runs-on` flag for `ci generate` _(Phase 4 Open Q)_
5881
- [ ] **GitHub App authentication** — support GitHub App installation tokens in addition to `GITHUB_TOKEN` _(Phase 4 Non-Goals)_
5982
- [ ] **Workflow dispatch inputs UI**`workflow_dispatch` trigger with custom input parameters in GitHub UI _(Phase 4 Non-Goals)_
60-
- [ ] **Issue-tracker tools**`issue:create`, `issue:comment`, `issue:label` tool bindings _(Phase 4 Non-Goals)_
83+
- [x] **Issue-tracker tools**`issue:create`, `issue:comment`, `issue:label` tool bindings _(Phase 4 Non-Goals, completed in Phases 7-9)_
6184
- [ ] **GitHub API rate limiting** — retry-with-backoff for 429 responses in binder API calls _(Phase 4 Open Q)_
6285
- [ ] **GitLab CI binder** — second `EnvironmentBinder` implementation _(PRD Decision Point)_
6386
- [ ] **Jenkins binder** — third `EnvironmentBinder` implementation _(PRD Decision Point)_
@@ -75,7 +98,7 @@ _Source: Phase 4 spec Non-Goals, Open Questions, PRD Section 4.2_
7598
- [x] **CI/CD config**`.github/workflows/ci.yml` for lint, type check, tests
7699
- [x] **Commit outstanding changes** — all committed and pushed
77100
- [x] **CONTRIBUTING.md** — code style (ruff/mypy), testing, commit conventions
78-
- [x] **CHANGELOG.md** — documents Phases 1-5 in v0.1.0
101+
- [x] **CHANGELOG.md** — documents Phases 1-5 in v0.1.0, Phases 7-9 in v0.2.0
79102

80103
_Source: repo readiness assessment_
81104

@@ -118,7 +141,7 @@ _Source: repo readiness assessment_
118141
## Tool Capabilities
119142

120143
- [x] **PR tools**`pr:comment`, `pr:review`, `pr:create` bound in both binders _(Phase 4, Phase 6)_
121-
- [ ] **Issue tools**`issue:create`, `issue:comment`, `issue:label` _(Phase 4 Non-Goals)_
144+
- [x] **Issue tools**`issue:create`, `issue:comment`, `issue:label` _(Phase 4 Non-Goals, completed in Phases 7-9)_
122145
- [ ] **File write tools**`file:write` beyond output directory _(Phase 1 Non-Goals)_
123146
- [ ] **Custom side-effect plugin interface** — domain-specific side effects beyond the fixed allowlist _(PRD Decision Point)_
124147

docs/demo/slides.html

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -509,15 +509,15 @@ <h2>What We've Built</h2>
509509
<div class="divider"></div>
510510
<div class="grid-3" style="margin-bottom:32px;">
511511
<div style="text-align:center">
512-
<div class="big-number">6</div>
512+
<div class="big-number">9</div>
513513
<div class="stat-label">Phases complete</div>
514514
</div>
515515
<div style="text-align:center">
516516
<div class="big-number">1580+</div>
517517
<div class="stat-label">Tests passing</div>
518518
</div>
519519
<div style="text-align:center">
520-
<div class="big-number">5</div>
520+
<div class="big-number">6</div>
521521
<div class="stat-label">Standard workflows</div>
522522
</div>
523523
</div>
@@ -528,7 +528,10 @@ <h2>What We've Built</h2>
528528
<span class="tag tag-done">DONE</span> <span class="white">Composition engine</span><br>
529529
<span class="tag tag-done">DONE</span> <span class="white">GitHub Actions binder &amp; CI gen</span><br>
530530
<span class="tag tag-done">DONE</span> <span class="white">Agent runtime abstraction</span><br>
531-
<span class="tag tag-done">DONE</span> <span class="white">Self-development &amp; dogfooding</span>
531+
<span class="tag tag-done">DONE</span> <span class="white">Self-development &amp; dogfooding</span><br>
532+
<span class="tag tag-done">DONE</span> <span class="white">Issue triage pipeline</span><br>
533+
<span class="tag tag-done">DONE</span> <span class="white">Bug-fix automation</span><br>
534+
<span class="tag tag-done">DONE</span> <span class="white">Feature implementation</span>
532535
</div>
533536
<div>
534537
<span class="tag tag-next">NEXT</span> <span class="white">Task board</span><br>
@@ -539,30 +542,35 @@ <h2>What We've Built</h2>
539542
</div>
540543
</div>
541544

542-
<!-- Slide 9: Self-Development — Live -->
545+
<!-- Slide 9: Self-Development Loop -->
543546
<div class="slide" id="s9">
544-
<h2>Self-Development <span class="accent">&mdash; Live</span></h2>
547+
<h2>Self-Development Loop <span class="accent">&mdash; Live</span></h2>
545548
<div class="divider"></div>
546-
<p style="font-size:1.6rem; color:var(--text); margin-bottom:24px;">Agentry develops itself. Not a vision &mdash; it's running now.</p>
549+
<p style="font-size:1.4rem; color:var(--text); margin-bottom:20px;">Agentry develops itself. Issues in &rarr; PRs out &mdash; fully automated, human-reviewed.</p>
550+
<div style="text-align:center; margin: 20px 0;">
551+
<span class="flow-item">Issue filed</span>
552+
<span class="flow-arrow">&rarr;</span>
553+
<span class="flow-item">Planning Pipeline</span>
554+
<span class="flow-arrow">&rarr;</span>
555+
<span class="flow-item">Labels applied</span>
556+
</div>
547557
<div class="grid-2" style="margin-top:16px;">
548-
<div>
549-
<h3>What's Working</h3>
550-
<ul>
551-
<li>Every PR auto-reviewed by <code>code-review.yaml</code></li>
552-
<li><code>bug-fix.yaml</code> creates branches &amp; opens PRs</li>
553-
<li><code>--input diff=HEAD~1</code> resolves git refs</li>
554-
<li><code>pr:create</code> in both local &amp; CI binders</li>
555-
<li>Agent PRs labeled <code class="accent">agent-proposed</code></li>
556-
</ul>
558+
<div class="card">
559+
<h3 style="color:var(--accent);">category:bug</h3>
560+
<p><code>bug-fix.yaml</code> diagnoses the issue, implements a fix on a new branch, and opens a PR.</p>
557561
</div>
558-
<div>
559-
<h3>One Phase Away</h3>
560-
<pre style="font-size:0.95rem;"><code>$ agentry run workflows/develop.yaml \
561-
--input spec=docs/specs/07-spec.md</code></pre>
562-
<p style="margin-top:16px;">Full lifecycle: research &rarr; spec &rarr; plan &rarr; dispatch &rarr; implement &rarr; validate</p>
563-
<p style="margin-top:8px;">Remaining: task board, human approval gates, dynamic composition</p>
562+
<div class="card">
563+
<h3 style="color:var(--blue);">category:feature</h3>
564+
<p><code>feature-implement.yaml</code> assesses scope, then implements directly or creates sub-issues.</p>
564565
</div>
565566
</div>
567+
<div style="text-align:center; margin-top:20px;">
568+
<span class="flow-item">All PRs</span>
569+
<span class="flow-arrow">&rarr;</span>
570+
<span class="flow-item">code-review.yaml</span>
571+
<span class="flow-arrow">&rarr;</span>
572+
<span class="flow-item">Human merge</span>
573+
</div>
566574
</div>
567575

568576
<!-- Slide 10: Extensibility -->
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Clarifying Questions — Round 1
2+
3+
## Q1: Workflow Scope
4+
**Which workflows should fire when an issue is opened?**
5+
**Triage only.** Start with triage workflow posting severity/category/routing as an issue comment. Extend to full pipeline later.
6+
7+
## Q2: Output Actions
8+
**Should Agentry post triage results back to the issue, and if so how?**
9+
**Comment + labels.** Post formatted comment AND apply GitHub labels (e.g., severity:high, category:bug).
10+
11+
## Q3: Input Model
12+
**Should this add a new input type or use existing source mapping?**
13+
**String + source mapping.** Use existing StringInput with dot-notation source (issue.body). Minimal code change, leverages what GitHubActionsBinder already supports.
14+
15+
## Q4: Trigger Events
16+
**Which issue events should trigger the workflow?**
17+
**opened only.** Run triage only when a new issue is created. Simplest, avoids re-triage noise.

0 commit comments

Comments
 (0)