arreio 1.1.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.
Files changed (47) hide show
  1. package/ARCHITECTURE.md +220 -0
  2. package/CHANGELOG.md +43 -0
  3. package/README.md +55 -2
  4. package/package.json +33 -10
  5. package/skills/arreio-init/SKILL.md +19 -24
  6. package/skills/learn/SKILL.md +20 -6
  7. package/skills/learn/modules/capture.md +3 -3
  8. package/skills/learn/modules/index.md +2 -2
  9. package/skills/learn/modules/maintain.md +2 -2
  10. package/skills/learn/modules/refine.md +2 -2
  11. package/skills/learn/references/id-generation.md +3 -1
  12. package/skills/learn/references/interaction-mode-propagation.md +21 -1
  13. package/skills/learn/references/templates/artifacts/captured-entry.md +1 -1
  14. package/skills/learn/references/templates/artifacts/index-update.md +1 -1
  15. package/skills/learn/references/templates/artifacts/maintain-log.md +1 -1
  16. package/skills/learn/references/templates/artifacts/refined-entry.md +1 -1
  17. package/skills/plan/SKILL.md +29 -4
  18. package/skills/plan/modules/design.md +9 -5
  19. package/skills/plan/modules/generate.md +9 -9
  20. package/skills/plan/modules/research.md +2 -2
  21. package/skills/plan/modules/scope.md +2 -2
  22. package/skills/plan/references/design-complexity-assessment.md +16 -7
  23. package/skills/plan/references/error-handling.md +1 -0
  24. package/skills/plan/references/id-generation.md +3 -1
  25. package/skills/plan/references/interaction-mode-propagation.md +25 -1
  26. package/skills/plan/references/plan-tier-selection.md +95 -48
  27. package/skills/plan/references/templates/artifacts/design.md +1 -1
  28. package/skills/plan/references/templates/artifacts/scoped-context.md +1 -1
  29. package/skills/review/SKILL.md +19 -4
  30. package/skills/review/modules/analyze.md +2 -2
  31. package/skills/review/modules/prepare.md +2 -2
  32. package/skills/review/modules/scope.md +3 -3
  33. package/skills/review/references/id-generation.md +3 -1
  34. package/skills/review/references/interaction-mode-propagation.md +21 -1
  35. package/skills/review/references/templates/artifacts/findings.md +1 -1
  36. package/skills/review/references/templates/artifacts/review-kit.md +1 -1
  37. package/skills/review/references/templates/artifacts/review-scope.md +1 -1
  38. package/skills/work/SKILL.md +19 -4
  39. package/skills/work/modules/execute.md +2 -2
  40. package/skills/work/modules/prepare.md +3 -3
  41. package/skills/work/modules/triage.md +2 -2
  42. package/skills/work/references/execution-mode-selection.md +21 -2
  43. package/skills/work/references/id-generation.md +3 -1
  44. package/skills/work/references/interaction-mode-propagation.md +21 -1
  45. package/skills/work/references/templates/artifacts/execution-log.md +1 -1
  46. package/skills/work/references/templates/artifacts/execution-plan.md +1 -1
  47. package/skills/work/references/templates/artifacts/work-manifest.md +1 -1
@@ -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/README.md CHANGED
@@ -34,13 +34,25 @@ Run this command in your AI coding agent to:
34
34
  2. Create the project structure (`docs/plans/`, `docs/learn/`, etc.)
35
35
  3. Set up architectural documentation and index files
36
36
 
37
- This makes all five core skills available in your AI development environment:
37
+ This makes all six skills available in your AI development environment:
38
38
 
39
39
  - **arreio-init** - Initialize projects to follow the Arreio workflow
40
40
  - **plan** - Structure and decompose work into executable tasks
41
41
  - **work** - Execute tasks with guardrailed implementation
42
42
  - **review** - Conduct comprehensive code reviews
43
43
  - **learn** - Capture and refine knowledge from completed work
