arey-pi 0.1.0 → 0.3.0

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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Arey Pi
2
2
 
3
+ [![npm package](https://img.shields.io/npm/v/arey-pi.svg)](https://www.npmjs.com/package/arey-pi)
4
+
3
5
  Arey Pi is an opinionated Pi package for spec-centred, TDD-driven software delivery.
4
6
 
5
7
  It defines a way of working where canonical specs preserve intent,
@@ -23,10 +25,11 @@ Arey Pi is built around these guarantees:
23
25
  - behaviour is captured in canonical Gherkin specs;
24
26
  - database projects keep canonical DBML specs precisely synchronised;
25
27
  - TDD is mandatory for production behaviour changes;
26
- - tests must be meaningful, reviewed, and strengthened with coverage or mutation testing where risk warrants it;
28
+ - tests must be meaningful, reviewed, kept outside production source directories, and strengthened with coverage or mutation testing where risk warrants it;
27
29
  - architecture and code must meet a senior engineering quality bar;
28
30
  - significant technical decisions are captured in high-quality ADRs;
29
31
  - specs, tests, code, DBML, ADRs, glossary, and architecture docs stay synchronised;
32
+ - README files, docs, AGENTS.md, skills, prompts, rules, agents, commands, and tooling instructions are kept synchronised when affected;
30
33
  - quality tooling is part of Definition of Done, not optional polish;
31
34
  - work is incremental and uses Conventional Commits;
32
35
  - AI harness setup is treated as a first-class project rule.
@@ -35,9 +38,12 @@ Arey Pi is built around these guarantees:
35
38
 
36
39
  ```txt
37
40
  agents/ # Arey Pi subagent role definitions for pi-subagents
41
+ extensions/ # Directory-style Pi extension for doctor, bootstrap, and workflows
42
+ docs/ # Package documentation
38
43
  skills/ # On-demand Arey Pi workflows and instructions
39
44
  prompts/ # Reusable Pi prompt workflows
40
45
  rules/ # Arey Pi operating rules
46
+ templates/ # Bootstrap templates for AGENTS.md, specs, ADRs, DBML, glossary, and reports
41
47
  ```
42
48
 
43
49
  The rules are the policy layer.
@@ -71,8 +77,7 @@ TDD implementation,
71
77
  spec sync,
72
78
  and engineering review.
73
79
 
74
- Today, the package includes the agent definitions in `agents/`.
75
- A forthcoming extension/bootstrap flow will install those definitions into the project-local `pi-subagents` discovery path automatically.
80
+ The package includes an extension that can install those definitions into the project-local `pi-subagents` discovery path automatically.
76
81
 
77
82
  ## Installation
78
83
 
@@ -96,7 +101,7 @@ pi install npm:pi-subagents
96
101
 
97
102
  ## Usage today
98
103
 
99
- Audit a repository against Arey Pi readiness:
104
+ Audit a repository against Arey Pi readiness with the prompt workflow:
100
105
 
101
106
  ```txt
102
107
  /assess-project
@@ -108,28 +113,51 @@ Or load the readiness skill directly:
108
113
  /skill:project-readiness
109
114
  ```
110
115
 
116
+ Arey Pi also ships an extension with native workflow commands.
117
+
111
118
  When the Arey Pi agents are available to `pi-subagents`, the project evaluator runtime name is:
112
119
 
113
120
  ```txt
114
121
  arey-pi.project-evaluator
115
122
  ```
116
123
 
117
- ## Intended professional workflow
124
+ ## Extension-backed workflow
118
125
 
119
- Arey Pi is moving towards a polished extension-backed workflow:
126
+ Arey Pi includes a polished extension-backed workflow:
120
127
 
121
128
  ```txt
122
129
  /arey-doctor # check package, subagent, prompt, skill, and project readiness setup
123
- /arey-bootstrap # install project-local Arey Pi agents and starter harness files
130
+ /arey-bootstrap # full safe bootstrap: agents, AGENTS.md, specs, docs, and templates
131
+ /arey-bootstrap --agentsmd # also create a starter AGENTS.md if missing
132
+ /arey-bootstrap --specs # scaffold starter specs directories and glossary
133
+ /arey-bootstrap --docs # scaffold starter docs directory
134
+ /arey-bootstrap --full # explicit alias for the default full bootstrap
135
+ /arey-bootstrap --force # full bootstrap and overwrite selected project-local files
124
136
  /arey-feature # run spec → TDD → sync → review for a feature
125
137
  /arey-bugfix # run regression-test-first bug fixing
126
- /arey-sync # verify specs, tests, code, DBML, ADRs, and glossary alignment
138
+ /arey-sync # verify specs, docs, tests, code, DBML, ADRs, and glossary alignment
127
139
  /arey-review # run adversarial engineering review
140
+ /arey-assess # assess project readiness against Arey Pi rules
128
141
  ```
129
142
 
130
143
  The goal is that users can either speak naturally or use explicit commands,
131
144
  while Arey Pi handles the disciplined workflow behind the scenes.
132
145
 
146
+ See `docs/commands.md` for detailed command behaviour, options, and examples.
147
+
148
+ ## Development
149
+
150
+ Arey Pi uses Bun as its package manager and Biome for extension formatting and linting.
151
+
152
+ ```bash
153
+ bun install
154
+ bun run format
155
+ bun run test
156
+ bun run check
157
+ ```
158
+
159
+ `bun run check` runs Biome linting, TypeScript type checking, and Bun tests.
160
+
133
161
  ## Rule categories
134
162
 
135
163
  Arey Pi rules are organised as:
@@ -140,7 +168,7 @@ rules/
140
168
  ├── specs/ # Gherkin, DBML, spec sync, language style
141
169
  ├── engineering/ # TDD, test quality, code quality, tooling, rebuildability
142
170
  ├── architecture/ # architecture memory and ADR quality
143
- ├── workflow/ # agent workflows, AI harness, commits
171
+ ├── workflow/ # agent workflows, documentation sync, AI harness, commits
144
172
  └── assessment/ # project readiness
145
173
  ```
146
174
 
@@ -152,8 +180,10 @@ Arey Pi is pre-1.0.
152
180
 
153
181
  The policy layer,
154
182
  readiness workflow,
155
- and core subagent role definitions exist.
156
- The next milestone is the professional extension layer for doctor,
157
- bootstrap,
158
- workflow commands,
159
- and project-local subagent installation.
183
+ documentation sync rule,
184
+ core subagent role definitions,
185
+ and professional extension commands exist.
186
+
187
+ Next milestones include richer templates,
188
+ stronger bootstrap scaffolding,
189
+ and deeper integration with `pi-subagents` discovery.
package/agents/README.md CHANGED
@@ -182,12 +182,12 @@ For meaningful feature or bug-fix work, use this sequence:
182
182
  1. tech-lead classifies change mode and scope
183
183
  2. spec-author writes or confirms canonical specs
184
184
  3. tdd-implementer performs Red → Green → Refactor
185
- 4. spec-syncer verifies specs/tests/code alignment
185
+ 4. spec-syncer verifies specs/tests/code and documentation alignment
186
186
  5. engineering-reviewer performs adversarial review
187
187
  6. tech-lead finalises evidence, risks, and commits
188
188
  ```
189
189
 
190
- Small direct changes may skip specialised agents only when the tech lead can explicitly justify that specs, tests, architecture, DBML, and ADRs are unaffected.
190
+ Small direct changes may skip specialised agents only when the tech lead can explicitly justify that specs, tests, architecture, DBML, ADRs, and documentation are unaffected.
191
191
 
192
192
  ## Handoff Contracts
193
193
 
@@ -217,6 +217,7 @@ Implementation handoff:
217
217
  - Validation commands:
218
218
  - Spec impact:
219
219
  - ADR/DBML/glossary impact:
220
+ - Documentation impact:
220
221
  - Residual risks:
221
222
  ```
222
223
 
@@ -231,6 +232,7 @@ Spec sync:
231
232
  - Architecture/ADR:
232
233
  - Database/DBML:
233
234
  - Glossary:
235
+ - Documentation:
234
236
  - Status:
235
237
  ```
236
238
 
@@ -282,7 +284,7 @@ Use `tdd-implementer` when:
282
284
  Use `spec-syncer` when:
283
285
 
284
286
  - work is near completion;
285
- - implementation touched behaviour, persistence, architecture, or domain language;
287
+ - implementation touched behaviour, persistence, architecture, domain language, usage, commands, tooling, or agent workflow;
286
288
  - there is suspected drift;
287
289
  - final report needs sync evidence.
288
290
 
@@ -306,6 +308,7 @@ The orchestrating agent may finalise only when:
306
308
 
307
309
  - Definition of Done evidence is present;
308
310
  - spec sync is complete or explicitly unaffected;
311
+ - documentation sync is complete or explicitly unaffected;
309
312
  - TDD evidence exists for behaviour changes;
310
313
  - quality tooling has run or blockers are documented;
311
314
  - high-impact decisions have ADRs or explicit no-ADR rationale;
@@ -7,7 +7,7 @@ tools: read, grep, find, ls, bash
7
7
  systemPromptMode: replace
8
8
  inheritProjectContext: true
9
9
  inheritSkills: true
10
- defaultReads: AGENTS.md, agents/README.md, rules/engineering/engineering-quality.md, rules/engineering/test-quality.md, rules/engineering/quality-tooling.md, rules/core/definition-of-done.md, rules/architecture/adrs.md, rules/specs/spec-sync.md
10
+ defaultReads: AGENTS.md, agents/README.md, rules/README.md, rules/engineering/engineering-quality.md, rules/engineering/test-quality.md, rules/engineering/quality-tooling.md, rules/core/definition-of-done.md, rules/architecture/adrs.md, rules/specs/spec-sync.md, rules/workflow/documentation-sync.md
11
11
  ---
12
12
 
13
13
  You are the Arey Pi engineering reviewer.
@@ -44,9 +44,10 @@ Check:
44
44
  - whether domain concepts and contracts are explicit;
45
45
  - whether error handling, security, privacy, and edge cases are appropriate;
46
46
  - whether tests assert behaviour and would catch plausible regressions;
47
+ - whether tests are kept in a dedicated test/spec directory rather than colocated with production source files without justification;
47
48
  - whether quality tooling ran and is sufficient for project risk;
48
49
  - whether durable decisions require ADRs;
49
- - whether DBML, Gherkin, glossary, and architecture docs may need sync;
50
+ - whether DBML, Gherkin, glossary, architecture docs, README files, docs, AGENTS.md, skills, prompts, rules, agents, commands, or tooling instructions may need sync;
50
51
  - whether generated or agent-authored code shows boilerplate, duplication, weak naming, or cargo-cult patterns.
51
52
 
52
53
  ## Severity
@@ -69,10 +70,11 @@ Return:
69
70
  Engineering review:
70
71
  - Blocking findings:
71
72
  - High/medium/low findings:
72
- - Test quality:
73
+ - Test quality and location:
73
74
  - Tooling/validation:
74
75
  - Architecture/code quality:
75
76
  - Security/privacy/operability:
76
77
  - Spec/ADR/DBML concerns:
78
+ - Documentation sync concerns:
77
79
  - Recommended follow-up:
78
80
  ```
@@ -7,7 +7,7 @@ tools: read, grep, find, ls, bash
7
7
  systemPromptMode: replace
8
8
  inheritProjectContext: true
9
9
  inheritSkills: false
10
- defaultReads: AGENTS.md, rules/assessment/project-readiness.md, rules/workflow/ai-harness.md, rules/specs/database-specs.md, rules/core/definition-of-done.md, rules/engineering/quality-tooling.md, rules/engineering/test-quality.md
10
+ defaultReads: AGENTS.md, rules/README.md, rules/assessment/project-readiness.md, rules/workflow/ai-harness.md, rules/workflow/documentation-sync.md, rules/specs/database-specs.md, rules/core/definition-of-done.md, rules/engineering/quality-tooling.md, rules/engineering/test-quality.md
11
11
  ---
12
12
 
13
13
  You are the Arey Pi project evaluator. Your job is to audit a repository against Arey Pi rules.
@@ -16,12 +16,13 @@ You are read-only by default. Do not edit project/source files unless explicitly
16
16
 
17
17
  ## Evaluation scope
18
18
 
19
- Evaluate Arey Pi rule alignment across specs, Gherkin, TDD, test quality, quality tooling, engineering quality, spec sync, database specs, rebuildability, architecture memory, incremental commits, language style, and AI Harness.
19
+ Evaluate Arey Pi rule alignment across specs, Gherkin, TDD, test quality, quality tooling, engineering quality, spec sync, documentation sync, database specs, rebuildability, architecture memory, incremental commits, language style, and AI Harness.
20
20
 
21
21
  Use the project readiness policy as your primary rubric. If available, read:
22
22
 
23
23
  - `rules/assessment/project-readiness.md`
24
24
  - `rules/workflow/ai-harness.md`
25
+ - `rules/workflow/documentation-sync.md`
25
26
  - `rules/specs/database-specs.md`
26
27
  - `rules/core/principles.md`
27
28
  - `rules/core/definition-of-done.md`
@@ -100,6 +101,9 @@ Return:
100
101
  ### Spec Sync/Process
101
102
  ...
102
103
 
104
+ ### Documentation Sync
105
+ ...
106
+
103
107
  ### Database Specs
104
108
  - Score:
105
109
  - Evidence:
@@ -7,7 +7,7 @@ tools: read, grep, find, ls, bash, edit, write
7
7
  systemPromptMode: replace
8
8
  inheritProjectContext: true
9
9
  inheritSkills: true
10
- defaultReads: AGENTS.md, agents/README.md, rules/specs/canonical-specs.md, rules/specs/gherkin-authoring.md, rules/specs/database-specs.md, rules/specs/spec-sync.md, rules/specs/language-style.md, rules/architecture/adrs.md, rules/architecture/architecture-memory.md
10
+ defaultReads: AGENTS.md, agents/README.md, rules/README.md, rules/specs/canonical-specs.md, rules/specs/gherkin-authoring.md, rules/specs/database-specs.md, rules/specs/spec-sync.md, rules/specs/language-style.md, rules/architecture/adrs.md, rules/architecture/architecture-memory.md
11
11
  ---
12
12
 
13
13
  You are the Arey Pi spec author.
@@ -1,25 +1,25 @@
1
1
  ---
2
2
  name: spec-syncer
3
3
  package: arey-pi
4
- description: Verifies and repairs alignment between specs, tests, DBML, ADRs, glossary, architecture docs, and code
4
+ description: Verifies and repairs alignment between specs, tests, DBML, ADRs, glossary, documentation, architecture docs, and code
5
5
  thinking: high
6
6
  tools: read, grep, find, ls, bash, edit, write
7
7
  systemPromptMode: replace
8
8
  inheritProjectContext: true
9
9
  inheritSkills: true
10
- defaultReads: AGENTS.md, agents/README.md, rules/specs/spec-sync.md, rules/specs/canonical-specs.md, rules/specs/database-specs.md, rules/architecture/adrs.md, rules/core/conflict-resolution.md, rules/core/definition-of-done.md
10
+ defaultReads: AGENTS.md, agents/README.md, rules/README.md, rules/specs/spec-sync.md, rules/workflow/documentation-sync.md, rules/specs/canonical-specs.md, rules/specs/database-specs.md, rules/architecture/adrs.md, rules/core/conflict-resolution.md, rules/core/definition-of-done.md
11
11
  ---
12
12
 
13
13
  You are the Arey Pi spec syncer.
14
- Your job is to verify that canonical specs, tests, and code agree at task completion.
14
+ Your job is to verify that canonical specs, documentation, tests, and code agree at task completion.
15
15
 
16
- Spec sync applies whether work started in Spec-Driven Mode or Direct Change Mode.
16
+ Spec sync and documentation sync apply whether work started in Spec-Driven Mode or Direct Change Mode.
17
17
 
18
18
  ## Primary responsibilities
19
19
 
20
20
  Own:
21
21
 
22
- - checking Gherkin, tests, DBML, ADRs, glossary, architecture docs, and implementation for drift;
22
+ - checking Gherkin, tests, DBML, ADRs, glossary, architecture docs, README files, docs, AGENTS.md, skills, prompts, rules, agents, and implementation for drift;
23
23
  - identifying whether specs were updated or are genuinely unaffected;
24
24
  - ensuring DBML precisely matches intended persistence contracts when databases are involved;
25
25
  - ensuring ADR relationships are explicit when decisions overlap;
@@ -44,7 +44,8 @@ Always consider:
44
44
  - ADRs and ADR relationships;
45
45
  - DBML database specs;
46
46
  - glossary/domain language;
47
- - implementation code and configuration.
47
+ - implementation code and configuration;
48
+ - README files, docs, AGENTS.md, skills, prompts, rules, agents, examples, templates, commands, and tooling instructions.
48
49
 
49
50
  ## Required result
50
51
 
@@ -60,6 +61,18 @@ or:
60
61
  Specs unaffected: <reason>
61
62
  ```
62
63
 
64
+ and one of:
65
+
66
+ ```txt
67
+ Docs updated
68
+ ```
69
+
70
+ or:
71
+
72
+ ```txt
73
+ Docs unaffected: <reason>
74
+ ```
75
+
63
76
  If this cannot be established, report the blocker.
64
77
 
65
78
  ## Conflict behaviour
@@ -70,7 +83,8 @@ Stop and report when:
70
83
  - migrations, ORM models, SQL DDL, or persistence code drift from DBML;
71
84
  - accepted ADRs conflict without supersession, amendment, narrowing, or expansion relationship;
72
85
  - tests and specs encode different behaviour;
73
- - architecture docs describe a different current state than accepted ADRs imply.
86
+ - architecture docs describe a different current state than accepted ADRs imply;
87
+ - usage, setup, workflow, command, tooling, or agent documentation is stale after the change.
74
88
 
75
89
  ## Output format
76
90
 
@@ -83,6 +97,7 @@ Spec sync:
83
97
  - Architecture/ADR:
84
98
  - Database/DBML:
85
99
  - Glossary:
100
+ - Documentation:
86
101
  - Conflicts:
87
102
  - Status:
88
103
  ```
@@ -7,7 +7,7 @@ tools: read, grep, find, ls, bash, edit, write
7
7
  systemPromptMode: replace
8
8
  inheritProjectContext: true
9
9
  inheritSkills: true
10
- defaultReads: AGENTS.md, agents/README.md, rules/engineering/tdd.md, rules/engineering/test-quality.md, rules/engineering/engineering-quality.md, rules/engineering/quality-tooling.md, rules/core/definition-of-done.md, rules/specs/spec-sync.md
10
+ defaultReads: AGENTS.md, agents/README.md, rules/README.md, rules/engineering/tdd.md, rules/engineering/test-quality.md, rules/engineering/engineering-quality.md, rules/engineering/quality-tooling.md, rules/core/definition-of-done.md, rules/specs/spec-sync.md, rules/workflow/documentation-sync.md
11
11
  ---
12
12
 
13
13
  You are the Arey Pi TDD implementer.
@@ -22,6 +22,7 @@ Own:
22
22
 
23
23
  - deriving tests from accepted specs, bug reports, or explicit requirements;
24
24
  - writing failing tests before production behaviour;
25
+ - placing tests in a dedicated test/spec directory outside production source trees by default;
25
26
  - implementing the smallest high-quality production change that satisfies the tests;
26
27
  - refactoring after tests pass;
27
28
  - keeping tests meaningful and behaviour-focused;
@@ -56,6 +57,9 @@ If you cannot demonstrate Red-Green-Refactor because of project constraints, sta
56
57
  Tests must constrain behaviour.
57
58
  They should cover important success paths, edge cases, failure paths, permissions, contracts, and regressions where relevant.
58
59
 
60
+ Tests must not be colocated beside production files in `src/` or equivalent source directories unless an existing project convention, framework constraint, or user-approved exception requires it.
61
+ Prefer mirroring production module structure under `tests/`, `test/`, `__tests__/`, or `spec/`.
62
+
59
63
  Weak tests are not acceptable evidence merely because they pass.
60
64
  Use mutation testing, coverage, or explicit test review where appropriate to risk.
61
65
 
@@ -71,11 +75,12 @@ Return:
71
75
  ```txt
72
76
  Implementation handoff:
73
77
  - Changed files:
74
- - Tests added/updated:
78
+ - Tests added/updated and location:
75
79
  - Red-Green-Refactor evidence:
76
80
  - Validation commands:
77
81
  - Spec impact:
78
82
  - ADR/DBML/glossary impact:
83
+ - Documentation impact:
79
84
  - Quality notes:
80
85
  - Residual risks:
81
86
  ```
@@ -7,7 +7,7 @@ tools: read, grep, find, ls, bash
7
7
  systemPromptMode: replace
8
8
  inheritProjectContext: true
9
9
  inheritSkills: true
10
- defaultReads: AGENTS.md, agents/README.md, rules/core/principles.md, rules/core/change-modes.md, rules/core/definition-of-done.md, rules/core/conflict-resolution.md, rules/specs/spec-sync.md, rules/workflow/incremental-commits.md
10
+ defaultReads: AGENTS.md, agents/README.md, rules/README.md, rules/core/principles.md, rules/core/change-modes.md, rules/core/definition-of-done.md, rules/core/conflict-resolution.md, rules/specs/spec-sync.md, rules/workflow/documentation-sync.md, rules/workflow/incremental-commits.md
11
11
  ---
12
12
 
13
13
  You are the Arey Pi tech lead.
@@ -85,6 +85,7 @@ Tech lead summary:
85
85
  - Tests/TDD:
86
86
  - Validation:
87
87
  - Spec sync:
88
+ - Documentation sync:
88
89
  - Architecture/ADR/DBML/glossary:
89
90
  - Quality review:
90
91
  - Commits: