gsd-pi 2.4.0 → 2.5.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/README.md +4 -3
- package/dist/loader.js +21 -3
- package/dist/logo.d.ts +3 -3
- package/dist/logo.js +2 -2
- package/package.json +2 -2
- package/src/resources/GSD-WORKFLOW.md +7 -7
- package/src/resources/extensions/get-secrets-from-user.ts +63 -8
- package/src/resources/extensions/gsd/auto.ts +123 -34
- package/src/resources/extensions/gsd/docs/preferences-reference.md +28 -0
- package/src/resources/extensions/gsd/files.ts +70 -0
- package/src/resources/extensions/gsd/git-service.ts +151 -11
- package/src/resources/extensions/gsd/gitignore.ts +1 -0
- package/src/resources/extensions/gsd/guided-flow.ts +6 -3
- package/src/resources/extensions/gsd/preferences.ts +59 -0
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/complete-slice.md +8 -6
- package/src/resources/extensions/gsd/prompts/discuss.md +7 -15
- package/src/resources/extensions/gsd/prompts/execute-task.md +3 -7
- package/src/resources/extensions/gsd/prompts/guided-plan-milestone.md +4 -0
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +33 -1
- package/src/resources/extensions/gsd/prompts/plan-slice.md +24 -32
- package/src/resources/extensions/gsd/prompts/replan-slice.md +1 -1
- package/src/resources/extensions/gsd/templates/plan.md +8 -10
- package/src/resources/extensions/gsd/templates/preferences.md +7 -0
- package/src/resources/extensions/gsd/templates/secrets-manifest.md +22 -0
- package/src/resources/extensions/gsd/templates/task-plan.md +6 -6
- package/src/resources/extensions/gsd/tests/git-service.test.ts +421 -0
- package/src/resources/extensions/gsd/tests/parsers.test.ts +211 -65
- package/src/resources/extensions/gsd/tests/replan-slice.test.ts +0 -2
- package/src/resources/extensions/gsd/tests/secure-env-collect.test.ts +185 -0
- package/src/resources/extensions/gsd/types.ts +20 -0
- package/src/resources/extensions/gsd/worktree-command.ts +48 -6
- package/src/resources/extensions/gsd/worktree.ts +40 -147
- package/src/resources/extensions/search-the-web/index.ts +16 -25
- package/src/resources/extensions/search-the-web/native-search.ts +157 -0
|
@@ -12,7 +12,7 @@ Then:
|
|
|
12
12
|
1. Read the template at `~/.gsd/agent/extensions/gsd/templates/roadmap.md`
|
|
13
13
|
2. Read `.gsd/REQUIREMENTS.md` if it exists. Treat **Active** requirements as the capability contract for planning. If it does not exist, continue in legacy compatibility mode but explicitly note that requirement coverage is operating without a contract.
|
|
14
14
|
3. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during planning, without overriding required roadmap formatting
|
|
15
|
-
4. Create the roadmap: decompose into demoable vertical slices — as many as the work needs, no more
|
|
15
|
+
4. Create the roadmap: decompose into demoable vertical slices — as many as the work genuinely needs, no more. A simple feature might be 1 slice. Don't decompose for decomposition's sake.
|
|
16
16
|
5. Order by risk (high-risk first)
|
|
17
17
|
6. Write `{{outputPath}}` with checkboxes, risk, depends, demo sentences, proof strategy, verification classes, milestone definition of done, **requirement coverage**, and a boundary map. Write success criteria as observable truths, not implementation tasks. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment
|
|
18
18
|
7. If planning produced structural decisions (e.g. slice ordering rationale, technology choices, scope exclusions), append them to `.gsd/DECISIONS.md` (read the template at `~/.gsd/agent/extensions/gsd/templates/decisions.md` if the file doesn't exist yet)
|
|
@@ -43,6 +43,38 @@ Apply these when decomposing and ordering slices:
|
|
|
43
43
|
- **Don't invent risks.** If the project is straightforward, skip the proof strategy and just ship value in smart order. Not everything has major unknowns.
|
|
44
44
|
- **Ship features, not proofs.** A completed slice should leave the product in a state where the new capability is actually usable through its real interface. A login flow slice ends with a working login page, not a middleware function. An API slice ends with endpoints that return real data from a real store, not hardcoded fixtures. A dashboard slice ends with a real dashboard rendering real data, not a component that renders mock props. If a slice can't ship the real thing yet because a dependency isn't built, it should ship with realistic stubs that are clearly marked for replacement — but the user-facing surface must be real.
|
|
45
45
|
- **Ambition matches the milestone.** The number and depth of slices should match the milestone's ambition. A milestone promising "core platform with auth, data model, and primary user loop" should have enough slices to actually deliver all three as working features — not two proof-of-concept slices and a note that "the rest will come in the next milestone." If the milestone's context promises an outcome, the roadmap must deliver it.
|
|
46
|
+
- **Right-size the decomposition.** Match slice count to actual complexity. If the work is small enough to build and verify in one pass, it's one slice — don't split it into three just because you can identify sub-steps. Multiple requirements can share a single slice. Conversely, don't cram genuinely independent capabilities into one slice just to keep the count low. Let the work dictate the structure.
|
|
47
|
+
|
|
48
|
+
## Single-Slice Fast Path
|
|
49
|
+
|
|
50
|
+
If the roadmap has only one slice, also write the slice plan and task plans inline during this unit — don't leave them for a separate planning session.
|
|
51
|
+
|
|
52
|
+
1. Read the templates:
|
|
53
|
+
- `~/.gsd/agent/extensions/gsd/templates/plan.md`
|
|
54
|
+
- `~/.gsd/agent/extensions/gsd/templates/task-plan.md`
|
|
55
|
+
2. `mkdir -p {{milestonePath}}/slices/S01/tasks`
|
|
56
|
+
3. Write the S01 plan file at `{{milestonePath}}/slices/S01/S01-PLAN.md`
|
|
57
|
+
4. Write individual task plans at `{{milestonePath}}/slices/S01/tasks/T01-PLAN.md`, etc.
|
|
58
|
+
5. For simple slices, keep the plan lean — omit Proof Level, Integration Closure, and Observability sections if they would all be "none". Executable verification commands are sufficient.
|
|
59
|
+
|
|
60
|
+
This eliminates a separate research-slice + plan-slice cycle when the work is straightforward.
|
|
61
|
+
|
|
62
|
+
## Secret Forecasting
|
|
63
|
+
|
|
64
|
+
After writing the roadmap, analyze the slices and their boundary maps for external service dependencies (third-party APIs, SaaS platforms, cloud providers, databases requiring credentials, OAuth providers, etc.).
|
|
65
|
+
|
|
66
|
+
If this milestone requires any external API keys or secrets:
|
|
67
|
+
|
|
68
|
+
1. Read the template at `~/.gsd/agent/extensions/gsd/templates/secrets-manifest.md` for the expected format
|
|
69
|
+
2. Write `{{secretsOutputPath}}` listing every predicted secret as an H3 section with:
|
|
70
|
+
- **Service** — the external service name
|
|
71
|
+
- **Dashboard** — direct URL to the console/dashboard page where the key is created (not a generic homepage)
|
|
72
|
+
- **Format hint** — what the key looks like (e.g. `sk-...`, `ghp_...`, 40-char hex, UUID)
|
|
73
|
+
- **Status** — always `pending` during planning
|
|
74
|
+
- **Destination** — `dotenv`, `vercel`, or `convex` depending on where the key will be consumed
|
|
75
|
+
- Numbered step-by-step guidance for obtaining the key (navigate to dashboard → create project → generate key → copy)
|
|
76
|
+
|
|
77
|
+
If this milestone does not require any external API keys or secrets, skip this step entirely — do not create an empty manifest.
|
|
46
78
|
|
|
47
79
|
**You MUST write the file `{{outputAbsPath}}` before finishing.**
|
|
48
80
|
|
|
@@ -12,7 +12,9 @@ Pay particular attention to **Forward Intelligence** sections — they contain h
|
|
|
12
12
|
|
|
13
13
|
{{dependencySummaries}}
|
|
14
14
|
|
|
15
|
-
Narrate your decomposition reasoning — why you're grouping work this way, what risks are driving the order, what verification strategy you're choosing and why.
|
|
15
|
+
Narrate your decomposition reasoning — why you're grouping work this way, what risks are driving the order, what verification strategy you're choosing and why. Keep the narration proportional to the work — a simple slice doesn't need a long justification.
|
|
16
|
+
|
|
17
|
+
**Right-size the plan.** If the slice is simple enough to be 1 task, plan 1 task. Don't split into multiple tasks just because you can identify sub-steps. Don't fill in sections with "None" when the section doesn't apply — omit them entirely. The plan's job is to guide execution, not to fill a template.
|
|
16
18
|
|
|
17
19
|
Then:
|
|
18
20
|
0. If `REQUIREMENTS.md` was preloaded above, identify which Active requirements the roadmap says this slice owns or supports. These are the requirements this plan must deliver — every owned requirement needs at least one task that directly advances it, and verification must prove the requirement is met.
|
|
@@ -20,43 +22,33 @@ Then:
|
|
|
20
22
|
- `~/.gsd/agent/extensions/gsd/templates/plan.md`
|
|
21
23
|
- `~/.gsd/agent/extensions/gsd/templates/task-plan.md`
|
|
22
24
|
2. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during planning, without overriding required plan formatting
|
|
23
|
-
3. Define slice-level verification
|
|
24
|
-
- For non-trivial slices: plan actual test files with real assertions. Name the files.
|
|
25
|
+
3. Define slice-level verification — the objective stopping condition for this slice:
|
|
26
|
+
- For non-trivial slices: plan actual test files with real assertions. Name the files.
|
|
25
27
|
- For simple slices: executable commands or script assertions are fine.
|
|
26
28
|
- If the project is non-trivial and has no test framework, the first task should set one up.
|
|
27
29
|
- If this slice establishes a boundary contract, verification must exercise that contract.
|
|
28
|
-
4.
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
5. Fill the `Proof Level` and `Integration Closure` sections truthfully:
|
|
34
|
-
- State whether the slice proves contract, integration, operational, or final-assembly behavior.
|
|
35
|
-
- Say whether real runtime or human/UAT is required.
|
|
36
|
-
- Name the wiring introduced in this slice and what still remains before the milestone is truly usable end-to-end.
|
|
37
|
-
6. Decompose the slice into tasks, each fitting one context window
|
|
38
|
-
7. Every task in the slice plan should be written as an executable increment with:
|
|
30
|
+
4. **For non-trivial slices only** — plan observability, proof level, and integration closure:
|
|
31
|
+
- Include `Observability / Diagnostics` for backend, integration, async, stateful, or UI slices where failure diagnosis matters.
|
|
32
|
+
- Fill `Proof Level` and `Integration Closure` when the slice crosses runtime boundaries or has meaningful integration concerns.
|
|
33
|
+
- **Omit these sections entirely for simple slices** where they would all be "none" or trivially obvious.
|
|
34
|
+
5. Decompose the slice into tasks, each fitting one context window. Each task needs:
|
|
39
35
|
- a concrete, action-oriented title
|
|
40
36
|
- the inline task entry fields defined in the plan.md template (Why / Files / Do / Verify / Done when)
|
|
41
|
-
- a matching task plan
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- **
|
|
48
|
-
- **
|
|
49
|
-
- **Task completeness:** Every task has steps, must-haves, verification, observability impact, inputs, and expected output — none are blank or vague.
|
|
37
|
+
- a matching task plan file with description, steps, must-haves, verification, inputs, and expected output
|
|
38
|
+
- Observability Impact section **only if the task touches runtime boundaries, async flows, or error paths** — omit it otherwise
|
|
39
|
+
6. Write `{{outputPath}}`
|
|
40
|
+
7. Write individual task plans in `{{sliceAbsPath}}/tasks/`: `T01-PLAN.md`, `T02-PLAN.md`, etc.
|
|
41
|
+
8. **Self-audit the plan.** Walk through each check — if any fail, fix the plan files before moving on:
|
|
42
|
+
- **Completion semantics:** If every task were completed exactly as written, the slice goal/demo should actually be true.
|
|
43
|
+
- **Requirement coverage:** Every must-have in the slice maps to at least one task. No must-have is orphaned. If `REQUIREMENTS.md` exists, every Active requirement this slice owns maps to at least one task.
|
|
44
|
+
- **Task completeness:** Every task has steps, must-haves, verification, inputs, and expected output — none are blank or vague.
|
|
50
45
|
- **Dependency correctness:** Task ordering is consistent. No task references work from a later task.
|
|
51
|
-
- **Key links planned:** For every pair of artifacts that must connect
|
|
52
|
-
- **Scope sanity:** Target 2–5 steps and 3–8 files per task.
|
|
53
|
-
- **
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
13. If planning produced structural decisions (e.g. verification strategy, observability strategy, technology choices, patterns to follow), append them to `.gsd/DECISIONS.md`
|
|
58
|
-
14. Commit: `docs({{sliceId}}): add slice plan`
|
|
59
|
-
15. Update `.gsd/STATE.md`
|
|
46
|
+
- **Key links planned:** For every pair of artifacts that must connect, there is an explicit step that wires them.
|
|
47
|
+
- **Scope sanity:** Target 2–5 steps and 3–8 files per task. 10+ steps or 12+ files — must split. Each task must be completable in a single fresh context window.
|
|
48
|
+
- **Feature completeness:** Every task produces real, user-facing progress — not just internal scaffolding.
|
|
49
|
+
9. If planning produced structural decisions, append them to `.gsd/DECISIONS.md`
|
|
50
|
+
10. Commit: `docs({{sliceId}}): add slice plan`
|
|
51
|
+
11. Update `.gsd/STATE.md`
|
|
60
52
|
|
|
61
53
|
The slice directory and tasks/ subdirectory already exist. Do NOT mkdir. You are on the slice branch; all work stays here.
|
|
62
54
|
|
|
@@ -31,7 +31,7 @@ All relevant context has been preloaded below — the roadmap, current slice pla
|
|
|
31
31
|
- Ensure the slice Goal and Demo sections are still achievable with the new tasks, or update them if the blocker fundamentally changes what the slice can deliver
|
|
32
32
|
- Update the Files Likely Touched section if the replan changes which files are affected
|
|
33
33
|
5. If any incomplete task had a `T0x-PLAN.md`, remove or rewrite it to match the new task description.
|
|
34
|
-
6.
|
|
34
|
+
6. Do not commit manually — the system auto-commits your changes after this unit completes.
|
|
35
35
|
7. Update `.gsd/STATE.md`
|
|
36
36
|
|
|
37
37
|
**You MUST write `{{replanAbsPath}}` and the updated slice plan before finishing.**
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
## Proof Level
|
|
12
12
|
|
|
13
|
+
<!-- Omit this section entirely for simple slices where the answer is trivially obvious. -->
|
|
14
|
+
|
|
13
15
|
- This slice proves: {{contract | integration | operational | final-assembly}}
|
|
14
16
|
- Real runtime required: {{yes/no}}
|
|
15
17
|
- Human/UAT required: {{yes/no}}
|
|
@@ -41,17 +43,11 @@
|
|
|
41
43
|
|
|
42
44
|
## Observability / Diagnostics
|
|
43
45
|
|
|
44
|
-
<!--
|
|
45
|
-
|
|
46
|
-
and localize the problem with minimal ambiguity.
|
|
47
|
-
|
|
48
|
-
Prefer:
|
|
49
|
-
- structured logs/events over ad hoc console strings
|
|
50
|
-
- stable error codes/types over vague failures
|
|
51
|
-
- health/readiness/status surfaces over hidden internal state
|
|
52
|
-
- persisted failure state when it materially improves retries or recovery
|
|
46
|
+
<!-- Include this section for non-trivial backend, integration, async, stateful, or UI slices.
|
|
47
|
+
OMIT ENTIRELY for simple slices where all fields would be "none".
|
|
53
48
|
|
|
54
|
-
|
|
49
|
+
When included, describe how a future agent will inspect current state, detect failure,
|
|
50
|
+
and localize the problem with minimal ambiguity. Keep it concise and high-signal. -->
|
|
55
51
|
|
|
56
52
|
- Runtime signals: {{structured log/event, state transition, metric, or none}}
|
|
57
53
|
- Inspection surfaces: {{status endpoint, CLI command, script, UI state, DB table, or none}}
|
|
@@ -60,6 +56,8 @@
|
|
|
60
56
|
|
|
61
57
|
## Integration Closure
|
|
62
58
|
|
|
59
|
+
<!-- Omit this section entirely for simple slices with no meaningful integration concerns. -->
|
|
60
|
+
|
|
63
61
|
- Upstream surfaces consumed: {{specific files / modules / contracts}}
|
|
64
62
|
- New wiring introduced in this slice: {{entrypoint / composition / runtime hookup, or none}}
|
|
65
63
|
- What remains before the milestone is truly usable end-to-end: {{list or "nothing"}}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Secrets Manifest
|
|
2
|
+
|
|
3
|
+
<!-- This file lists predicted API keys and secrets for the milestone.
|
|
4
|
+
Each H3 section defines one secret with setup guidance.
|
|
5
|
+
The parser extracts entries by H3 heading (the env var name).
|
|
6
|
+
Bold fields: Service, Dashboard, Format hint, Status, Destination.
|
|
7
|
+
Guidance is a numbered list under each entry. -->
|
|
8
|
+
|
|
9
|
+
**Milestone:** {{milestone}}
|
|
10
|
+
**Generated:** {{generatedAt}}
|
|
11
|
+
|
|
12
|
+
### {{ENV_VAR_NAME}}
|
|
13
|
+
|
|
14
|
+
**Service:** {{serviceName}}
|
|
15
|
+
**Dashboard:** {{dashboardUrl}}
|
|
16
|
+
**Format hint:** {{formatHint}}
|
|
17
|
+
**Status:** pending
|
|
18
|
+
**Destination:** dotenv
|
|
19
|
+
|
|
20
|
+
1. {{Step 1 guidance}}
|
|
21
|
+
2. {{Step 2 guidance}}
|
|
22
|
+
3. {{Step 3 guidance}}
|
|
@@ -32,13 +32,13 @@ estimated_files: {{estimatedFiles}}
|
|
|
32
32
|
|
|
33
33
|
## Observability Impact
|
|
34
34
|
|
|
35
|
-
<!--
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
<!-- OMIT THIS SECTION ENTIRELY for simple tasks that don't touch runtime boundaries,
|
|
36
|
+
async flows, APIs, background processes, or error paths.
|
|
37
|
+
Include it only when the task meaningfully changes how failures are detected or diagnosed. -->
|
|
38
38
|
|
|
39
|
-
- Signals added/changed: {{structured logs, statuses, errors, metrics
|
|
40
|
-
- How a future agent inspects this: {{command, endpoint, file, UI state
|
|
41
|
-
- Failure state exposed: {{what becomes visible on failure
|
|
39
|
+
- Signals added/changed: {{structured logs, statuses, errors, metrics}}
|
|
40
|
+
- How a future agent inspects this: {{command, endpoint, file, UI state}}
|
|
41
|
+
- Failure state exposed: {{what becomes visible on failure}}
|
|
42
42
|
|
|
43
43
|
## Inputs
|
|
44
44
|
|