44
+ - **end-session** - Commit the session with a traceable session artifact
45
+
46
+ ## Quick Start
47
+
48
+ ```text
49
+ /plan [--deep] Add Redis-backed session storage # produce a plan (+ optional task files)
50
+ /work <plan-id> # execute the plan's tasks, test-first
51
+ /review <work-id | git range | description> # review the changes, get a verdict
52
+ /learn <candidate-ref | decision "text"> # keep what the team learned
53
+ ```
54
+
55
+ Each skill is invoked by prompt (`/plan`, `/work`, `/review`, `/learn`) and first asks you to choose an interaction mode.
44
56
 
45
57
  ## Skill Based Workflow
46
58
 
@@ -48,8 +60,22 @@ This makes all five core skills available in your AI development environment:
48
60
 
49
61
  Use /arreio-init to initialize a new project, to enable the project to follow the four phases of the Arreio workflows.
50
62
 
63
+ ### Interaction Modes
64
+
65
+ Every pipeline asks for an interaction mode before it starts:
66
+
67
+ | Mode | Behavior |
68
+ | ------------- | -------------------------------------------------------------------------------- |
69
+ | **Detailed** | Confirm at each phase transition; inspect every artifact. Maximum control. |
70
+ | **Smart** | Phases run automatically; pause only on risky, destructive, or ambiguous events. |
71
+ | **Autopilot** | Phases run automatically; only the final outcome is reported. |
72
+
73
+ Intermediate phase artifacts (scope, research, triage, analyze, etc.) are written to hidden folders **only in Detailed mode**; in Smart/Autopilot they are passed in context. Final deliverables (plans, tasks, reports, learn entries) are always written.
74
+
51
75
  ### Plan
52
76
 
77
+ Invoke with `/plan [--deep] <task description>`.
78
+
53
79
  | Phase | Module Name | Purpose |
54
80
  | ----- | ------------ | ----------------------------------------- |
55
81
  | 1 | **scope** | Gather context, validate domain |
@@ -58,8 +84,16 @@ Use /arreio-init to initialize a new project, to enable the project to follow th
58
84
  | 4 | **generate** | Select tier, render plan, save to docs |
59
85
  | 5 | **tasks** | Slice plan into executable tasks |
60
86
 
87
+ **Plan tiers.** The Generate phase right-sizes the plan: **Fast** (trivial/low complexity), **Standard** (medium), or **Deep** (high/very high complexity, with alternatives and rollout notes). The tier comes from a complexity score (five dimensions, 0–15) combined with the detected risk level; high risk raises the minimum tier. Choosing `Auto` uses the computed recommendation, which is recorded as `tier_recommended`.
88
+
89
+ **`--deep`.** Put `--deep` at the start or end of the input to force a Deep plan in any interaction mode (including Autopilot), without the tier question. The algorithm's own recommendation is still recorded in `tier_recommended`, so the override is auditable.
90
+
91
+ Plan outputs: `docs/plans/YYYY-MM-DD-NNN-<name>.md` (indexed in `docs/plans/index.md`) and, optionally, one task file per acceptance criterion in `docs/tasks/<plan-id>/`.
92
+
61
93
  ### Work
62
94
 
95
+ Invoke with `/work <plan-id>`, `/work <task file or task-id>`, or `/work <task description>` (ad-hoc). Work runs on its own `work/<short-description>` git branch, executes each task Red → Green → Refactor, and chooses an **execution mode** (inline, serial, or parallel waves) from task priority, risk, and dependencies; HIGH-risk tasks always run inline.
96
+
63
97
  | Phase | Module Name | Purpose |
64
98
  | ----- | ----------- | ----------------------------------------- |
65
99
  | 1 | **triage** | Classify input and extract context |
@@ -69,12 +103,14 @@ Use /arreio-init to initialize a new project, to enable the project to follow th
69
103
 
70
104
  ### Review
71
105
 
