arey-pi 0.6.0 → 0.6.2
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 +9 -8
- package/docs/adoption.md +2 -2
- package/docs/commands.md +10 -9
- package/docs/pi-subagents.md +1 -1
- package/docs/templates.md +1 -1
- package/docs/workflows.md +8 -8
- package/extensions/arey-pi/core.ts +1 -7
- package/extensions/arey-pi/workflow-runtime.ts +16 -85
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ tech-lead
|
|
|
74
74
|
The intended daily experience is natural language first:
|
|
75
75
|
|
|
76
76
|
```txt
|
|
77
|
-
Implement password reset
|
|
77
|
+
Implement password reset.
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
The parent agent should act as the tech lead,
|
|
@@ -140,15 +140,16 @@ Arey Pi includes a polished extension-backed setup and natural-language workflow
|
|
|
140
140
|
/arey-bootstrap --full # explicit alias for the default full bootstrap
|
|
141
141
|
/arey-bootstrap --force # full bootstrap and overwrite selected project-local files
|
|
142
142
|
# Development workflows are natural-language first:
|
|
143
|
-
# "Implementa password reset
|
|
144
|
-
# "Corrige este bug
|
|
145
|
-
# "Revisa el current diff
|
|
143
|
+
# "Implementa password reset"
|
|
144
|
+
# "Corrige este bug"
|
|
145
|
+
# "Revisa el current diff"
|
|
146
146
|
```
|
|
147
147
|
|
|
148
148
|
The goal is that users work naturally without development commands.
|
|
149
|
-
|
|
150
|
-
Arey Pi
|
|
151
|
-
|
|
149
|
+
When the package is installed,
|
|
150
|
+
Arey Pi automatically injects quiet harness context behind the scenes on every agent turn.
|
|
151
|
+
The parent agent infers the work mode,
|
|
152
|
+
acts as orchestrator,
|
|
152
153
|
use specialist subagents when available,
|
|
153
154
|
inject the relevant delivery guidance,
|
|
154
155
|
and apply simple event-based guardrails for protected paths.
|
|
@@ -201,7 +202,7 @@ documentation sync rule,
|
|
|
201
202
|
core subagent role definitions,
|
|
202
203
|
and professional setup extension commands exist.
|
|
203
204
|
|
|
204
|
-
Arey Pi now includes natural-language harness
|
|
205
|
+
Arey Pi now includes always-on natural-language harness injection,
|
|
205
206
|
focused prompts,
|
|
206
207
|
TDD/spec-sync/review skills,
|
|
207
208
|
and extension-core tests.
|
package/docs/adoption.md
CHANGED
|
@@ -88,7 +88,7 @@ agents should be able to discover:
|
|
|
88
88
|
Ask naturally:
|
|
89
89
|
|
|
90
90
|
```txt
|
|
91
|
-
Evalúa este repo
|
|
91
|
+
Evalúa este repo
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
You can also use the focused prompt template if desired:
|
|
@@ -206,7 +206,7 @@ run setup diagnostics and ask for a natural readiness assessment:
|
|
|
206
206
|
|
|
207
207
|
```txt
|
|
208
208
|
/arey-doctor
|
|
209
|
-
Evalúa este repo
|
|
209
|
+
Evalúa este repo
|
|
210
210
|
```
|
|
211
211
|
|
|
212
212
|
A good first adoption result is not perfection.
|
package/docs/commands.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Arey Pi ships a Pi extension that registers native setup slash commands.
|
|
4
4
|
Development workflows are intentionally natural-language first:
|
|
5
|
-
the
|
|
5
|
+
when the package is installed,
|
|
6
|
+
the extension injects quiet harness guidance automatically on every agent turn.
|
|
6
7
|
|
|
7
8
|
## Command overview
|
|
8
9
|
|
|
@@ -152,17 +153,17 @@ Use this command after installing Arey Pi and `pi-subagents` in a repository whe
|
|
|
152
153
|
## Natural-language development workflows
|
|
153
154
|
|
|
154
155
|
Arey Pi is designed to work without development slash commands.
|
|
155
|
-
When the
|
|
156
|
-
|
|
156
|
+
When the package is installed,
|
|
157
|
+
the extension injects quiet harness context automatically before every agent turn.
|
|
158
|
+
Users can simply ask naturally:
|
|
157
159
|
|
|
158
160
|
```txt
|
|
159
|
-
Implementa password reset
|
|
160
|
-
Corrige este bug
|
|
161
|
-
Revisa el current diff
|
|
162
|
-
Evalúa este repo
|
|
161
|
+
Implementa password reset
|
|
162
|
+
Corrige este bug
|
|
163
|
+
Revisa el current diff
|
|
164
|
+
Evalúa este repo
|
|
163
165
|
```
|
|
164
166
|
|
|
165
|
-
The extension injects quiet harness context automatically before the agent turn.
|
|
166
167
|
The harness is not meant to add ceremony for the user.
|
|
167
168
|
It asks the agent to infer whether the request is a feature,
|
|
168
169
|
bugfix,
|
|
@@ -187,7 +188,7 @@ The injected harness guidance emphasises:
|
|
|
187
188
|
While Arey Pi is active,
|
|
188
189
|
Arey Pi applies simple tool-call guardrails:
|
|
189
190
|
|
|
190
|
-
- writes or edits to
|
|
191
|
+
- writes or edits to env files such as `.env` and `.env.local` are blocked; `.git/` and `node_modules/` remain readable and writable when the task genuinely requires them.
|
|
191
192
|
|
|
192
193
|
|
|
193
194
|
## Prompt templates and skills
|
package/docs/pi-subagents.md
CHANGED
package/docs/templates.md
CHANGED
|
@@ -133,7 +133,7 @@ The readiness report template captures Arey Pi assessment output.
|
|
|
133
133
|
|
|
134
134
|
Use it when you want a persistent audit snapshot under `docs/`.
|
|
135
135
|
For routine checks,
|
|
136
|
-
ask naturally: `Evalúa este repo
|
|
136
|
+
ask naturally: `Evalúa este repo`.
|
|
137
137
|
|
|
138
138
|
## Template Maintenance
|
|
139
139
|
|
package/docs/workflows.md
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
See `docs/workflow-diagram.md` for a visual overview of the framework workflow.
|
|
4
4
|
|
|
5
5
|
Arey Pi development workflows are natural-language first.
|
|
6
|
-
When the
|
|
7
|
-
the extension injects quiet harness guidance automatically before
|
|
6
|
+
When the package is installed,
|
|
7
|
+
the extension injects quiet harness guidance automatically before every agent turn.
|
|
8
8
|
|
|
9
9
|
## Feature Workflow
|
|
10
10
|
|
|
11
11
|
Example request:
|
|
12
12
|
|
|
13
13
|
```txt
|
|
14
|
-
Implementa password reset
|
|
14
|
+
Implementa password reset
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Expected flow:
|
|
@@ -43,7 +43,7 @@ The workflow should:
|
|
|
43
43
|
Example request:
|
|
44
44
|
|
|
45
45
|
```txt
|
|
46
|
-
Corrige el bug de verificación de email
|
|
46
|
+
Corrige el bug de verificación de email
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
Use this when behaviour is wrong.
|
|
@@ -63,7 +63,7 @@ and it should live outside production source directories by default.
|
|
|
63
63
|
Example request:
|
|
64
64
|
|
|
65
65
|
```txt
|
|
66
|
-
Sincroniza specs y docs
|
|
66
|
+
Sincroniza specs y docs para el current diff
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Use this before completing non-trivial work or when drift is suspected.
|
|
@@ -103,7 +103,7 @@ or justified unaffected statuses.
|
|
|
103
103
|
Example request:
|
|
104
104
|
|
|
105
105
|
```txt
|
|
106
|
-
Revisa el current diff
|
|
106
|
+
Revisa el current diff
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
Use this for adversarial engineering review.
|
|
@@ -130,7 +130,7 @@ Findings should be classified by severity.
|
|
|
130
130
|
Example request:
|
|
131
131
|
|
|
132
132
|
```txt
|
|
133
|
-
Evalúa este repo
|
|
133
|
+
Evalúa este repo
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
Use this to assess project readiness.
|
|
@@ -185,7 +185,7 @@ Users do not need to memorise commands.
|
|
|
185
185
|
This should work:
|
|
186
186
|
|
|
187
187
|
```txt
|
|
188
|
-
Implement password reset
|
|
188
|
+
Implement password reset.
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
The parent agent should act as tech lead,
|
|
@@ -56,12 +56,6 @@ export function parseBootstrapFlags(args: string): BootstrapPlan {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export function shouldActivateAreyPiHarness(prompt: string): boolean {
|
|
60
|
-
const normalized = prompt.toLowerCase();
|
|
61
|
-
if (normalized.includes("arey pi harness is active")) return false;
|
|
62
|
-
return /\barey(?:\s+pi)?\b/.test(normalized);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
59
|
const evidenceSummary = `Final evidence format:\n- Behaviour/spec impact:\n- Tests/TDD, including test location:\n- Validation commands and results:\n- Quality tooling:\n- Spec sync:\n- Documentation sync:\n- Architecture/ADR/glossary impact:\n- Database/DBML impact:\n- Residual risks:`;
|
|
66
60
|
|
|
67
61
|
export function areyPiHarnessContext(prompt: string): string {
|
|
@@ -129,7 +123,7 @@ export function buildDoctorReport(input: DoctorReportInput): string {
|
|
|
129
123
|
"",
|
|
130
124
|
"## Recommended next step",
|
|
131
125
|
input.installedAgentsCount === input.requiredAgentsCount
|
|
132
|
-
? "- Project-local Arey Pi subagents are installed.
|
|
126
|
+
? "- Project-local Arey Pi subagents are installed. Work naturally; Arey Pi harness guidance is injected automatically."
|
|
133
127
|
: "- Run `/arey-bootstrap` to install project-local Arey Pi subagents.",
|
|
134
128
|
].join("\n");
|
|
135
129
|
}
|
|
@@ -1,62 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isToolCallEventType,
|
|
3
3
|
type ExtensionAPI,
|
|
4
|
-
type ExtensionContext,
|
|
5
4
|
type ToolCallEvent,
|
|
6
5
|
type ToolCallEventResult,
|
|
7
6
|
} from "@earendil-works/pi-coding-agent";
|
|
8
|
-
import { areyPiHarnessContext
|
|
7
|
+
import { areyPiHarnessContext } from "./core.ts";
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type HarnessSessionData = { active: boolean };
|
|
13
|
-
type HarnessStore = { active: boolean };
|
|
14
|
-
type SessionEntry = ReturnType<ExtensionContext["sessionManager"]["getEntries"]>[number];
|
|
15
|
-
type CustomSessionEntry = Extract<SessionEntry, { type: "custom" }>;
|
|
16
|
-
type HarnessCustomEntry = CustomSessionEntry & { customType: typeof areyPiSessionEntryType };
|
|
17
|
-
|
|
18
|
-
function isObject(value: unknown): value is Record<string, unknown> {
|
|
19
|
-
return typeof value === "object" && value !== null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function isHarnessSessionData(value: unknown): value is HarnessSessionData {
|
|
23
|
-
return isObject(value) && typeof value.active === "boolean";
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function isHarnessCustomEntry(value: unknown): value is HarnessCustomEntry {
|
|
27
|
-
return isObject(value) && value.type === "custom" && value.customType === areyPiSessionEntryType;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function latestHarnessSessionState(ctx: ExtensionContext): boolean {
|
|
31
|
-
const entry = ctx.sessionManager.getEntries().filter(isHarnessCustomEntry).at(-1);
|
|
32
|
-
return entry && isHarnessSessionData(entry.data) ? entry.data.active : false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function persistHarnessState(pi: ExtensionAPI, active: boolean): void {
|
|
36
|
-
pi.appendEntry(areyPiSessionEntryType, { active } satisfies HarnessSessionData);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function updateHarnessUi(active: boolean, ctx: ExtensionContext): void {
|
|
40
|
-
ctx.ui.setStatus("arey-pi", active ? ctx.ui.theme.fg("accent", "Arey Pi") : undefined);
|
|
41
|
-
ctx.ui.setWidget(
|
|
42
|
-
"arey-pi-harness",
|
|
43
|
-
active
|
|
44
|
-
? [
|
|
45
|
-
"Arey Pi active: natural-language harness guidance is injected.",
|
|
46
|
-
"The agent infers feature/bugfix/sync/review/assessment intent.",
|
|
47
|
-
]
|
|
48
|
-
: undefined,
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function activateHarness(pi: ExtensionAPI, store: HarnessStore, ctx: ExtensionContext): void {
|
|
53
|
-
store.active = true;
|
|
54
|
-
persistHarnessState(pi, true);
|
|
55
|
-
updateHarnessUi(true, ctx);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function isSensitivePath(path: string): boolean {
|
|
59
|
-
return [".env", ".git/", "node_modules/"].some((protectedPath) => path.includes(protectedPath));
|
|
9
|
+
function isProtectedEnvPath(path: string): boolean {
|
|
10
|
+
return path.split("/").some((segment) => segment === ".env" || segment.startsWith(".env."));
|
|
60
11
|
}
|
|
61
12
|
|
|
62
13
|
function editedPath(event: ToolCallEvent): string | undefined {
|
|
@@ -67,46 +18,26 @@ function editedPath(event: ToolCallEvent): string | undefined {
|
|
|
67
18
|
return undefined;
|
|
68
19
|
}
|
|
69
20
|
|
|
70
|
-
function handleMutationGuardrails(
|
|
71
|
-
store: HarnessStore,
|
|
72
|
-
event: ToolCallEvent,
|
|
73
|
-
ctx: ExtensionContext,
|
|
74
|
-
): ToolCallEventResult | undefined {
|
|
21
|
+
function handleMutationGuardrails(event: ToolCallEvent): ToolCallEventResult | undefined {
|
|
75
22
|
const path = editedPath(event);
|
|
76
23
|
if (!path) return undefined;
|
|
77
24
|
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
return { block: true, reason: `Arey Pi guardrail: path is protected: ${path}` };
|
|
25
|
+
if (isProtectedEnvPath(path)) {
|
|
26
|
+
return { block: true, reason: `Arey Pi guardrail: env file writes are protected: ${path}` };
|
|
81
27
|
}
|
|
82
28
|
|
|
83
|
-
if (!store.active) return undefined;
|
|
84
|
-
|
|
85
29
|
return undefined;
|
|
86
30
|
}
|
|
87
31
|
|
|
88
32
|
export function registerWorkflowRuntime(pi: ExtensionAPI): void {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (requestedAreyPi) activateHarness(pi, store, ctx);
|
|
100
|
-
|
|
101
|
-
return {
|
|
102
|
-
message: {
|
|
103
|
-
customType: "arey-pi-harness-context",
|
|
104
|
-
content: areyPiHarnessContext(event.prompt),
|
|
105
|
-
display: false,
|
|
106
|
-
details: { source: requestedAreyPi ? "natural-language" : "active-session" },
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
pi.on("tool_call", (event, ctx) => handleMutationGuardrails(store, event, ctx));
|
|
33
|
+
pi.on("before_agent_start", (event) => ({
|
|
34
|
+
message: {
|
|
35
|
+
customType: "arey-pi-harness-context",
|
|
36
|
+
content: areyPiHarnessContext(event.prompt),
|
|
37
|
+
display: false,
|
|
38
|
+
details: { source: "always-on" },
|
|
39
|
+
},
|
|
40
|
+
}));
|
|
41
|
+
|
|
42
|
+
pi.on("tool_call", (event) => handleMutationGuardrails(event));
|
|
112
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arey-pi",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "A Pi package for canonical Gherkin specs, non-negotiable TDD, spec synchronisation, AI harness readiness, and senior-quality software delivery.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alejandro Rey Leyva",
|