arreio 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +220 -0
- package/CHANGELOG.md +43 -0
- package/package.json +33 -10
package/ARCHITECTURE.md
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Architecture Documentation
|
|
2
|
+
|
|
3
|
+
A bird's-eye view of the Arreio system design, boundaries, and codebase layout.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. System Overview
|
|
8
|
+
|
|
9
|
+
- **Domain Problem**: AI-driven coding workflows are unpredictable and lack quality guardrails; Arreio transforms them into a deterministic, test-first software delivery pipeline.
|
|
10
|
+
- **Target Audience**: Developers and teams using agentic coding tools who want structured, reviewable, and repeatable development cycles.
|
|
11
|
+
- **Core Goal**: Provide an uncompromised, resilient harness for plan → work → review → learn execution.
|
|
12
|
+
|
|
13
|
+
## 2. Core Constraints (The "Don'ts")
|
|
14
|
+
|
|
15
|
+
- **No Ambiguous Plans**: Every plan must decompose into tasks with exactly one Acceptance Criterion each.
|
|
16
|
+
- **No Implementation Without Tests**: Tasks follow strict Red → Green → Refactor TDD discipline.
|
|
17
|
+
- **No Direct Cross-Skill Calls**: Skills are self-contained; orchestration happens through the agent harness, not skill-to-skill invocation.
|
|
18
|
+
- **No Undocumented Decisions**: Learnings, reviews, and plan deviations must be captured in persistent docs.
|
|
19
|
+
- **No Deep Inheritance in Skill Definitions**: Favor composition of micro-modules over monolithic skill files.
|
|
20
|
+
|
|
21
|
+
## 3. Technology Stack
|
|
22
|
+
|
|
23
|
+
| Layer | Technology | Primary Responsibility |
|
|
24
|
+
| :---------------- | :----------------- | :----------------------------------------------------------------- |
|
|
25
|
+
| **Orchestration** | Agent Harness (pi) | Skill invocation, context management, user interaction |
|
|
26
|
+
| **Skills** | Markdown + YAML | Self-describing workflow definitions and constraints |
|
|
27
|
+
| **Modules** | Markdown | Reusable phase implementations within each skill |
|
|
28
|
+
| **Storage** | Git (docs/) | Persistent, versioned artifacts (plans, tasks, learnings, reports) |
|
|
29
|
+
| **Templates** | Markdown | Reference artifacts for consistent output formatting |
|
|
30
|
+
|
|
31
|
+
## 4. Architectural Pattern & Data Flow
|
|
32
|
+
|
|
33
|
+
The system follows a **Pipeline Architecture**. Work flows unidirectionally through four core phases, each composed of deterministic micro-skills.
|
|
34
|
+
|
|
35
|
+
```mermaid
|
|
36
|
+
graph LR
|
|
37
|
+
A[User Input] --> B[Plan]
|
|
38
|
+
B --> C[Work]
|
|
39
|
+
C --> D["Work Review<br/>(Phase 4)"]
|
|
40
|
+
D -->|if regressions<br/>or scope-creep| E["for-review<br/>Status"]
|
|
41
|
+
E --> F[Standalone Review]
|
|
42
|
+
D -->|if clean| G["completed<br/>Status"]
|
|
43
|
+
F -->|approved| G
|
|
44
|
+
F -->|changes-requested| H["blocked<br/>Status"]
|
|
45
|
+
G --> I[Learn]
|
|
46
|
+
H --> I
|
|
47
|
+
I --> J[Archived Artifacts]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Key Sequence:**
|
|
51
|
+
|
|
52
|
+
1. User runs `/work <plan-id>` → executes tasks Red → Green → Refactor
|
|
53
|
+
2. Work Review Phase 4 gates output:
|
|
54
|
+
- Binary gate: if `regression-check: regressions-found` **OR** `scope-creep` findings exist → tasks enter `for-review` status
|
|
55
|
+
- Else → tasks move to `completed` status
|
|
56
|
+
3. If `for-review` tasks exist, user runs `/review <work-id>`:
|
|
57
|
+
- Standalone Review finds `status: for-review` tasks
|
|
58
|
+
- Runs comprehensive audit (quality/security/tests/docs/integration)
|
|
59
|
+
- Approval verdict updates task frontmatter:
|
|
60
|
+
- `approved` → `status: completed`
|
|
61
|
+
- `changes-requested` → `status: blocked` (with reason)
|
|
62
|
+
4. Learnings captured via `/learn` (orthogonal to approval gates; optional post-Review)
|
|
63
|
+
|
|
64
|
+
### Phase Pipelines
|
|
65
|
+
|
|
66
|
+
> **Artifact persistence:** intermediate phase artifacts (`.scope/`, `.research/`, `.design/`, `.triage/`, `.prepare/`, `.execute/`, `.analyze/`, `.capture/`, `.refine/`, `.index/`, `.maintain/`) are written only in `detailed` interaction mode. `smart`/`autopilot` pass them in context. Final deliverables (plans, tasks, Work/Review Reports, learn entries) are always written.
|
|
67
|
+
|
|
68
|
+
| Phase | Pipeline | Output Artifacts |
|
|
69
|
+
| --------------------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
70
|
+
| **Plan** | Scope → Research → Design → Generate → Tasks | `docs/plans/<plan-id>.md`, `docs/tasks/<plan-id>/` |
|
|
71
|
+
| **Work** | Triage → Prepare → Execute → Review (with for-review gate) | Updated task files, code changes; tasks in `completed`, `for-review`, `blocked`, or `skipped` status |
|
|
72
|
+
| **Standalone Review** | Scope → Prepare → Analyze → Report | `docs/review/.report/<review-id>.md`; task status updates (task-in-review input) |
|
|
73
|
+
| **Learn** | Capture → Refine → Index (+ Maintain on-demand)¹ | `docs/learn/<category>/<learning>.md` |
|
|
74
|
+
|
|
75
|
+
¹ **Learn phases:** Capture → Refine → Index for normal authoring. Maintain (Phase 4) runs on-demand for dedup, refresh, prune, and legacy migration.
|
|
76
|
+
|
|
77
|
+
## 5. Codebase Map
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
├── skills/ # Core skill definitions
|
|
81
|
+
│ ├── arreio-init/ # Project initialization skill
|
|
82
|
+
│ │ ├── SKILL.md # Skill contract and workflow
|
|
83
|
+
│ │ └── references/ # Templates (architecture, indexes)
|
|
84
|
+
│ ├── plan/ # Plan orchestration skill
|
|
85
|
+
│ │ ├── SKILL.md
|
|
86
|
+
│ │ ├── modules/ # Phase modules (scope, research, design, generate, tasks)
|
|
87
|
+
│ │ └── references/ # Templates and artifacts
|
|
88
|
+
│ ├── work/ # Work execution skill
|
|
89
|
+
│ │ ├── SKILL.md
|
|
90
|
+
│ │ ├── modules/ # Phase modules (triage, prepare, execute, review)
|
|
91
|
+
│ │ └── references/
|
|
92
|
+
│ ├── review/ # Code review skill
|
|
93
|
+
│ │ ├── SKILL.md
|
|
94
|
+
│ │ ├── modules/
|
|
95
|
+
│ │ └── references/
|
|
96
|
+
│ └── learn/ # Learning extraction skill
|
|
97
|
+
│ ├── SKILL.md
|
|
98
|
+
│ ├── modules/
|
|
99
|
+
│ └── references/
|
|
100
|
+
├── docs/ # Persistent artifact storage
|
|
101
|
+
│ ├── plans/ # Plan artifacts
|
|
102
|
+
│ │ └── index.md # Registry of all plans
|
|
103
|
+
│ ├── tasks/ # Task artifacts (per-plan subdirectories)
|
|
104
|
+
│ ├── learn/ # Extracted learnings
|
|
105
|
+
│ │ └── index.md # Central knowledge base
|
|
106
|
+
│ ├── review/ # Review reports and phase artifacts
|
|
107
|
+
│ └── archives/ # Historical artifacts
|
|
108
|
+
├── ARCHITECTURE.md # System design and architecture documentation
|
|
109
|
+
└── README.md # Project overview
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Entry Points
|
|
113
|
+
|
|
114
|
+
- **Initialization**: `/arreio-init` — Bootstraps folder structure and indexes for a new project.
|
|
115
|
+
- **Planning**: `/plan <task description>` — Runs the full planning pipeline.
|
|
116
|
+
- **Execution**: `/work <plan-id>` — Executes task list for a plan.
|
|
117
|
+
- **Review**: `/review <input>` — Analyzes code changes.
|
|
118
|
+
- **Learning**: `/learn <input>` — Extracts and catalogs patterns.
|
|
119
|
+
- **Session End**: `/end-session` — Preserves context with a documented commit.
|
|
120
|
+
|
|
121
|
+
## 6. Component Design Philosophy
|
|
122
|
+
|
|
123
|
+
- **Thin Orchestrators**: Skill files (`SKILL.md`) define contracts and pipelines; they delegate all work to discrete modules.
|
|
124
|
+
- **Deterministic Phases**: Each module in a pipeline has a single, well-defined input/output contract with no fallback paths.
|
|
125
|
+
- **Self-Describing Artifacts**: Every generated document (plan, task, report, learning) carries front-matter metadata for discoverability.
|
|
126
|
+
- **Immutable References**: Templates and reference artifacts are versioned and never mutated in-place; downstream skills copy and fill them.
|
|
127
|
+
|
|
128
|
+
## 7. Operational Guidelines & Verification
|
|
129
|
+
|
|
130
|
+
- **Skill Validation**: Before modifying any `SKILL.md`, confirm its downstream modules and references still align with the contract.
|
|
131
|
+
- **Artifact Consistency**: All docs under `docs/` must use the metadata schema defined in `references/` templates.
|
|
132
|
+
- **Git Hygiene**: Run `/end-session` before closing a session to ensure state, decisions, and next steps are committed.
|
|
133
|
+
- **Agent Attribution**: Every session-end commit carries an `[AGENT: ...]` trailer on its last line — a project-wide commit standard. The trailer names the agent that made the session's file changes (verified against the session's change history; fallback: the current agent). Session-end artifacts under `docs/plans/.end-session/` record the same attribution for traceability.
|
|
134
|
+
- **Index Maintenance**: After creating any plan, task, or learning, update the corresponding `index.md` so the knowledge graph remains traversable.
|
|
135
|
+
|
|
136
|
+
## 8. Design Decisions — Work Review & Standalone Review Integration (2026-08-12)
|
|
137
|
+
|
|
138
|
+
### Problem
|
|
139
|
+
|
|
140
|
+
Work executes tasks Red → Green → Refactor, then updates task status to `completed`. Standalone Review audits arbitrary code changes with a comprehensive quality/security/tests/docs/integration rubric. These are complementary but were architecturally adjacent (potential for duplication of scope-creep logic, inconsistent findings).
|
|
141
|
+
|
|
142
|
+
### Solution: Sequential Approval Gates via `for-review` Status
|
|
143
|
+
|
|
144
|
+
**Goals:**
|
|
145
|
+
|
|
146
|
+
1. Eliminate redundancy: Work Review is a lightweight pre-check; Standalone Review is the definitive approval gate
|
|
147
|
+
2. Make approval explicit: tasks cannot move to `completed` until Standalone Review approves
|
|
148
|
+
3. Decouple learnings from approval: the Learn skill is the single authoritative source for durable knowledge capture (orthogonal to approval gates)
|
|
149
|
+
|
|
150
|
+
**Implementation:**
|
|
151
|
+
|
|
152
|
+
1. **Work Review Phase 4** (lightweight pre-check):
|
|
153
|
+
- Simplify, consolidate, run regression check (binary: any failure = gate blocks), detect scope-creep (any finding = gate blocks)
|
|
154
|
+
- If `regression-check: regressions-found` **OR** `scope-creep` findings exist → tasks enter `status: for-review` (not `completed`)
|
|
155
|
+
- Else → tasks move to `status: completed`
|
|
156
|
+
- Surface learnings-to-capture for later `/learn` invocation (orthogonal to approval)
|
|
157
|
+
|
|
158
|
+
2. **Standalone Review** (definitive audit):
|
|
159
|
+
- New input shape: **task-in-review** — accepts `/review <work-id>`, discovers `status: for-review` tasks
|
|
160
|
+
- Runs full 4-phase audit (Scope → Prepare → Analyze → Report)
|
|
161
|
+
- Report phase (new behavior): updates task file frontmatter based on approval verdict:
|
|
162
|
+
- If `approved` → `status: completed`
|
|
163
|
+
- If `changes-requested` → `status: blocked` (with reason)
|
|
164
|
+
- Idempotent on `report-id`
|
|
165
|
+
|
|
166
|
+
3. **Learn Skill** (durable knowledge):
|
|
167
|
+
- Receives learnings-to-capture from Work Report's Phase 5
|
|
168
|
+
- User runs `/learn <work-id>` (or `/learn <candidate-ref>`) to persist learnings
|
|
169
|
+
- Learn writes to `docs/learn/` (single source of truth for durable knowledge)
|
|
170
|
+
- Orthogonal to approval gates — can run before/after Review
|
|
171
|
+
|
|
172
|
+
**Workflow:**
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
User runs /work <plan-id>
|
|
176
|
+
↓
|
|
177
|
+
Execute tasks (Red → Green → Refactor)
|
|
178
|
+
↓
|
|
179
|
+
Work Review Phase 4:
|
|
180
|
+
- Simplify & consolidate
|
|
181
|
+
- Regression check (any failure = gate)
|
|
182
|
+
- Scope-creep detection (any finding = gate)
|
|
183
|
+
- Learnings summary (for later /learn)
|
|
184
|
+
↓
|
|
185
|
+
If regression/scope-creep:
|
|
186
|
+
- Tasks → status: for-review
|
|
187
|
+
↓
|
|
188
|
+
User runs /review <work-id> (if for-review tasks exist)
|
|
189
|
+
↓
|
|
190
|
+
Standalone Review (full audit):
|
|
191
|
+
- Scope → Prepare → Analyze → Report
|
|
192
|
+
- Report updates task status:
|
|
193
|
+
- approved → status: completed
|
|
194
|
+
- changes-requested → status: blocked
|
|
195
|
+
↓
|
|
196
|
+
User runs /learn <work-id> (optional; orthogonal to approval)
|
|
197
|
+
↓
|
|
198
|
+
Learn persists learnings to docs/learn/
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Rationale:**
|
|
202
|
+
|
|
203
|
+
- **Sequential, not parallel**: Decouples execution quality (Work Review) from approval authority (Standalone Review). No ambiguity about which skill approves.
|
|
204
|
+
- **Binary gates**: Work Review's gate is simple and fast (helps catch regressions early). Detailed severity assignment is Standalone Review's job.
|
|
205
|
+
- **Learnings orthogonal to approval**: Separates knowledge capture from gating, avoiding coupling. Learn skill remains the single source of truth.
|
|
206
|
+
- **Task status as API**: Task frontmatter `status:` field becomes the shared contract between Work and Review — no folder moves needed, paths stay stable.
|
|
207
|
+
|
|
208
|
+
**Trade-offs:**
|
|
209
|
+
|
|
210
|
+
- **User must run two skills**: `/work` then `/review` (if regressions/scope-creep detected). Adds a step. Mitigated by clear workflow documentation and optional automation via agent harness.
|
|
211
|
+
- **Two approval concepts**: Work's gate (regression/scope-creep) + Review's approval status (approved/changes-requested/rejected) could be confusing. Mitigated by renaming Work's gate outcome to avoid collision (using `task-status-target` internally; user sees `for-review` status).
|
|
212
|
+
|
|
213
|
+
### Status
|
|
214
|
+
|
|
215
|
+
- ✅ Phase 1 (define `for-review` status): Done (design)
|
|
216
|
+
- ✅ Phase 2 (update Work Review module): Done
|
|
217
|
+
- ✅ Phase 3 (update Review SKILL + task-in-review input): Done
|
|
218
|
+
- ✅ Phase 4 (update task index model, artifacts): In progress (work-report schema updated)
|
|
219
|
+
- ⏳ Phase 5 (error handling + quality gates): Pending implementation
|
|
220
|
+
- ⏳ Phase 6 (documentation + swimlane diagram): In progress
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Arreio are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
> Versions prior to 1.0.5 predate this changelog. See `git log` for historical commits.
|
|
9
|
+
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
## [1.2.1] - 2026-10-09
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **npm discoverability.** Rewrote the package description, expanded keywords (agent skills, Claude Code, Codex, Copilot, Cursor, TDD, slash commands, etc.), made `author` an object with a profile URL, and now publish `CHANGELOG.md` and `ARCHITECTURE.md`.
|
|
17
|
+
|
|
18
|
+
## [1.2.0] - 2026-10-01
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- **`/plan --deep` flag.** Forces the Deep plan tier in any interaction mode (including Autopilot), skipping the tier question. `tier_recommended` still records the algorithm's result so the override is auditable. The Design phase also produces ≥ 2 alternatives and rollout/integration drafts when the flag is set.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- **Work/Review/Learn reliability pass.** Each skill gets an "Execution Rules" block (ordered steps, no invented values, compute-don't-copy, one question at a time, phase-transition announcements, write rules). Work's execution-mode selection now states first-match-wins evaluation, treats `serial` as a fallback only, and builds its Detailed-mode question (with an `Auto` option) from computed values. `--deep` stays Plan-only: the other skills have no plan tier.
|
|
27
|
+
- **Plan tier no longer collapses to Standard.** The tier prompt hardcoded "Auto … (result: Standard)" and its example contradicted the algorithm (HIGH complexity → Deep). The prompt is now built from computed values, `Auto` resolves to `tier_recommended`, and Design computes `tier_recommended` with the same `recommend_tier(complexity, risk_level)` function Generate re-checks.
|
|
28
|
+
- **Complexity scoring consistency.** Risk now maps to a fixed score (LOW 0, MEDIUM 1, HIGH 2, CRITICAL 3); the missing-risk default is MEDIUM = 1 (was documented as 2); each dimension requires cited evidence.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- **`docs/` is no longer tracked in this repository.** It is generated by the skills at runtime and is now in `.gitignore`.
|
|
33
|
+
- **Intermediate phase artifacts are now written only in `detailed` mode.** In `smart` and `autopilot` mode, the plan, work, review, and learn pipelines pass phase artifacts in context instead of writing hidden files (`.scope/`, `.research/`, `.design/`, `.triage/`, `.prepare/`, `.execute/`, `.analyze/`, `.capture/`, `.refine/`, `.index/`, `.maintain/`). Final deliverables (plans, tasks, Work Reports, Review Reports, learn entries) are still always written. `arreio-init` no longer pre-creates the intermediate directories.
|
|
34
|
+
|
|
35
|
+
## [1.0.5] - 2026-09-02
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- **Postinstall script targeted wrong directory.** When Arreio was installed as a dependency, the `postinstall` script used `process.cwd()`, which inside `node_modules/arreio/` points to the package directory itself — not the consuming project. Skills were being copied to `node_modules/arreio/.agents/skills/` instead of `<project>/.agents/skills/`. Switched the destination base to `process.env.INIT_CWD || process.cwd()`, which npm sets to the original invocation directory during lifecycle scripts.
|
|
40
|
+
|
|
41
|
+
### Documentation
|
|
42
|
+
|
|
43
|
+
- **README: clarified npm 10+ install-script behavior.** Replaced the misleading "informational advisory" note with actionable guidance. npm 10+ blocks lifecycle scripts by default; users must run `npm install-scripts approve arreio` to run the postinstall, or invoke `/arreio-init` in their AI coding agent to install skills manually.
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arreio",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"description": "Agent skills for AI coding agents (Claude Code, Codex, Copilot, Cursor): a guardrailed Plan → Work → Review → Learn workflow with /plan, /work, /review and /learn slash commands for predictable, test-first software delivery.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"author":
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Wicttor",
|
|
8
|
+
"url": "https://github.com/wicttor"
|
|
9
|
+
},
|
|
7
10
|
"repository": {
|
|
8
11
|
"type": "git",
|
|
9
12
|
"url": "https://github.com/wicttor/arreio.git"
|
|
@@ -14,21 +17,41 @@
|
|
|
14
17
|
"homepage": "https://github.com/wicttor/arreio#readme",
|
|
15
18
|
"keywords": [
|
|
16
19
|
"arreio",
|
|
20
|
+
"agent-skills",
|
|
21
|
+
"ai-agents",
|
|
22
|
+
"ai-coding",
|
|
23
|
+
"ai-coding-agent",
|
|
24
|
+
"ai-assisted-development",
|
|
17
25
|
"agentic-workflows",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
26
|
+
"agentic-coding",
|
|
27
|
+
"claude-code",
|
|
28
|
+
"claude",
|
|
29
|
+
"codex",
|
|
30
|
+
"github-copilot",
|
|
31
|
+
"cursor",
|
|
32
|
+
"copilot",
|
|
33
|
+
"llm",
|
|
34
|
+
"skills",
|
|
35
|
+
"slash-commands",
|
|
36
|
+
"prompt-engineering",
|
|
20
37
|
"plan-work-review-learn",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
38
|
+
"guardrails",
|
|
39
|
+
"tdd",
|
|
40
|
+
"test-driven-development",
|
|
23
41
|
"code-review",
|
|
24
|
-
"
|
|
25
|
-
"workflow
|
|
42
|
+
"task-planning",
|
|
43
|
+
"developer-workflow",
|
|
44
|
+
"workflow-orchestration",
|
|
45
|
+
"software-delivery",
|
|
46
|
+
"project-documentation"
|
|
26
47
|
],
|
|
27
48
|
"main": "README.md",
|
|
28
49
|
"files": [
|
|
29
50
|
"skills/",
|
|
30
51
|
"scripts/",
|
|
31
|
-
"README.md"
|
|
52
|
+
"README.md",
|
|
53
|
+
"CHANGELOG.md",
|
|
54
|
+
"ARCHITECTURE.md"
|
|
32
55
|
],
|
|
33
56
|
"scripts": {
|
|
34
57
|
"postinstall": "node scripts/postinstall.js"
|