106
+ Invoke with `/review <git range | HEAD | branch | paths>`, `/review <work-id>`, or `/review <target description>`. Findings are graded `blocker` / `major` / `minor` / `nit` across quality, security, tests, documentation, integration, and scope creep, and the approval status (`approved` / `changes-requested` / `rejected`) is derived from the findings. Review is local and read-only: reports are written to `docs/review/`, never posted to GitHub.
107
+
72
108
  | Phase | Module Name | Purpose |
73
109
  | ----- | ----------- | -------------------------------- |
74
110
  | 1 | **scope** | Classify input and scope review |
75
111
  | 2 | **prepare** | Set up review environment |
76
112
  | 3 | **analyze** | Execute code review, find issues |
77
- | 4 | **report** | Report verdict |
113
+ | 4 | **report** | Derive approval, write report |
78
114
 
79
115
  ### Learn
80
116
 
@@ -85,6 +121,23 @@ Use /arreio-init to initialize a new project, to enable the project to follow th
85
121
  | 3 | **index** | Catalog and index the entry |
86
122
  | 4 | **maintain** | Dedup, refresh, and prune entries |
87
123
 
124
+ Invoke with `/learn <decision|pattern|gotcha|workflow> <text>`, `/learn <candidate-ref>` (a Work or Review `learnings-to-capture` item), or `/learn maintain`. Entries live in `docs/learn/<type>/`, are indexed in `docs/learn/index.md`, and are searched by Plan, Work, and Review.
125
+
126
+ ### Project Structure
127
+
128
+ After `/arreio-init`, generated artifacts live under `docs/`:
129
+
130
+ ```text
131
+ docs/
132
+ plans/ final plans + index.md (hidden .scope/.research/.design/ in Detailed mode)
133
+ tasks/ <plan-id>/ task files + index.md
134
+ learn/ decision/ pattern/ gotcha/ workflow/ + index.md
135
+ review/ index.md + .report/ (other hidden phase folders in Detailed mode)
136
+ archives/
137
+ ```
138
+
139
+ Whether to commit `docs/` is your choice; this repository ignores it.
140
+
88
141
  ### Supporting Skills
89
142
 
90
143
  We have designed a set of supporting skills to help you to manage your repository and work.
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "arreio",
3
- "version": "1.1.0",
4
- "description": "Arreio transforms agentic coding workflows into a predictable, safe, and high-quality software delivery pipeline. Master the four core phases—Plan, Work, Review, Learn—to orchestrate a highly reliable development cycle.",
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": "Wicttor",
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
- "ai-driven-development",
19
- "software-delivery",
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
- "guardrailed-execution",
22
- "quality-assurance",
38
+ "guardrails",
39
+ "tdd",
40
+ "test-driven-development",
23
41
  "code-review",
24
- "documentation",
25
- "workflow-orchestration"
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"
@@ -92,7 +92,7 @@ Creates the organizational spine for Arreio artifacts:
92
92
 
93
93
  **Action:** If `docs/learn/index.md` doesn't exist, create it using the [Learn Index Template](references/learn-index-template.md).
94
94
 
95
- ### Step 7: Create Plan Skill Hidden Artifact Directories
95
+ ### Step 7: Plan Skill Hidden Artifact Directories (not created at init)
96
96
 
97
97
  **Folders:**
98
98
 
@@ -100,11 +100,11 @@ Creates the organizational spine for Arreio artifacts:
100
100
  - `docs/plans/.research/` — Stores Research phase artifacts
101
101
  - `docs/plans/.design/` — Stores Design phase artifacts
102
102
 
103
- **Rationale:** The `plan/SKILL.md` orchestrator saves intermediate phase artifacts in these hidden directories to preserve the planning trail and enable recovery/resumption.
103
+ **Rationale:** The `plan/SKILL.md` orchestrator writes intermediate phase artifacts to these hidden directories **only when the user picks `detailed` interaction mode**. In `smart`/`autopilot` they are passed in context.
104
104
 
105
- **Action:** Create all three directories if they don't exist.
105
+ **Action:** Do **not** create them. The plan skill creates them lazily on first `detailed` run.
106
106
 
107
- ### Step 8: Create Work Skill Hidden Artifact Directories
107
+ ### Step 8: Work Skill Artifact Directories
108
108
 
109
109
  **Folders:**
110
110
 
@@ -113,11 +113,11 @@ Creates the organizational spine for Arreio artifacts:
113
113
  - `docs/plans/.work/.execute/` — Stores Execute phase artifacts
114
114
  - `docs/plans/.work/.review/` — Stores Review phase artifacts
115
115
 
116
- **Rationale:** The `work/SKILL.md` orchestrator saves phase artifacts here during task execution to track work progress and decisions.
116
+ **Rationale:** `.triage/`, `.prepare/`, `.execute/` hold intermediate artifacts written **only in `detailed` mode**. `.review/` holds the Work Report, which is always written (read by `/review` and `/learn`).
117
117
 
118
- **Action:** Create all four directories if they don't exist.
118
+ **Action:** Create only `docs/plans/.work/.review/`. The work skill creates the other three lazily on first `detailed` run.
119
119
 
120
- ### Step 9: Create Review Skill Hidden Artifact Directories and Registry
120
+ ### Step 9: Review Skill Artifact Directories and Registry
121
121
 
122
122
  **Folders:**
123
123
 
@@ -130,9 +130,9 @@ Creates the organizational spine for Arreio artifacts:
130
130
 
131
131
  - `docs/review/index.md` — Central registry of all review reports
132
132
 
133
- **Rationale:** The `review/SKILL.md` orchestrator saves phase artifacts in these hidden directories and maintains a central index of all review reports.
133
+ **Rationale:** `.scope/`, `.prepare/`, `.analyze/` hold intermediate artifacts written **only in `detailed` mode**. `.report/` holds the Review Report (always written). The orchestrator also maintains a central index of all review reports.
134
134
 
135
- **Action:** Create all four directories if they don't exist. If `docs/review/index.md` doesn't exist, create it with a header:
135
+ **Action:** Create only `docs/review/.report/`; the review skill creates the other three lazily on first `detailed` run. If `docs/review/index.md` doesn't exist, create it with a header:
136
136
 
137
137
  ```markdown
138
138
  ---
@@ -153,7 +153,7 @@ This is the index of all review reports for the project. Reports are organized b
153
153
  _No review reports yet._
154
154
  ```
155
155
 
156
- ### Step 10: Create Learn Skill Hidden Artifact Directories
156
+ ### Step 10: Learn Skill Hidden Artifact Directories (not created at init)
157
157
 
158
158
  **Folders:**
159
159
 
@@ -162,9 +162,9 @@ _No review reports yet._
162
162
  - `docs/learn/.index/` — Stores Index phase artifacts
163
163
  - `docs/learn/.maintain/` — Stores Maintain phase artifacts
164
164
 
165
- **Rationale:** The `learn/SKILL.md` orchestrator saves phase artifacts in these hidden directories to preserve the knowledge entry authoring trail.
165
+ **Rationale:** The `learn/SKILL.md` orchestrator writes phase artifacts here **only in `detailed` mode**. Durable entries and the index are always written elsewhere.
166
166
 
167
- **Action:** Create all four directories if they don't exist.
167
+ **Action:** Do **not** create them. The learn skill creates them lazily on first `detailed` run.
168
168
 
169
169
  ### Step 11: Create End-Session Skill Hidden Artifact Directory
170
170
 
@@ -205,15 +205,10 @@ After initialization, verify:
205
205
  - ✓ Root-level index files exist:
206
206
  - `docs/plans/index.md` (registry of all plans)
207
207
  - `docs/learn/index.md` (central knowledge base)
