gentle-pi 0.4.0 → 0.4.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 +24 -12
- package/assets/agents/sdd-proposal.md +13 -0
- package/assets/chains/sdd-full.chain.md +7 -3
- package/assets/chains/sdd-plan.chain.md +6 -2
- package/assets/orchestrator.md +7 -1
- package/lib/sdd-preflight.ts +11 -0
- package/package.json +1 -1
- package/scripts/verify-package-files.mjs +9 -0
- package/skills/comment-writer/SKILL.md +7 -7
- package/tests/artifact-language.test.ts +80 -1
package/README.md
CHANGED
|
@@ -45,10 +45,10 @@ Most coding-agent sessions fail for operational reasons, not model reasons:
|
|
|
45
45
|
|
|
46
46
|
| Capability | What it does |
|
|
47
47
|
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
48
|
-
| **el Gentleman persona** | Makes Pi behave like a senior architect and teacher, not a generic chatbot. Spanish responses use Rioplatense voseo by default.
|
|
49
|
-
| **
|
|
48
|
+
| **el Gentleman persona** | Makes Pi behave like a senior architect and teacher, not a generic chatbot. Spanish responses use Rioplatense voseo by default; neutral mode is saved globally with project overrides. |
|
|
49
|
+
| **Configurable startup intro** | Adds a rose/text-logo startup intro, compact runtime panel, color presets, and commands to hide or show the decorative parts. |
|
|
50
50
|
| **Work routing discipline** | Small tasks stay inline. Context-heavy exploration can be delegated. Large or risky changes go through SDD/OpenSpec. |
|
|
51
|
-
| **SDD/OpenSpec assets** | Installs phase agents and chains for `init`, `explore`, `proposal`, `spec`, `design`, `tasks`, `apply`, `verify`, and `archive`.
|
|
51
|
+
| **SDD/OpenSpec assets** | Installs phase agents and chains for `init`, `onboard`, `explore`, `proposal`, `spec`, `design`, `tasks`, `apply`, `verify`, `sync`, and `archive`. |
|
|
52
52
|
| **Lazy SDD preflight** | Asks once per session for SDD mode, artifact store, PR chaining strategy, and review budget before the first SDD flow. |
|
|
53
53
|
| **Subagent orchestration** | Keeps one parent session responsible while child agents explore, implement, test, or review with focused context. |
|
|
54
54
|
| **Strict TDD support** | When project config declares a test command, apply/verify phases must record RED → GREEN → TRIANGULATE → REFACTOR evidence. |
|
|
@@ -56,7 +56,7 @@ Most coding-agent sessions fail for operational reasons, not model reasons:
|
|
|
56
56
|
| **Per-agent model assignment** | Pi-native modal for assigning stronger or cheaper models to specific SDD/custom agents. |
|
|
57
57
|
| **Skill discovery registry** | Maintains `.atl/skill-registry.md` from project and user skills so review/comment/PR workflows do not silently miss the right skill. |
|
|
58
58
|
| **Delivery skills** | Includes issue-first PRs, chained PRs, work-unit commits, cognitive docs, comment writing, and Judgment Day review. |
|
|
59
|
-
| **
|
|
59
|
+
| **Runtime safety** | Blocks destructive shell commands, asks for confirmation for sensitive operations, and blocks direct read/write/edit access to sensitive paths. |
|
|
60
60
|
|
|
61
61
|
## Install
|
|
62
62
|
|
|
@@ -88,10 +88,12 @@ pi
|
|
|
88
88
|
|
|
89
89
|
```text
|
|
90
90
|
/gentle-ai:status Check package, SDD assets, OpenSpec, and global model config.
|
|
91
|
+
/gentle-ai:doctor Run read-only diagnostics for SDD assets, config, tools, and guards.
|
|
91
92
|
/gentle-ai:sdd-preflight Run or reuse the session SDD preflight explicitly.
|
|
92
93
|
/sdd-init Create or refresh openspec/config.yaml.
|
|
93
94
|
/gentle:models Assign global model/effort routing to SDD/custom agents.
|
|
94
95
|
/gentle:persona Switch between gentleman and neutral persona modes.
|
|
96
|
+
/gentle:banner Configure startup rose, text logo, and color preset.
|
|
95
97
|
```
|
|
96
98
|
|
|
97
99
|
Typical flow:
|
|
@@ -315,13 +317,19 @@ Delegation contract:
|
|
|
315
317
|
| `gentleman` | Senior architect, teacher, direct technical feedback, Rioplatense Spanish/voseo when the user writes Spanish. |
|
|
316
318
|
| `neutral` | Same discipline, warmer professional language, no regional expression. |
|
|
317
319
|
|
|
318
|
-
Saved at:
|
|
320
|
+
Saved globally at:
|
|
321
|
+
|
|
322
|
+
```text
|
|
323
|
+
~/.pi/gentle-ai/persona.json
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
A project can still override the global default with:
|
|
319
327
|
|
|
320
328
|
```text
|
|
321
329
|
.pi/gentle-ai/persona.json
|
|
322
330
|
```
|
|
323
331
|
|
|
324
|
-
Run `/reload` or start a new Pi session after switching persona.
|
|
332
|
+
`/gentle:persona` writes the global config and updates an existing project override when one is present, so the current project does not stay stale. Run `/reload` or start a new Pi session after switching persona.
|
|
325
333
|
|
|
326
334
|
## Model and effort assignment
|
|
327
335
|
|
|
@@ -376,8 +384,9 @@ Legacy string entries are still accepted and treated as `model`-only config.
|
|
|
376
384
|
| Command | What it does |
|
|
377
385
|
| -------------------------------- | ------------------------------------------------------------------- |
|
|
378
386
|
| `/gentle-ai:status` | Shows package, SDD asset, OpenSpec, and global model config status. |
|
|
379
|
-
| `/gentle:
|
|
380
|
-
| `/gentle:
|
|
387
|
+
| `/gentle-ai:doctor` | Runs read-only diagnostics for SDD assets, model/persona config, memory tools, and safety guards. |
|
|
388
|
+
| `/gentle:models` | Opens global model + effort assignment UI. Press `x` to export and `r` to restore saved routing. |
|
|
389
|
+
| `/gentle:persona` | Switches global persona mode, with project override support. |
|
|
381
390
|
| `/gentle:banner` | Configures startup banner rose, text logo, and color preset. |
|
|
382
391
|
| `/gentle:toggle-rose` | Toggles the startup rose. |
|
|
383
392
|
| `/gentle:toggle-text-logo` | Toggles the startup text logo. |
|
|
@@ -385,7 +394,6 @@ Legacy string entries are still accepted and treated as `model`-only config.
|
|
|
385
394
|
| `/sdd-init` | Initializes or refreshes `openspec/config.yaml`. |
|
|
386
395
|
| `/gentle-ai:install-sdd` | Repairs missing global SDD runtime assets without overwriting files. |
|
|
387
396
|
| `/gentle-ai:install-sdd --force` | Force-refreshes installed global SDD assets. |
|
|
388
|
-
|
|
389
397
|
| `/skill-registry:refresh` | Regenerates `.atl/skill-registry.md`. |
|
|
390
398
|
|
|
391
399
|
Package-owned global SDD runtime assets are also refreshed automatically on session start when `gentle-pi` changes. Project-local `.pi/agents` and `.pi/chains` remain manual overrides and are never overwritten by startup refresh.
|
|
@@ -407,6 +415,10 @@ Compatibility aliases:
|
|
|
407
415
|
/gentleman:models
|
|
408
416
|
/gentle-ai:persona
|
|
409
417
|
/gentleman:persona
|
|
418
|
+
/gentle-ai:banner
|
|
419
|
+
/gentle-ai:toggle-rose
|
|
420
|
+
/gentle-ai:toggle-text-logo
|
|
421
|
+
/gentle-ai:banner-color
|
|
410
422
|
```
|
|
411
423
|
|
|
412
424
|
## Included skills
|
|
@@ -443,10 +455,10 @@ Memory contract for SDD delegation:
|
|
|
443
455
|
|
|
444
456
|
| Path | Purpose |
|
|
445
457
|
| ------------------------------ | ---------------------------------------------------------------------------------------------------------- |
|
|
446
|
-
| `extensions/gentle-ai.ts` | Injects identity,
|
|
447
|
-
| `extensions/startup-banner.ts` | Shows the
|
|
458
|
+
| `extensions/gentle-ai.ts` | Injects identity, auto-refreshes global SDD assets, registers commands, applies model/persona config, exports/restores model routing, and enforces runtime safety. |
|
|
459
|
+
| `extensions/startup-banner.ts` | Shows and configures the startup intro, color presets, compact runtime panel, and collaboration credit. |
|
|
448
460
|
| `extensions/sdd-init.ts` | Registers `/sdd-init` for OpenSpec initialization. |
|
|
449
|
-
| `extensions/skill-registry.ts` | Maintains `.atl/skill-registry.md` from project/user skills.
|
|
461
|
+
| `extensions/skill-registry.ts` | Maintains `.atl/skill-registry.md` from project/user skills and closes file watchers on shutdown. |
|
|
450
462
|
| `assets/orchestrator.md` | Parent-session orchestration contract. |
|
|
451
463
|
| `assets/agents/` | SDD agents installed as global Pi runtime assets. |
|
|
452
464
|
| `assets/chains/` | SDD chains installed as global Pi runtime assets. |
|
|
@@ -13,6 +13,19 @@ Use your assigned executor/phase skill for this SDD phase. For project/user skil
|
|
|
13
13
|
If skill paths are missing, explicit fallback loading is allowed only as degraded self-healing. Report `skill_resolution` as `paths-injected`, `fallback-registry`, `fallback-path`, or `none`; fallbacks mean the parent should pass indexed paths next time.
|
|
14
14
|
|
|
15
15
|
- Read exploration and project standards before writing.
|
|
16
|
+
- In interactive SDD mode, do not make the agent decide silently whether the proposal is "clear enough". Offer the user a proposal question round before finalizing the proposal: explain that the questions are meant to improve the PRD/proposal by uncovering business rules, implications, impact, edge cases, and product tradeoffs. Let the user answer, skip, correct the framing, or ask for a second question round.
|
|
17
|
+
- Proposal-shaping questions should uncover business/product/PRD understanding, not harness mechanics. Cover the smallest useful subset of:
|
|
18
|
+
1. business problem: what pain, opportunity, user confusion, or operational cost makes this change worth doing now;
|
|
19
|
+
2. target users and situations: who is affected, in which workflow, at what moment, and with what level of urgency;
|
|
20
|
+
3. business rules: policies, permissions, thresholds, lifecycle rules, compliance/security expectations, or domain invariants the proposal must respect;
|
|
21
|
+
4. product outcome: what should feel, work, or become possible after the change;
|
|
22
|
+
5. current-state gap: what is wrong, inconsistent, missing, ad hoc, or hard to explain today;
|
|
23
|
+
6. implications and impact: which teams, workflows, data, UX expectations, support burden, or operational processes may be affected;
|
|
24
|
+
7. edge cases: empty states, partial data, failures, permissions, slow paths, unusual customers, migration states, or conflicting user needs;
|
|
25
|
+
8. decision gaps: which product unknowns would make the proposal ambiguous, risky, or easy to overbuild;
|
|
26
|
+
9. scope boundaries and non-goals: what belongs in the first product slice, what is later refinement, and what must stay unchanged even if related;
|
|
27
|
+
10. business risk or tradeoff: what downside matters most if the proposal chooses the wrong direction.
|
|
28
|
+
- Prefer 3–5 concrete product questions per round. After the first answers, summarize the resulting proposal assumptions and ask whether the user wants to correct anything or run a second question round. Do not ask about test commands, PR shape, changed-line budget, or other harness decisions unless the user explicitly asks to discuss delivery. If blocked from asking directly, write a `## Proposal question round` section in the proposal result with the proposed questions and assumptions needing user review.
|
|
16
29
|
- Write `openspec/changes/{change}/proposal.md`.
|
|
17
30
|
- Include intent, scope, affected areas, risks, rollback, and success criteria.
|
|
18
31
|
- Do NOT launch child subagents. Parent/orchestrator owns delegation.
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sdd-full
|
|
3
|
-
description: Run the full SDD lifecycle for a change
|
|
3
|
+
description: Run the full SDD lifecycle for a change in auto mode or explicit full-lifecycle approval.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
## Interactive mode guard
|
|
7
|
+
|
|
8
|
+
This chain is a continuous lifecycle pipeline. Use it only in auto mode or explicit full-lifecycle approval. In interactive mode the parent/orchestrator must stop at each phase boundary, present the current artifact, and ask the user before continuing. Approval to start SDD is not approval of the generated proposal, specs, design, tasks, apply, verify, sync, or archive phases.
|
|
9
|
+
|
|
6
10
|
## sdd-init
|
|
7
11
|
|
|
8
12
|
output: init.md
|
|
@@ -27,7 +31,7 @@ output: proposal.md
|
|
|
27
31
|
outputMode: file-only
|
|
28
32
|
progress: true
|
|
29
33
|
|
|
30
|
-
Create or update the OpenSpec proposal for {task} using the exploration notes and the previous step output.
|
|
34
|
+
Create or update the OpenSpec proposal for {task} using the exploration notes and the previous step output. If this is an interactive SDD run and the parent has not already supplied proposal-shaping answers, surface the missing questions in the result so the parent can ask before treating the proposal as approved.
|
|
31
35
|
|
|
32
36
|
## sdd-spec
|
|
33
37
|
|
|
@@ -36,7 +40,7 @@ output: spec.md
|
|
|
36
40
|
outputMode: file-only
|
|
37
41
|
progress: true
|
|
38
42
|
|
|
39
|
-
Write delta specs for {task} from the approved proposal. Preserve RFC 2119 requirements and Given/When/Then scenarios.
|
|
43
|
+
Write delta specs for {task} from the parent-approved proposal. Preserve RFC 2119 requirements and Given/When/Then scenarios. In interactive mode, do not treat chain execution alone as proposal approval.
|
|
40
44
|
|
|
41
45
|
## sdd-design
|
|
42
46
|
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sdd-plan
|
|
3
|
-
description: Plan an SDD change through proposal, spec, design, and tasks.
|
|
3
|
+
description: Plan an SDD change through proposal, spec, design, and tasks; safe for auto mode or explicit all-planning approval.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
## Interactive mode guard
|
|
7
|
+
|
|
8
|
+
This chain is a continuous planning pipeline. Use it only in auto mode or explicit all-planning approval. In interactive mode the parent/orchestrator must stop after sdd-proposal, present the proposal, and ask the user before continuing to sdd-spec, sdd-design, and sdd-tasks.
|
|
9
|
+
|
|
6
10
|
## sdd-init
|
|
7
11
|
|
|
8
12
|
output: init.md
|
|
@@ -18,7 +22,7 @@ output: proposal.md
|
|
|
18
22
|
outputMode: file-only
|
|
19
23
|
progress: true
|
|
20
24
|
|
|
21
|
-
Create or update the OpenSpec proposal for {task}. Use prior exploration if it is available in the project artifacts.
|
|
25
|
+
Create or update the OpenSpec proposal for {task}. Use prior exploration if it is available in the project artifacts. If this is an interactive SDD run and the parent has not already supplied proposal-shaping answers, surface the missing questions in the result so the parent can ask before treating the proposal as approved.
|
|
22
26
|
|
|
23
27
|
## sdd-spec
|
|
24
28
|
|
package/assets/orchestrator.md
CHANGED
|
@@ -31,7 +31,9 @@ User-facing conversation should stay in the user's language and follow the curre
|
|
|
31
31
|
|
|
32
32
|
Subagent-facing prompts should be written in English by default, even when the user speaks Spanish. Translate the user's request into concise English before delegation. This keeps token usage lower and gives built-in/project subagents a consistent operating language without changing the user-facing persona.
|
|
33
33
|
|
|
34
|
-
Generated artifacts — whether by the parent inline or by subagents — (code, UI copy,
|
|
34
|
+
Generated technical artifacts — whether by the parent inline or by subagents — (code, code comments, UI copy, identifiers, commit messages, filenames, PR descriptions, tests, fixtures, SDD/OpenSpec files, delegated phase outputs, and repository-facing documentation) default to English, regardless of the user's conversation language or active persona. Override only when the user explicitly requests another language for that artifact, or when extending a project whose existing convention is non-English.
|
|
35
|
+
|
|
36
|
+
Public/contextual comments and replies are different from technical artifacts. When using `comment-writer` or drafting a human-facing GitHub, PR review, Slack, Discord, or async comment, write in the target context language by default. Spanish issue/thread -> Spanish comment. English thread -> English comment. Mixed context -> target message language. Explicit user language or tone override wins. Spanish comments default to neutral/professional Spanish unless the user or target context clearly calls for regional tone.
|
|
35
37
|
|
|
36
38
|
Exceptions:
|
|
37
39
|
|
|
@@ -247,6 +249,10 @@ In interactive mode, between phases:
|
|
|
247
249
|
2. state next phase;
|
|
248
250
|
3. ask whether to continue or adjust.
|
|
249
251
|
|
|
252
|
+
Interactive approval is phase-scoped. A user response such as "continue", "dale", or "go on" approves only the immediate next phase, not the rest of the SDD pipeline. Do not treat a generated artifact as approved until the user has had a chance to review or explicitly delegate that review.
|
|
253
|
+
|
|
254
|
+
Before `sdd-proposal` in interactive mode, offer the user a proposal question round instead of silently deciding whether the proposal is clear enough. Explain that the questions are meant to improve the PRD/proposal by uncovering business understanding, business rules, implications, impact, edge cases, and product tradeoffs. Prefer 3–5 concrete product questions per round, then summarize the resulting assumptions and ask whether the user wants to correct anything or run a second question round. Cover business/product/PRD decisions: business problem, target users and situations, business rules, product outcome, current-state gap, implications and impact, edge cases, decision gaps, first-slice scope boundaries, non-goals, product constraints, and business tradeoffs. Do not ask about test commands, PR shape, changed-line budget, or other harness mechanics at proposal time unless the user explicitly asks to discuss delivery.
|
|
255
|
+
|
|
250
256
|
## Result Contract
|
|
251
257
|
|
|
252
258
|
Every phase result should include:
|
package/lib/sdd-preflight.ts
CHANGED
|
@@ -235,6 +235,16 @@ export function renderSddPreflightPrompt(prefs: SddPreflightPreferences): string
|
|
|
235
235
|
const sourceLine = prefs.prompted
|
|
236
236
|
? "The user already chose these SDD preferences for this Pi session. Reuse them unless the user explicitly changes them."
|
|
237
237
|
: "No interactive UI was available for SDD preflight, so these default preferences were applied for this Pi session. Ask the user before making delivery decisions that depend on them.";
|
|
238
|
+
const interactiveRules =
|
|
239
|
+
prefs.executionMode === "interactive"
|
|
240
|
+
? [
|
|
241
|
+
"- Interactive phase gate: complete only the current SDD phase. Do not start the next SDD phase unless the current user turn explicitly approves that next phase.",
|
|
242
|
+
"- In interactive mode, words like `continue`, `dale`, or `go on` approve only the immediate next phase, not all remaining phases.",
|
|
243
|
+
"- Before writing an SDD proposal in interactive mode, offer the user a proposal question round to improve the PRD/proposal by uncovering business rules, implications, impact, edge cases, product tradeoffs, and decision gaps. Prefer 3–5 concrete product questions per round, then summarize assumptions and ask whether the user wants corrections or a second question round. Do not ask about test commands, PR shape, changed-line budget, or other harness mechanics at proposal time unless the user explicitly asks to discuss delivery.",
|
|
244
|
+
]
|
|
245
|
+
: [
|
|
246
|
+
"- Auto mode: phases may run back-to-back only because the user chose speed and trusts the flow.",
|
|
247
|
+
];
|
|
238
248
|
return [
|
|
239
249
|
"## SDD Session Preflight",
|
|
240
250
|
sourceLine,
|
|
@@ -242,6 +252,7 @@ export function renderSddPreflightPrompt(prefs: SddPreflightPreferences): string
|
|
|
242
252
|
`- Artifact store: ${prefs.artifactStore}${prefs.engramAvailable ? "" : " (Engram unavailable in this session)"}`,
|
|
243
253
|
`- Chained PR strategy: ${prefs.chainedPrStrategy}`,
|
|
244
254
|
`- Review budget: ${prefs.reviewBudgetLines} changed lines`,
|
|
255
|
+
...interactiveRules,
|
|
245
256
|
"- If task/workload forecasts conflict with these preferences, pause before sdd-apply and ask the user for a delivery decision.",
|
|
246
257
|
].join("\n");
|
|
247
258
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gentle-pi",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Turn Pi into el Gentleman: a senior-architect development harness with SDD/OpenSpec, subagents, strict TDD evidence, review guardrails, and skill discovery.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -6,6 +6,7 @@ import { fileURLToPath } from "node:url";
|
|
|
6
6
|
const root = join(fileURLToPath(new URL("..", import.meta.url)));
|
|
7
7
|
|
|
8
8
|
const requiredPaths = [
|
|
9
|
+
"assets/orchestrator.md",
|
|
9
10
|
"assets/agents/sdd-apply.md",
|
|
10
11
|
"assets/agents/sdd-archive.md",
|
|
11
12
|
"assets/agents/sdd-design.md",
|
|
@@ -30,7 +31,15 @@ const requiredPaths = [
|
|
|
30
31
|
"prompts/gis.md",
|
|
31
32
|
"prompts/gpr.md",
|
|
32
33
|
"prompts/gwr.md",
|
|
34
|
+
"skills/branch-pr/SKILL.md",
|
|
35
|
+
"skills/chained-pr/SKILL.md",
|
|
36
|
+
"skills/cognitive-doc-design/SKILL.md",
|
|
37
|
+
"skills/comment-writer/SKILL.md",
|
|
33
38
|
"skills/gentle-ai/SKILL.md",
|
|
39
|
+
"skills/issue-creation/SKILL.md",
|
|
40
|
+
"skills/judgment-day/SKILL.md",
|
|
41
|
+
"skills/release/SKILL.md",
|
|
42
|
+
"skills/skill-registry/SKILL.md",
|
|
34
43
|
"skills/work-unit-commits/SKILL.md",
|
|
35
44
|
];
|
|
36
45
|
|
|
@@ -27,7 +27,7 @@ Use it for:
|
|
|
27
27
|
| Keep it short | Prefer 1 to 3 short paragraphs or a tight bullet list. |
|
|
28
28
|
| Explain why | Give the technical reason when asking for a change. |
|
|
29
29
|
| Avoid pile-ons | Comment on the highest-value issue, not every tiny preference. |
|
|
30
|
-
| Match
|
|
30
|
+
| Match target context language | Write in the target context language by default: Spanish issue/thread -> Spanish comment, English issue/thread -> English comment, mixed context -> target message language. If the user explicitly requests a language or tone, follow that request. Do not use the active persona as the source of truth for public comments. For Spanish comments, use neutral/professional Spanish by default unless the user or target context clearly calls for regional tone. |
|
|
31
31
|
| No em dashes | Use commas, periods, or parentheses instead. |
|
|
32
32
|
|
|
33
33
|
## Comment Formula
|
|
@@ -45,25 +45,25 @@ Use it for:
|
|
|
45
45
|
### Request change
|
|
46
46
|
|
|
47
47
|
```markdown
|
|
48
|
-
|
|
48
|
+
Good approach overall. I'd split this into a separate commit because it mixes validation logic with UI wiring.
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
That keeps the reviewer's focus narrower and makes rollback cleaner if the integration fails.
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
### Approve with a note
|
|
54
54
|
|
|
55
55
|
```markdown
|
|
56
|
-
|
|
56
|
+
Approved. The scope is clear and the change is well-contained.
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
For the next PR, add links to the previous and following PRs so the chain stays navigable.
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
### Ask for split
|
|
62
62
|
|
|
63
63
|
```markdown
|
|
64
|
-
|
|
64
|
+
This PR exceeds the 400-line budget, so we need to split it or justify `size:exception`.
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
Suggested order: foundation + tests first, then integration, then docs. That gives each review a clear start and end.
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
## Commands
|
|
@@ -49,7 +49,14 @@ test("orchestrator keeps conversation language separate from generated artifact
|
|
|
49
49
|
);
|
|
50
50
|
assert.match(
|
|
51
51
|
orchestrator,
|
|
52
|
-
/Generated artifacts[\s\S]*default to English, regardless of the user's conversation language/,
|
|
52
|
+
/Generated technical artifacts[\s\S]*default to English, regardless of the user's conversation language or active persona/,
|
|
53
|
+
);
|
|
54
|
+
for (const artifactScope of ["code comments", "tests", "fixtures", "delegated phase outputs"]) {
|
|
55
|
+
assert.match(orchestrator, new RegExp(artifactScope));
|
|
56
|
+
}
|
|
57
|
+
assert.match(
|
|
58
|
+
orchestrator,
|
|
59
|
+
/Public\/contextual comments and replies[\s\S]*target context language by default/,
|
|
53
60
|
);
|
|
54
61
|
});
|
|
55
62
|
|
|
@@ -66,11 +73,51 @@ test("rendered SDD preflight prompt is English artifact copy", () => {
|
|
|
66
73
|
|
|
67
74
|
assert.match(prompt, /The user already chose these SDD preferences/);
|
|
68
75
|
assert.match(prompt, /Review budget: 400 changed lines/);
|
|
76
|
+
assert.match(prompt, /complete only the current SDD phase/i);
|
|
77
|
+
assert.match(prompt, /Do not start the next SDD phase/i);
|
|
78
|
+
assert.match(prompt, /approve only the immediate next phase/i);
|
|
79
|
+
assert.match(prompt, /offer the user a proposal question round/i);
|
|
80
|
+
assert.match(prompt, /business rules, implications, impact, edge cases/i);
|
|
81
|
+
assert.match(prompt, /second question round/i);
|
|
69
82
|
for (const pattern of SPANISH_PREFLIGHT_COPY) {
|
|
70
83
|
assert.doesNotMatch(prompt, pattern);
|
|
71
84
|
}
|
|
72
85
|
});
|
|
73
86
|
|
|
87
|
+
test("SDD proposal questions focus on business and PRD gaps", async () => {
|
|
88
|
+
const proposalAgent = await readFile(join(ROOT, "assets/agents/sdd-proposal.md"), "utf8");
|
|
89
|
+
|
|
90
|
+
assert.match(proposalAgent, /offer the user a proposal question round/i);
|
|
91
|
+
assert.match(proposalAgent, /second question round/i);
|
|
92
|
+
assert.match(proposalAgent, /business problem/i);
|
|
93
|
+
assert.match(proposalAgent, /business rules/i);
|
|
94
|
+
assert.match(proposalAgent, /implications and impact/i);
|
|
95
|
+
assert.match(proposalAgent, /edge cases/i);
|
|
96
|
+
assert.match(proposalAgent, /target users/i);
|
|
97
|
+
assert.match(proposalAgent, /product outcome/i);
|
|
98
|
+
assert.match(proposalAgent, /decision gaps/i);
|
|
99
|
+
// Proposal-shaping questions must stay on business/product ground: the agent is
|
|
100
|
+
// explicitly told to keep harness mechanics out of the proposal question round
|
|
101
|
+
// unless the user opts into discussing delivery. Removing this guard is the most
|
|
102
|
+
// likely way harness mechanics would leak back into proposal questions.
|
|
103
|
+
assert.match(
|
|
104
|
+
proposalAgent,
|
|
105
|
+
/Do not ask about test commands, PR shape, changed-line budget, or other harness decisions unless the user explicitly asks to discuss delivery/i,
|
|
106
|
+
);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
test("SDD chain assets distinguish interactive gates from auto execution", async () => {
|
|
110
|
+
const planChain = await readFile(join(ROOT, "assets/chains/sdd-plan.chain.md"), "utf8");
|
|
111
|
+
const fullChain = await readFile(join(ROOT, "assets/chains/sdd-full.chain.md"), "utf8");
|
|
112
|
+
|
|
113
|
+
assert.match(planChain, /auto mode or explicit all-planning approval/i);
|
|
114
|
+
assert.match(planChain, /interactive mode/i);
|
|
115
|
+
assert.match(planChain, /must stop after sdd-proposal/i);
|
|
116
|
+
assert.match(fullChain, /auto mode or explicit full-lifecycle approval/i);
|
|
117
|
+
assert.match(fullChain, /interactive mode/i);
|
|
118
|
+
assert.match(fullChain, /must stop at each phase boundary/i);
|
|
119
|
+
});
|
|
120
|
+
|
|
74
121
|
test("persistent harness prompt assets do not hardcode Spanish SDD artifact copy", async () => {
|
|
75
122
|
const files = [
|
|
76
123
|
...(await collectTextFiles(join(ROOT, "assets"))),
|
|
@@ -89,3 +136,35 @@ test("persistent harness prompt assets do not hardcode Spanish SDD artifact copy
|
|
|
89
136
|
|
|
90
137
|
assert.deepEqual(failures, []);
|
|
91
138
|
});
|
|
139
|
+
|
|
140
|
+
test("comment-writer is context-reactive and neutral by default for Spanish comments", async () => {
|
|
141
|
+
const skill = await readFile(join(ROOT, "skills/comment-writer/SKILL.md"), "utf8");
|
|
142
|
+
|
|
143
|
+
for (const required of [
|
|
144
|
+
"target context language",
|
|
145
|
+
"explicitly requests a language",
|
|
146
|
+
"neutral/professional Spanish by default",
|
|
147
|
+
]) {
|
|
148
|
+
assert.match(skill, new RegExp(required.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
for (const regionalDefault of [
|
|
152
|
+
/\bAcá\b/,
|
|
153
|
+
/\bagregá\b/,
|
|
154
|
+
/\bpodés\b/,
|
|
155
|
+
/\btenés\b/,
|
|
156
|
+
/\bfijate\b/,
|
|
157
|
+
/\bdale\b/,
|
|
158
|
+
/\bquerés\b/i,
|
|
159
|
+
]) {
|
|
160
|
+
assert.doesNotMatch(skill, regionalDefault);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
for (const englishExample of [
|
|
164
|
+
"Good approach overall",
|
|
165
|
+
"Approved. The scope is clear",
|
|
166
|
+
"This PR exceeds the 400-line budget",
|
|
167
|
+
]) {
|
|
168
|
+
assert.match(skill, new RegExp(englishExample.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")));
|
|
169
|
+
}
|
|
170
|
+
});
|