arey-pi 0.1.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.
@@ -0,0 +1,70 @@
1
+ # Agent Workflows
2
+
3
+ ## Purpose
4
+
5
+ This policy defines how agents should collaborate without corrupting the worktree, bypassing specs, or hiding decisions.
6
+
7
+ ## Core Roles
8
+
9
+ Arey Pi may define agents such as:
10
+
11
+ - spec author;
12
+ - test designer;
13
+ - TDD implementer;
14
+ - spec syncer;
15
+ - acceptance reviewer;
16
+ - rebuild planner;
17
+ - tech lead/orchestrator.
18
+
19
+ Roles should be focused. A role should not silently take over responsibilities that belong to another role when doing so weakens review or traceability.
20
+
21
+ ## Worktree Safety
22
+
23
+ Only one agent should write to a worktree at a time unless writers are isolated in separate worktrees.
24
+
25
+ Review, research, planning, and validation can run in parallel. Normal implementation should remain single-writer.
26
+
27
+ ## Role Boundaries
28
+
29
+ - Spec authors write or refine canonical specs; they do not implement production code unless explicitly assigned.
30
+ - Test designers derive tests from specs and risk; they do not weaken specs to fit code.
31
+ - TDD implementers write tests and implementation through Red → Green → Refactor.
32
+ - Spec syncers compare the final diff against canonical sources and update specs/docs when needed.
33
+ - Reviewers validate alignment between specs, tests, code, and policies.
34
+ - Tech leads choose change mode, scope, sequencing, and conflict escalation.
35
+
36
+ ## Review Behaviour
37
+
38
+ Reviewers should be adversarial but practical.
39
+
40
+ They should focus on:
41
+
42
+ - spec drift;
43
+ - missing or weak tests;
44
+ - TDD violations;
45
+ - behaviour/spec mismatches;
46
+ - rebuildability gaps;
47
+ - architecture memory gaps;
48
+ - unnecessary scope expansion.
49
+
50
+ ## Completion Handoffs
51
+
52
+ Implementation agents must report:
53
+
54
+ - changed files;
55
+ - tests added/updated;
56
+ - Red/Green evidence;
57
+ - validation commands;
58
+ - spec sync status;
59
+ - decisions made;
60
+ - residual risks.
61
+
62
+ ## Escalation
63
+
64
+ Agents must stop or ask for clarification when:
65
+
66
+ - user intent conflicts with canonical specs;
67
+ - product behaviour is ambiguous;
68
+ - tests and specs disagree;
69
+ - architecture decisions are required but not approved;
70
+ - a direct change grows into SDD-level scope.
@@ -0,0 +1,177 @@
1
+ # AI Harness
2
+
3
+ ## Purpose
4
+
5
+ The AI harness is the project infrastructure that lets agents work reliably, safely, and consistently under Arey Pi.
6
+
7
+ It is a first-class Arey Pi rule, not an optional convenience and not an external concern. If agents are expected to contribute to a project, the project must expose enough context, commands, skills, prompts, and safety rails for them to do high-quality work.
8
+
9
+ ## Core Rule
10
+
11
+ A project using Arey Pi must maintain an explicit AI harness appropriate to its complexity, stack, and risk.
12
+
13
+ The AI harness should make it easy for agents to discover:
14
+
15
+ - what the project is;
16
+ - how it is structured;
17
+ - which Arey Pi rules apply;
18
+ - where canonical specs live;
19
+ - how to run validation;
20
+ - which tooling is required;
21
+ - which technologies require special guidance;
22
+ - what agents must not do.
23
+
24
+ ## Required Harness Components
25
+
26
+ ### AGENTS.md
27
+
28
+ Projects should provide an `AGENTS.md` file with:
29
+
30
+ - project overview;
31
+ - Arey Pi instructions;
32
+ - links to relevant rules/specs;
33
+ - common setup and validation commands;
34
+ - Definition of Done expectations;
35
+ - quality tooling commands;
36
+ - commit conventions;
37
+ - safety constraints;
38
+ - project structure notes;
39
+ - known pitfalls and non-obvious conventions.
40
+
41
+ `AGENTS.md` is the bootstrap context for agents. It should be concise enough to read at startup and specific enough to prevent repeated rediscovery.
42
+
43
+ ### Nested AGENTS.md
44
+
45
+ Large or multi-domain repositories may use nested `AGENTS.md` files to provide local instructions for a subtree.
46
+
47
+ Use nested files when different areas have meaningfully different:
48
+
49
+ - technology stacks;
50
+ - validation commands;
51
+ - architecture boundaries;
52
+ - domain language;
53
+ - safety constraints;
54
+ - generated file rules;
55
+ - ownership or review expectations.
56
+
57
+ Nested `AGENTS.md` files should refine or specialize the root instructions, not contradict them. If local instructions conflict with root Arey Pi rules, the conflict must be explicit and resolved by the user or project maintainers.
58
+
59
+ Because Pi loads context files from parent directories and the current working directory at startup, nested `AGENTS.md` works best when agents are launched from the relevant subtree or when the root `AGENTS.md` tells agents which nested files to read for specific areas.
60
+
61
+ ### Pi Configuration
62
+
63
+ Projects should document or configure how Arey Pi is loaded, for example through:
64
+
65
+ - `.pi/settings.json`;
66
+ - package installation instructions;
67
+ - local package references;
68
+ - project README instructions;
69
+ - explicit prompts or skills.
70
+
71
+ Agents should be able to tell whether Arey Pi is installed, vendored, or expected as external context.
72
+
73
+ ### Skills
74
+
75
+ Projects should provide or reference skills when agents need specialized guidance for:
76
+
77
+ - project-specific workflows;
78
+ - important frameworks or libraries;
79
+ - domain concepts;
80
+ - testing strategy;
81
+ - quality tooling;
82
+ - deployment or operations;
83
+ - security-sensitive areas.
84
+
85
+ Technology-specific skills are especially valuable when correct work depends on ecosystem details that agents may otherwise hallucinate or rediscover.
86
+
87
+ ### Prompts
88
+
89
+ Projects should provide reusable prompts for common workflows when useful, such as:
90
+
91
+ - feature delivery;
92
+ - bug fix;
93
+ - spec sync;
94
+ - project assessment;
95
+ - architecture review;
96
+ - release validation;
97
+ - migration work.
98
+
99
+ Prompts should apply Arey Pi rules instead of duplicating stale instructions.
100
+
101
+ ### Subagents
102
+
103
+ When `pi-subagents` is used, projects may define role agents for recurring responsibilities such as:
104
+
105
+ - planning;
106
+ - implementation;
107
+ - review;
108
+ - spec sync;
109
+ - test quality review;
110
+ - project evaluation;
111
+ - domain-specific analysis.
112
+
113
+ Subagents must respect Arey Pi role boundaries and worktree safety rules.
114
+
115
+ ### Command Discoverability
116
+
117
+ Validation and setup commands should be discoverable from one or more of:
118
+
119
+ - `AGENTS.md`;
120
+ - README;
121
+ - package/build scripts;
122
+ - Makefile;
123
+ - Justfile;
124
+ - CI configuration;
125
+ - project docs.
126
+
127
+ Agents should not need to guess how to format, lint, typecheck, test, run coverage, or perform mutation testing.
128
+
129
+ ### Safety Rails
130
+
131
+ The AI harness should document restrictions for:
132
+
133
+ - secrets;
134
+ - environment variables;
135
+ - destructive commands;
136
+ - database operations;
137
+ - migrations;
138
+ - generated files;
139
+ - external services;
140
+ - deployment;
141
+ - ownership or human review requirements.
142
+
143
+ ## Missing Harness
144
+
145
+ If a project lacks an adequate AI harness, agents must surface the gap.
146
+
147
+ They should propose improvements and ask for approval before adding or changing harness infrastructure.
148
+
149
+ For non-trivial projects, missing `AGENTS.md`, undiscoverable validation commands, or absent safety rules are Arey Pi readiness issues.
150
+
151
+ ## Harness Quality
152
+
153
+ A good AI harness is:
154
+
155
+ - concise;
156
+ - current;
157
+ - specific to the project;
158
+ - connected to canonical rules and specs;
159
+ - easy to update;
160
+ - safe by default;
161
+ - useful for both humans and agents.
162
+
163
+ A weak AI harness is:
164
+
165
+ - generic;
166
+ - stale;
167
+ - disconnected from real commands;
168
+ - missing safety constraints;
169
+ - missing technology-specific guidance;
170
+ - too verbose to be reliably followed;
171
+ - dependent on chat history.
172
+
173
+ ## Acceptance Rule
174
+
175
+ A project is not fully aligned with Arey Pi unless its AI harness is adequate for the level of agent work expected in that project.
176
+
177
+ AI harness gaps should be evaluated and prioritised like any other Arey Pi rule gap.
@@ -0,0 +1,88 @@
1
+ # Incremental Commits
2
+
3
+ ## Purpose
4
+
5
+ Work should be committed incrementally so the project history reflects coherent steps, not one large opaque dump.
6
+
7
+ All commits must use Conventional Commits.
8
+
9
+ ## Core Rule
10
+
11
+ When a task spans multiple meaningful steps, commit after each coherent unit of work.
12
+
13
+ A coherent unit may be:
14
+
15
+ - specs added or updated;
16
+ - tests added or updated;
17
+ - implementation of a focused behaviour;
18
+ - refactor after green tests;
19
+ - spec sync updates;
20
+ - architecture/ADR updates;
21
+ - Arey Pi policy or agent definition changes.
22
+
23
+ ## Conventional Commits
24
+
25
+ Use Conventional Commits format:
26
+
27
+ ```txt
28
+ <type>(optional-scope): <description>
29
+ ```
30
+
31
+ Common types:
32
+
33
+ - `feat`: new behaviour or capability;
34
+ - `fix`: bug fix;
35
+ - `test`: tests only;
36
+ - `docs`: specs, rules, architecture docs, ADRs, glossary;
37
+ - `refactor`: behaviour-preserving code change;
38
+ - `chore`: package/config/maintenance;
39
+ - `ci`: CI or automation;
40
+ - `build`: build system or dependencies.
41
+
42
+ Examples:
43
+
44
+ ```txt
45
+ docs(rules): define canonical spec policy
46
+ test(auth): add login regression scenario
47
+ feat(auth): implement successful login flow
48
+ docs(specs): sync login Gherkin scenarios
49
+ refactor(auth): simplify session creation
50
+ ```
51
+
52
+ ## Commit Hygiene
53
+
54
+ Each commit should be:
55
+
56
+ - focused;
57
+ - reviewable;
58
+ - buildable where practical;
59
+ - aligned with the TDD/spec workflow;
60
+ - free from unrelated cleanup.
61
+
62
+ ## Agent Behaviour
63
+
64
+ Agents should commit incrementally when asked to perform repository work and the current environment allows commits.
65
+
66
+ Before committing, agents should inspect the diff and avoid committing unrelated user changes.
67
+
68
+ If there are pre-existing uncommitted changes not made by the agent, stop and ask before mixing them into a commit.
69
+
70
+ ## Suggested Commit Flow
71
+
72
+ For SDD/TDD work:
73
+
74
+ ```txt
75
+ docs(specs): add or update Gherkin behaviour
76
+ test(scope): add failing behaviour/regression tests
77
+ feat/fix(scope): implement behaviour
78
+ refactor(scope): improve implementation after green tests
79
+ docs(specs): synchronize canonical specs and decisions
80
+ ```
81
+
82
+ For direct small work:
83
+
84
+ ```txt
85
+ test(scope): cover direct change
86
+ fix/feat/refactor(scope): apply direct change
87
+ docs(specs): record spec sync if files changed
88
+ ```
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: project-readiness
3
+ description: Evaluate whether a repository is aligned with Arey Pi rules. Use when assessing specs, tests, quality tooling, AGENTS.md, skills, prompts, subagents, or project readiness.
4
+ ---
5
+
6
+ # Project Readiness
7
+
8
+ Use this skill to assess whether a project is ready to operate under Arey Pi.
9
+
10
+ Project readiness evaluates alignment with Arey Pi rules.
11
+
12
+ Project readiness covers all applicable Arey Pi rules, including specs, TDD, database specs, quality tooling, architecture/code quality, spec sync, AI harness, DoD, and commits.
13
+
14
+ ## Required Reading
15
+
16
+ Read these policy files when available in the Arey Pi package or project:
17
+
18
+ - `rules/assessment/project-readiness.md`
19
+ - `rules/workflow/ai-harness.md`
20
+ - `rules/specs/database-specs.md`
21
+ - `rules/core/principles.md`
22
+ - `rules/core/definition-of-done.md`
23
+ - `rules/engineering/test-quality.md`
24
+ - `rules/engineering/quality-tooling.md`
25
+ - `rules/engineering/engineering-quality.md`
26
+
27
+ If the files are missing from the target project, report that as part of the assessment rather than assuming compliance.
28
+
29
+ ## Default Mode: Audit
30
+
31
+ Audit mode is read-only.
32
+
33
+ Inspect the repository and produce a readiness report. Do not modify files, install dependencies, or change configuration unless the user explicitly asks for Bootstrap Mode.
34
+
35
+ ## What to Inspect
36
+
37
+ Look for:
38
+
39
+ - root and nested `AGENTS.md`, `CLAUDE.md`, `.pi/settings.json`, `.pi/`, `.agents/`
40
+ - `specs/features/`, `specs/database/`, `specs/architecture/`, `specs/decisions/`, glossary
41
+ - test directories and test runner config
42
+ - quality tooling config: formatter, linter, typecheck, coverage, mutation testing
43
+ - project scripts: `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, Makefile, Justfile, CI
44
+ - README/developer docs
45
+ - git history conventions when useful
46
+
47
+ ## Output
48
+
49
+ Produce:
50
+
51
+ ```md
52
+ # Arey Pi Project Readiness Report
53
+
54
+ ## Overall
55
+ - Overall Readiness: N/5
56
+ - Lowest Rule Scores:
57
+ - Highest Rule Scores:
58
+
59
+ ## Blockers
60
+
61
+ ## Quick Wins
62
+
63
+ ## Rule Scores
64
+ - Canonical Specs
65
+ - Gherkin Authoring
66
+ - Tests/TDD
67
+ - Test Quality
68
+ - Quality Tooling
69
+ - Engineering Quality
70
+ - Spec Sync
71
+ - Database Specs, when applicable
72
+ - Rebuildability
73
+ - Architecture Memory
74
+ - Incremental Commits
75
+ - AI Harness
76
+
77
+ ## Recommended Plan
78
+
79
+ ## Residual Risks / Unknowns
80
+ ```
81
+
82
+ For every score, include evidence with file paths or explicit missing-file observations.
83
+
84
+ ## Bootstrap Mode
85
+
86
+ Only after user approval, implement selected improvements such as:
87
+
88
+ - creating or updating `AGENTS.md`;
89
+ - adding missing validation scripts;
90
+ - adding spec directory skeletons;
91
+ - adding initial DBML skeletons for database projects;
92
+ - adding Arey Pi prompts or skills;
93
+ - documenting quality tooling;
94
+ - adding ADR/glossary structure.
95
+
96
+ Bootstrap Mode must follow Arey Pi policies, including quality tooling, DoD, and incremental Conventional Commits.