208
- - ✓ Plan skill hidden artifact directories exist:
209
- - `docs/plans/.scope/`, `docs/plans/.research/`, `docs/plans/.design/`
210
- - ✓ Work skill hidden artifact directories exist:
211
- - `docs/plans/.work/.triage/`, `docs/plans/.work/.prepare/`, `docs/plans/.work/.execute/`, `docs/plans/.work/.review/`
212
- - ✓ Review skill hidden artifact directories exist:
213
- - `docs/review/.scope/`, `docs/review/.prepare/`, `docs/review/.analyze/`, `docs/review/.report/`
208
+ - ✓ Always-written report directories exist:
209
+ - `docs/plans/.work/.review/` (Work Reports), `docs/review/.report/` (Review Reports)
214
210
  - `docs/review/index.md` (review reports registry)
215
- - ✓ Learn skill hidden artifact directories exist:
216
- - `docs/learn/.capture/`, `docs/learn/.refine/`, `docs/learn/.index/`, `docs/learn/.maintain/`
211
+ - ✓ Intermediate phase-artifact directories (`.scope/`, `.research/`, `.design/`, `.triage/`, `.prepare/`, `.execute/`, `.analyze/`, `.capture/`, `.refine/`, `.index/`, `.maintain/`) are **not** created — skills create them lazily, only in `detailed` interaction mode
217
212
  - ✓ End-session skill hidden artifact directory exists:
218
213
  - `docs/plans/.end-session/`
219
214
  - ✓ Learn category folders exist:
@@ -225,10 +220,10 @@ After initialization, verify:
225
220
 
226
221
  Downstream skills (plan, learn, work, review) automatically create missing folders and indexes if arreio-init wasn't explicitly run:
227
222
 
228
- - **plan** skill creates missing `docs/plans/` core folders, and allocates `docs/plans/.scope/`, `.research/`, `.design/` directories on first use.
229
- - **work** skill creates missing `docs/plans/.work/` directories (`.triage/`, `.prepare/`, `.execute/`, `.review/`) on first execution.
230
- - **review** skill creates missing `docs/review/` directories and `index.md` registry on first review.
231
- - **learn** skill creates missing phase-artifact directories under `docs/learn/` and the `docs/learn/` category folders on first learning capture.
223
+ - **plan** skill creates missing `docs/plans/` core folders; creates `docs/plans/.scope/`, `.research/`, `.design/` only in `detailed` mode.
224
+ - **work** skill creates `docs/plans/.work/.review/` on first execution; creates `.triage/`, `.prepare/`, `.execute/` only in `detailed` mode.
225
+ - **review** skill creates `docs/review/.report/` and the `index.md` registry on first review; creates `.scope/`, `.prepare/`, `.analyze/` only in `detailed` mode.
226
+ - **learn** skill creates the `docs/learn/` category folders on first learning capture; creates `.capture/`, `.refine/`, `.index/`, `.maintain/` only in `detailed` mode.
232
227
  - **end-session** skill creates missing `docs/plans/.end-session/` directory (and the `## Session Ends` section in `docs/plans/index.md`) on first session end.
233
228
 
234
229
  **However**, running `arreio-init` upfront provides several benefits:
@@ -38,6 +38,8 @@ Store in the context object:
38
38
  interactionMode: detailed | smart | autopilot
39
39
  ```
40
40
 
41
+ **Artifact persistence:** intermediate phase artifacts are written to disk **only in `detailed` mode**. In `smart`/`autopilot` they are passed between phases in context and never written (see `references/interaction-mode-propagation.md#artifact-persistence`). Final deliverables are always written.
42
+
41
43
  **Propagation:** `interactionMode` flows into the `capture`, `refine`, `index`, and `maintain` artifacts; each downstream phase reads it to adjust confirmation behaviour (detailed = pause every transition + before destructive writes; autopilot = run all; smart = pause only on duplicates, prunes, and migrations).
42
44
 
43
45
  ## Orchestration Implementation
@@ -60,7 +62,7 @@ Each phase runs sequentially: the orchestrator calls the phase module, receives
60
62
  Before starting the learn pipeline, the orchestrator verifies that required folders exist:
61
63
 
