pi-aia-asf 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.1] - 2026-08-14
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Scale-based flow.** Every ASF activation is now classified **small** or **large**:
|
|
15
|
+
- **Small** (small features, minor bugfixes, small refactors) — runs **automatically**: no intake question barrage (at most one clarifying question), no research, no adversarial gate, no PLAN.md, no approval. State the intent, capture specs silently, implement test-first, verify, deliver.
|
|
16
|
+
- **Large** (new projects, significant features, major bugfixes, architectural refactors) — full gated flow unchanged: intake → research → specs → adversarial → PLAN.md → **explicit approval** → implementation → verification.
|
|
17
|
+
- When in doubt, **default to small and start working**; re-classify upward if the work grows.
|
|
18
|
+
- **`/asf small`** command — starts a small session directly in implementation phase. `/asf status` now shows the scale (`automatic — no gates` for small).
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- All gates (1–5) explicitly apply to large work only; Phase 2 (research) and Phase 5 (PLAN.md + approval) are skipped entirely for small work.
|
|
23
|
+
- References `01-intake`, `04-adversarial`, `05-plan` annotated with the scale rule.
|
|
24
|
+
- Anti-patterns: no question barrage or PLAN.md/approval demand for small work; when in doubt, start small.
|
|
25
|
+
|
|
26
|
+
|
|
10
27
|
## [0.2.0] - 2026-08-14
|
|
11
28
|
|
|
12
29
|
### Added
|
package/index.ts
CHANGED
|
@@ -30,8 +30,11 @@ type AsfPhase =
|
|
|
30
30
|
| "implementation"
|
|
31
31
|
| "verification";
|
|
32
32
|
|
|
33
|
+
type AsfScale = "small" | "large";
|
|
34
|
+
|
|
33
35
|
interface AsfState {
|
|
34
36
|
workType?: "new-project" | "feature" | "major-bugfix" | "refactor";
|
|
37
|
+
scale?: AsfScale;
|
|
35
38
|
phase: AsfPhase;
|
|
36
39
|
planApproved?: boolean;
|
|
37
40
|
startedAt?: string;
|
|
@@ -160,7 +163,7 @@ export default function register(pi: ExtensionAPI): void {
|
|
|
160
163
|
// Startup check: warn once per session if deps are missing (unless disabled)
|
|
161
164
|
// The extension loads at startup; log to console so it surfaces in logs.
|
|
162
165
|
|
|
163
|
-
const setPhase = async (ctx: ExtensionCommandContext, phase: AsfPhase, workType?: AsfState["workType"]): Promise<string> => {
|
|
166
|
+
const setPhase = async (ctx: ExtensionCommandContext, phase: AsfPhase, workType?: AsfState["workType"], scale?: AsfScale): Promise<string> => {
|
|
164
167
|
const project = projectName();
|
|
165
168
|
const state = await loadState(project);
|
|
166
169
|
const now = new Date().toISOString();
|
|
@@ -183,6 +186,7 @@ export default function register(pi: ExtensionAPI): void {
|
|
|
183
186
|
};
|
|
184
187
|
}
|
|
185
188
|
if (workType) state.current.workType = workType;
|
|
189
|
+
if (scale) state.current.scale = scale;
|
|
186
190
|
state.current.phase = phase;
|
|
187
191
|
state.current.updatedAt = now;
|
|
188
192
|
}
|
|
@@ -196,13 +200,15 @@ export default function register(pi: ExtensionAPI): void {
|
|
|
196
200
|
|
|
197
201
|
switch (sub) {
|
|
198
202
|
case "new":
|
|
199
|
-
return await setPhase(ctx, "intake", "new-project");
|
|
203
|
+
return await setPhase(ctx, "intake", "new-project", "large");
|
|
200
204
|
case "feature":
|
|
201
|
-
return await setPhase(ctx, "intake", "feature");
|
|
205
|
+
return await setPhase(ctx, "intake", "feature", "large");
|
|
202
206
|
case "bugfix":
|
|
203
|
-
return await setPhase(ctx, "intake", "major-bugfix");
|
|
207
|
+
return await setPhase(ctx, "intake", "major-bugfix", "large");
|
|
204
208
|
case "refactor":
|
|
205
|
-
return await setPhase(ctx, "intake", "refactor");
|
|
209
|
+
return await setPhase(ctx, "intake", "refactor", "large");
|
|
210
|
+
case "small":
|
|
211
|
+
return await setPhase(ctx, "implementation", undefined, "small");
|
|
206
212
|
case "status": {
|
|
207
213
|
const project = projectName();
|
|
208
214
|
const state = await loadState(project);
|
|
@@ -210,6 +216,7 @@ export default function register(pi: ExtensionAPI): void {
|
|
|
210
216
|
return (
|
|
211
217
|
`ASF status (${project}):\n` +
|
|
212
218
|
` work type: ${state.current.workType || "unset"}\n` +
|
|
219
|
+
` scale: ${state.current.scale || "unset"}${state.current.scale === "small" ? " (automatic — no gates)" : ""}\n` +
|
|
213
220
|
` phase: ${state.current.phase}\n` +
|
|
214
221
|
` plan approved: ${state.current.planApproved ? "yes" : "no"}\n` +
|
|
215
222
|
` started: ${state.current.startedAt || "?"}\n` +
|
|
@@ -236,10 +243,11 @@ export default function register(pi: ExtensionAPI): void {
|
|
|
236
243
|
default:
|
|
237
244
|
return (
|
|
238
245
|
"ASF commands:\n" +
|
|
239
|
-
" /asf new — start a new software project\n" +
|
|
240
|
-
" /asf feature — add a feature to an existing project\n" +
|
|
241
|
-
" /asf bugfix — major bugfix\n" +
|
|
242
|
-
" /asf refactor — architectural refactor\n" +
|
|
246
|
+
" /asf new — start a new software project (large, gated)\n" +
|
|
247
|
+
" /asf feature — add a feature to an existing project (large, gated)\n" +
|
|
248
|
+
" /asf bugfix — major bugfix (large, gated)\n" +
|
|
249
|
+
" /asf refactor — architectural refactor (large, gated)\n" +
|
|
250
|
+
" /asf small — small change, automatic (no gates)\n" +
|
|
243
251
|
" /asf status — show current phase\n" +
|
|
244
252
|
" /asf verify — run the definition-of-done QA gate\n" +
|
|
245
253
|
" /asf abort — end the current session\n\n" +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-aia-asf",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Ai Applied Agentic Software Factory — codifies the full software development flow: intake, research, spec capture, adversarial analysis, planning with approval gates, test-first implementation, and release. Requires pi-vigilant, pi-smart-web-search, pi-smart-fetch, and pi-aia-browser.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
package/skills/aia-asf/SKILL.md
CHANGED
|
@@ -4,15 +4,17 @@ description: >-
|
|
|
4
4
|
Agentic Software Factory — run a complete, disciplined software development
|
|
5
5
|
cycle. Use when the user wants to start a NEW software project, add a
|
|
6
6
|
SIGNIFICANT FEATURE to an existing project, perform a MAJOR BUGFIX, or do an
|
|
7
|
-
ARCHITECTURAL REFACTOR
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
ARCHITECTURAL REFACTOR — and also for SMALL software changes (small features,
|
|
8
|
+
minor bugfixes, small refactors), which run AUTOMATICALLY with no intake
|
|
9
|
+
questions, no PLAN.md, and no approval. LARGE work (new projects, significant
|
|
10
|
+
features, major bugfixes, architectural refactors) runs the full gated flow:
|
|
11
|
+
classify, ask until intent is clear, research SOTA and packages, capture hard
|
|
12
|
+
specifications (via capture_spec, shared with pi-vigilant), run adversarial
|
|
13
|
+
analysis, produce a PLAN.md and get explicit user approval, then implement
|
|
14
|
+
test-first with strict codebase isolation and mandatory browser testing of web
|
|
15
|
+
interfaces (pi-aia-browser). Do NOT activate for simple Q&A, one-line fixes,
|
|
16
|
+
casual conversation, content writing, or non-software tasks. When in doubt,
|
|
17
|
+
ask the user.
|
|
16
18
|
---
|
|
17
19
|
|
|
18
20
|
# AIA Agentic Software Factory (ASF)
|
|
@@ -28,24 +30,35 @@ You are running the **Ai Applied Agentic Software Factory**. This skill codifies
|
|
|
28
30
|
|
|
29
31
|
## Phase 0 — Classify the work (gate)
|
|
30
32
|
|
|
31
|
-
Determine the work type
|
|
33
|
+
Determine the work type **and scale**. If it is not ASF work, **do not run the factory** — just help normally.
|
|
32
34
|
|
|
33
|
-
| Work type | ASF? |
|
|
34
|
-
|
|
35
|
-
| New software project | ✅
|
|
36
|
-
| Significant feature
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
35
|
+
| Work type | ASF? | Scale | Flow |
|
|
36
|
+
|---|---|---|---|
|
|
37
|
+
| New software project | ✅ | **large** | full flow |
|
|
38
|
+
| Significant feature | ✅ | **large** | full flow (research: medium) |
|
|
39
|
+
| Small feature | ✅ | **small** | automatic |
|
|
40
|
+
| Major bugfix (multi-file, behavior change, needs tests) | ✅ | **large** | lighter flow (research optional) |
|
|
41
|
+
| Minor bugfix (one area, no contract change) | ✅ | **small** | automatic |
|
|
42
|
+
| Architectural refactor | ✅ | **large** | full flow (research: low) |
|
|
43
|
+
| Small refactor (renames, restructure of one module) | ✅ | **small** | automatic |
|
|
44
|
+
| Simple Q&A, one-liner fix, casual talk, docs-only | ❌ | — | — |
|
|
45
|
+
| Non-software tasks (LinkedIn, research-only, writing) | ❌ | — | — |
|
|
46
|
+
|
|
47
|
+
**Scale rule — the core behavior difference:**
|
|
48
|
+
|
|
49
|
+
- **Large work** runs the full gated flow: intake questions → research → specs → adversarial → PLAN.md → **explicit approval** → implementation → verification.
|
|
50
|
+
- **Small work runs automatically**: no intake question barrage (at most ONE clarifying question, only if truly ambiguous), no research, no PLAN.md, no approval gate. State the intent in one or two sentences, capture specs, implement test-first, verify, deliver. Do not ask permission to start; do not stop for sign-off. If it turns out to be larger than expected mid-way, re-classify, say so, and switch to the full flow with approval.
|
|
51
|
+
- When in doubt about scale, **default to small and start working** — the user prefers action over questions. Re-classify upward if the work grows.
|
|
41
52
|
|
|
42
53
|
If the user's request is ambiguous, **ask** before starting. State the classification explicitly:
|
|
43
|
-
`ASF: <new-project|feature|major-bugfix|refactor> — starting Phase 1 (intake).`
|
|
54
|
+
`ASF: <new-project|feature|major-bugfix|refactor> <large|small> — starting Phase 1 (intake).`
|
|
44
55
|
|
|
45
56
|
---
|
|
46
57
|
|
|
47
58
|
## Phase 1 — Intake: ask until it's clear (gate)
|
|
48
59
|
|
|
60
|
+
> **Scale check — applies to LARGE work only.** For **small** work: skip the question bank. If the request is clear enough to act, state your understanding in one or two sentences and proceed immediately. Ask at most ONE clarifying question, and only when genuinely ambiguous.
|
|
61
|
+
|
|
49
62
|
The factory **keeps asking until all is clear**. Never start planning or implementation on guesses.
|
|
50
63
|
|
|
51
64
|
Minimum intake checklist (ask anything not yet known, one question at a time or a short batch):
|
|
@@ -60,12 +73,14 @@ Minimum intake checklist (ask anything not yet known, one question at a time or
|
|
|
60
73
|
|
|
61
74
|
For each answer, **capture hard requirements immediately with `capture_spec`** (requirement, area, priority). Specs are the shared contract with pi-vigilant — it will re-verify them at the end.
|
|
62
75
|
|
|
63
|
-
**Gate 1
|
|
76
|
+
**Gate 1** (large only): You may only leave intake when the user has confirmed the summary of intent (restate it back in 3–5 bullet points and ask "is this correct?"). Small work does not pass through this gate.
|
|
64
77
|
|
|
65
78
|
---
|
|
66
79
|
|
|
67
80
|
## Phase 2 — Research: SOTA and packages (adaptive depth)
|
|
68
81
|
|
|
82
|
+
> **Small work skips research entirely.** If implementation needs a library you don't know, a single quick search is enough — no research summary, no Gate 2.
|
|
83
|
+
|
|
69
84
|
| Work type | Research depth |
|
|
70
85
|
|---|---|
|
|
71
86
|
| New project | **Mandatory, full** — SOTA approaches, frameworks, existing packages, reference implementations |
|
|
@@ -80,7 +95,7 @@ Research method (use `web_search` + `web_fetch`/`batch_web_fetch`):
|
|
|
80
95
|
4. **Cite sources** in the research summary — every claim about a package/library gets a URL
|
|
81
96
|
5. Summarize findings + a **recommendation** (which approach, which packages, with rationale)
|
|
82
97
|
|
|
83
|
-
**Gate 2
|
|
98
|
+
**Gate 2** (large only): present the research summary + recommendation to the user. Ask: "proceed with this approach, or adjust?" Do not enter planning until the approach is agreed.
|
|
84
99
|
|
|
85
100
|
---
|
|
86
101
|
|
|
@@ -94,12 +109,14 @@ Turn the intake answers + research into the authoritative spec set.
|
|
|
94
109
|
4. Default priority is `must`; use `should` only when the user says "nice to have".
|
|
95
110
|
5. Areas: functionality, ui-ux, performance, security, error-handling, testing, documentation, compatibility, constraints, format, data, deployment, other.
|
|
96
111
|
|
|
97
|
-
**Gate 3
|
|
112
|
+
**Gate 3** (large only): show the full spec tree (`get_task_specs`) and get user sign-off: "specs correct — proceed to adversarial analysis?" Small work: capture specs silently, no sign-off needed.
|
|
98
113
|
|
|
99
114
|
---
|
|
100
115
|
|
|
101
116
|
## Phase 4 — Adversarial analysis (gate)
|
|
102
117
|
|
|
118
|
+
> **Small work:** skip the formal gate. Do a quick mental pass over edge cases and failure modes while implementing; if something real surfaces, fix it or capture a spec. No user checkpoint.
|
|
119
|
+
|
|
103
120
|
Challenge the plan like a hostile reviewer before committing to it. For each spec and the overall design, ask and resolve:
|
|
104
121
|
|
|
105
122
|
- **Edge cases** — empty input, zero users, max load, missing data, concurrency
|
|
@@ -112,12 +129,14 @@ Challenge the plan like a hostile reviewer before committing to it. For each spe
|
|
|
112
129
|
|
|
113
130
|
For each finding: either capture a new spec, refine an existing one (supersede), or record the decision to accept the risk. **Ask the user about anything that changes scope.**
|
|
114
131
|
|
|
115
|
-
**Gate 4
|
|
132
|
+
**Gate 4** (large only): summarize adversarial findings + resolutions, get user confirmation.
|
|
116
133
|
|
|
117
134
|
---
|
|
118
135
|
|
|
119
136
|
## Phase 5 — Plan + approval gate
|
|
120
137
|
|
|
138
|
+
> **Small work: SKIP this phase entirely.** No PLAN.md, no approval — go straight to Phase 6 (implementation).
|
|
139
|
+
|
|
121
140
|
Write `PLAN.md` in the project root (repo root, or cwd if no repo). Structure:
|
|
122
141
|
|
|
123
142
|
```markdown
|
|
@@ -136,10 +155,10 @@ Write `PLAN.md` in the project root (repo root, or cwd if no repo). Structure:
|
|
|
136
155
|
|
|
137
156
|
Keep the plan **implementation-ready**: any competent engineer (or agent) can execute the task list without re-deriving decisions.
|
|
138
157
|
|
|
139
|
-
**Gate 5 — MANDATORY user approval**: present the plan and ask explicitly:
|
|
158
|
+
**Gate 5 — MANDATORY user approval (large only)**: present the plan and ask explicitly:
|
|
140
159
|
> "Plan ready. Do you approve starting implementation? (yes / changes needed)"
|
|
141
160
|
|
|
142
|
-
**Never start implementing before Gate 5 passes.** If the user says "go" without reading, still show the plan and confirm.
|
|
161
|
+
**Never start implementing before Gate 5 passes — for LARGE work.** If the user says "go" without reading, still show the plan and confirm. Small work never reaches this gate.
|
|
143
162
|
|
|
144
163
|
---
|
|
145
164
|
|
|
@@ -201,6 +220,9 @@ Run the **Definition of Done checklist** in `references/06b-testing-qa.md` (Rule
|
|
|
201
220
|
- ❌ Guessing at a fix before reading the actual error message
|
|
202
221
|
- ❌ Fixing a bug without adding a regression test
|
|
203
222
|
- ❌ Claiming something was verified when it was assumed
|
|
223
|
+
- ❌ Asking a barrage of intake questions for small work — small runs automatically
|
|
224
|
+
- ❌ Writing PLAN.md / demanding approval for small work — that's the large-work gate only
|
|
225
|
+
- ❌ Waiting for sign-off when the work is small; when in doubt, default to small and start
|
|
204
226
|
|
|
205
227
|
## References
|
|
206
228
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Phase 1 — Intake: Question Bank
|
|
2
2
|
|
|
3
|
+
> **Scale note: this bank is for LARGE work.** Small work (small features, minor
|
|
4
|
+
> bugfixes, small refactors) skips the questions — state understanding in 1–2
|
|
5
|
+
> sentences and start. At most ONE clarifying question, only if genuinely ambiguous.
|
|
6
|
+
|
|
3
7
|
Keep asking until the user confirms. One question at a time is fine; short batches (3–5) are faster. Do not proceed on guesses.
|
|
4
8
|
|
|
5
9
|
## Starter questions
|
|
@@ -32,3 +36,5 @@ Every concrete requirement the user states → `capture_spec` immediately, befor
|
|
|
32
36
|
## Intake gate
|
|
33
37
|
|
|
34
38
|
Restate intent in 3–5 bullets, then ask: **"Is this correct?"** Only proceed on an explicit yes.
|
|
39
|
+
|
|
40
|
+
> Large work only. Small work has no intake gate.
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Phase 4 — Adversarial Analysis Checklist
|
|
2
2
|
|
|
3
|
+
> **Scale note: the full checklist and gate apply to LARGE work.** Small work does
|
|
4
|
+
> a quick mental pass on edge cases and failure modes while implementing — no
|
|
5
|
+
> formal review, no user checkpoint.
|
|
6
|
+
|
|
3
7
|
Challenge every spec and design decision like a hostile reviewer. For each item, determine: capture a new spec / supersede an existing one / accept the risk (recorded).
|
|
4
8
|
|
|
5
9
|
## Per-spec questions
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Phase 5 — PLAN.md Template
|
|
2
2
|
|
|
3
|
+
> **Scale note: this phase is for LARGE work only.** Small work skips PLAN.md and
|
|
4
|
+
> the approval gate entirely — implement directly.
|
|
5
|
+
|
|
3
6
|
Write `PLAN.md` in the project root. It must be executable by any competent engineer without re-deriving decisions.
|
|
4
7
|
|
|
5
8
|
```markdown
|
|
@@ -54,7 +57,7 @@ From adversarial analysis. Each risk: likelihood, impact, mitigation, owner.
|
|
|
54
57
|
Explicitly cut items (so nobody re-adds them).
|
|
55
58
|
```
|
|
56
59
|
|
|
57
|
-
## Approval gate (MANDATORY)
|
|
60
|
+
## Approval gate (MANDATORY — large work only)
|
|
58
61
|
|
|
59
62
|
Present the plan and ask:
|
|
60
63
|
|