feat: add VCS workflows and cycle extension
This commit is contained in:
@@ -9,12 +9,13 @@
|
||||
|
||||
- **Codex** acts as the host planner, reviewer, and final acceptance authority
|
||||
- **Reasonix, Claude Code, or Agy** executes implementation and fixes in the same session
|
||||
- The workflow maintains atomic state, Git baseline gates, scope enforcement, and convergence limits
|
||||
- The workflow maintains atomic state, VCS baseline gates, scope enforcement, and convergence limits
|
||||
- Supports both **Git** and **SVN** working copies with strict validation
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Node.js >= 20
|
||||
- Git repository
|
||||
- Git repository or SVN working copy
|
||||
- At least one executor: [Reasonix](https://reasonix.ai), [Claude Code](https://claude.ai/code), or [Agy](https://agy.dev)
|
||||
|
||||
## Installation
|
||||
@@ -76,9 +77,13 @@ agent-workflow decide --run <run-id> --input decision.json
|
||||
Start a new workflow run. Requires a clean working tree.
|
||||
|
||||
```bash
|
||||
agent-workflow start --plan <plan.json|-> --executor <reasonix|claude|agy> [--max-cycles <n>]
|
||||
agent-workflow start --plan <plan.json|-> --executor <reasonix|claude|agy> [--vcs <git|svn>] [--max-cycles <n>]
|
||||
```
|
||||
|
||||
- `--vcs` - Explicitly specify VCS kind (`git` or `svn`). If omitted, auto-detects from the working directory.
|
||||
- Git and SVN working copies are automatically detected when `--vcs` is not provided.
|
||||
- SVN working copies must be in a clean, consistent state (no mixed revisions, switched paths, externals, or conflicts).
|
||||
|
||||
### `agent-workflow review`
|
||||
|
||||
Generate a Codex review bundle after executor completion. Checks HEAD stability and scope compliance.
|
||||
@@ -159,6 +164,16 @@ Terminate an active workflow.
|
||||
agent-workflow abort --run <run-id> --reason "requirements changed"
|
||||
```
|
||||
|
||||
### `agent-workflow extend`
|
||||
|
||||
Extend a `budget_exhausted` run with additional cycles. The run must have ended at `budget_exhausted` status with a valid session handle and a final `fix` decision.
|
||||
|
||||
```bash
|
||||
agent-workflow extend --run <run-id> --additional-cycles <n>
|
||||
```
|
||||
|
||||
This allows continuation of the same executor session after reaching the cycle limit, preserving all audit history and convergence checks.
|
||||
|
||||
## Configuration
|
||||
|
||||
Create `agent-workflow.json` in your repository root:
|
||||
@@ -167,6 +182,7 @@ Create `agent-workflow.json` in your repository root:
|
||||
{
|
||||
"version": "1",
|
||||
"defaultExecutor": "reasonix",
|
||||
"defaultVcs": "auto",
|
||||
"maxCycles": 5,
|
||||
"timeoutSeconds": 1800,
|
||||
"executors": {
|
||||
@@ -185,6 +201,8 @@ Create `agent-workflow.json` in your repository root:
|
||||
}
|
||||
```
|
||||
|
||||
- `defaultVcs` - Default VCS kind: `"auto"` (detect), `"git"`, or `"svn"`. Default is `"auto"`.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
- `AGENT_WORKFLOW_DIR` — Override state root (default: `~/.agent-workflow/workflows`)
|
||||
@@ -210,6 +228,20 @@ Any active state → completed | needs_human | blocked | budget_exhausted | abor
|
||||
|
||||
All file modifications must stay within the approved scope. Out-of-scope changes trigger `awaiting_scope_resolution`, where Codex inspects each violation and decides whether to remove it or escalate to `needs_human`.
|
||||
|
||||
## VCS Support
|
||||
|
||||
### Git
|
||||
Standard Git repositories are fully supported with baseline HEAD tracking and diff generation.
|
||||
|
||||
### SVN (Strict Mode)
|
||||
SVN working copies are supported with strict validation:
|
||||
- **Requires**: Single consistent revision (no mixed revisions)
|
||||
- **Rejects**: Switched paths, externals, conflicts, incomplete states, locked files
|
||||
- **Baseline**: Repository URL, UUID, and working revision
|
||||
- **Diff**: Tracks modifications, additions (including unversioned), deletions, and property changes
|
||||
- Use `svn update` to synchronize revisions before starting a workflow
|
||||
- The workflow never runs `svn commit`, `svn switch`, or `svn update`
|
||||
|
||||
## Convergence Limits
|
||||
|
||||
The workflow stops with `needs_human` when:
|
||||
|
||||
Reference in New Issue
Block a user