62
64
  - `docs/learn/` — must exist for writing entries and the index; the seed `docs/learn/index.md` must exist (empty `entries:` block is valid — the legacy migration populates 28 entries)
63
- - `docs/learn/.capture/`, `docs/learn/.refine/`, `docs/learn/.index/`, `docs/learn/.maintain/` — must exist for saving the phase artifacts
65
+ - `docs/learn/.capture/`, `docs/learn/.refine/`, `docs/learn/.index/`, `docs/learn/.maintain/` — **`detailed` mode only**, for saving the phase artifacts; do not create them in `smart`/`autopilot`
64
66
 
65
67
  **Self-Healing:** If any are missing, the orchestrator automatically creates them (`mkdir -p`), and seeds `docs/learn/index.md` from the [index-format.md](references/index-format.md) template. This allows the Learn skill to run even if `arreio-init` wasn't explicitly run.
66
68
 
@@ -70,10 +72,10 @@ For **explicit** input, verify `<type>` is one of the four; if not, ask to pick
70
72
 
71
73
  | Phase | Phase Module | Output Artifact | Saved to |
72
74
  | ----- | ------------------------------------ | ---------------------------------------------------------------------------- | -------------------------------------- |
73
- | 1 | [Capture](modules/capture.md) | [Captured entry](references/templates/artifacts/captured-entry.md) | `docs/learn/.capture/<id>.md` |
74
- | 2 | [Refine](modules/refine.md) | [Refined entry](references/templates/artifacts/refined-entry.md) | `docs/learn/.refine/<id>.md` |
75
- | 3 | [Index](modules/index.md) | [Index update](references/templates/artifacts/index-update.md) | `docs/learn/.index/<id>.md` |
76
- | 4 | [Maintain](modules/maintain.md) _(on demand)_ | [Maintain log](references/templates/artifacts/maintain-log.md) | `docs/learn/.maintain/<id>.md` |
75
+ | 1 | [Capture](modules/capture.md) | [Captured entry](references/templates/artifacts/captured-entry.md) | `docs/learn/.capture/<id>.md` _(detailed only)_ |
76
+ | 2 | [Refine](modules/refine.md) | [Refined entry](references/templates/artifacts/refined-entry.md) | `docs/learn/.refine/<id>.md` _(detailed only)_ |
77
+ | 3 | [Index](modules/index.md) | [Index update](references/templates/artifacts/index-update.md) | `docs/learn/.index/<id>.md` _(detailed only)_ |
78
+ | 4 | [Maintain](modules/maintain.md) _(on demand)_ | [Maintain log](references/templates/artifacts/maintain-log.md) | `docs/learn/.maintain/<id>.md` _(detailed only)_ |
77
79
 
78
80
  **Phase 4 is on-demand.** A normal `/learn <type> <text>` run executes Phases 1–3 and writes one entry; Maintain runs only via `/learn maintain`. The migration procedure (legacy → canonical) is a Maintain operation, run once.
79
81
 
@@ -104,7 +106,7 @@ The **Index phase** is the skill's only index writer for authored entries; the *
104
106
 
105
107
  - **Entry file:** Saved to `docs/learn/<type>/<slug>.md` with the [entry-schema.md](references/entry-schema.md) frontmatter (`type`, `domain`, `tags`, `applicability`, `summary`, plus `created_at`/`updated_at`, `source`, `confidence`, and `related`).
106
108
  - **Index:** `docs/learn/index.md` updated — a YAML `entries:` block (the `filename` / `domain` / `tags` / `applicability` / `summary` record per entry — the **read contract** that Plan/Work/Review's [learnings-gate-logic.md](../plan/references/learnings-gate-logic.md) parses) plus the human-readable By Category / By Domain tables.
107
- - **Maintain Log (if `/learn maintain`):** Saved to `docs/learn/.maintain/<maintain-id>.md`, recording the dedup/refresh/prune operations performed and any migration applied.
109
+ - **Maintain Log (if `/learn maintain`, `detailed` mode only):** Saved to `docs/learn/.maintain/<maintain-id>.md`, recording the dedup/refresh/prune operations performed and any migration applied.
108
110
  - **Not produced:** This skill produces **no session log, no event transcript, no "what we did."** Only durable entries and the index.
109
111
 
110
112
  ## References
@@ -135,6 +137,17 @@ Artifact templates live in [references/templates/artifacts/](references/template
135
137
 
136
138
  > The Learn skill **owns the write side** — the per-entry frontmatter schema ([entry-schema.md](references/entry-schema.md)) and the `docs/learn/index.md` format ([index-format.md](references/index-format.md)). The Plan skill **owns the read side** — the keyword/relevance search in [learnings-gate-logic.md](../plan/references/learnings-gate-logic.md), reused cross-skill by Work and Review. The two contracts share the **index-record shape** (`filename`, `domain`, `tags`, `applicability`, `summary` + the `applicability` enum). Learn **guarantees** its index satisfies that shape; it does **not** re-encode the search algorithm (honoring the secondary-spec-contradicts-authoritative-matrix gotcha — one algorithm lives in Plan's gate-logic, one schema lives here; see `docs/learn/gotcha/2026-08-07-secondary-spec-contradicts-authoritative-matrix.md` post-migration).
137
139
 
140
+ ## Execution Rules
141
+
142
+ Follow these literally; they exist to keep runs consistent across agents.
143
+
144
+ 1. **Run each module's steps in order**, starting with its Step 0 verification. Do not skip, merge, or reorder steps.
145
+ 2. **Never invent values.** If a required input is missing, apply the recovery in [error-handling.md](references/error-handling.md) or ask the user; do not fill it with a plausible guess.
146
+ 3. **Compute, don't copy.** Values defined by a rule (`slug`, `applicability` enum, duplicate/analog matches, prune candidates) must be derived with the canonical reference and the real entry — never copied from an example or guessed. Example values in references and templates are illustrations, never defaults.
147
+ 4. **One question at a time**, with 2–4 concrete options; build the question text from the current values.
148
+ 5. **Announce phase transitions in one line** (e.g., "Phase 2/3 Refine complete: <key result>") so the user can follow progress, even in Autopilot.
149
+ 6. **Honor write rules:** intermediate phase artifacts only in `detailed` mode; final deliverables always.
150
+
138
151
  ## Core Principles
139
152
 
140
153
  - **Source of Truth, Not Memory:** `docs/learn/` is the project's durable, authoritative knowledge base. Plan/Work/Review search it; this skill authors and maintains it. Not a session memory, not an event log.
@@ -143,6 +156,7 @@ Artifact templates live in [references/templates/artifacts/](references/template
143
156
  - **Idempotent Writes:** Authoring a known `slug` upserts the entry file and its index record — never duplicates. Maintain rebuilds the index from the file tree and is idempotent. Re-running a normal `/learn` over the same content merges, it does not pile up.
144
157
  - **Dedup Welcomed, Lineage Preserved:** Decisions don't duplicate, but analogs exist; dedup merges an analog into the canonical entry and records the merge (the path-convention-split entry is the model — a migrated entry carries both the old and new path knowledge, not just the new; see `docs/learn/gotcha/2026-08-07-path-convention-split-silently-noops.md` post-migration).
145
158
  - **Write Side / Read Side Split:** Learn owns the entry schema and the index format; Plan owns the search algorithm. Both agree on the index-record shape. Never re-encode the other side's logic inline.
159
+ - **Lean Persistence:** Phase artifacts hit disk only in `detailed` mode; `smart`/`autopilot` pass them in context to save tokens and time.
146
160
  - **Transparent Artifacts:** Each phase produces an explicit output artifact for the next phase.
147
161
  - **Behavior-Described, Tool-Agnostic:** Steps describe required capabilities ("write the entry file", "rebuild the index", "ask the user to confirm"), not specific tool names.
148
162
  - **Stay Portable:** Use repository-relative paths only — `docs/learn/<type>/<slug>.md`, never absolute.