lsd-pi 1.1.2 → 1.1.3
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 +2 -1
- package/dist/bedrock-auth.d.ts +25 -0
- package/dist/bedrock-auth.js +59 -0
- package/dist/headless.js +8 -3
- package/dist/loader.js +1 -0
- package/dist/onboarding-llm.d.ts +37 -0
- package/dist/onboarding-llm.js +64 -0
- package/dist/onboarding.d.ts +2 -14
- package/dist/onboarding.js +146 -71
- package/dist/pi-migration.js +1 -0
- package/dist/resources/extensions/memory/auto-extract.js +21 -3
- package/dist/resources/extensions/memory/dream.js +703 -0
- package/dist/resources/extensions/memory/extension-manifest.json +2 -2
- package/dist/resources/extensions/memory/index.js +115 -8
- package/dist/resources/extensions/slash-commands/extension-manifest.json +10 -10
- package/dist/resources/extensions/slash-commands/index.js +0 -4
- package/dist/resources/extensions/slash-commands/plan.js +181 -45
- package/dist/resources/extensions/subagent/agents.js +14 -1
- package/dist/resources/extensions/subagent/configured-model.js +3 -2
- package/dist/resources/extensions/subagent/index.js +34 -28
- package/dist/resources/extensions/subagent/launch-helpers.js +24 -0
- package/dist/resources/extensions/subagent/model-resolution.js +41 -3
- package/dist/resources/extensions/usage/extension-manifest.json +11 -0
- package/dist/resources/extensions/usage/index.js +346 -0
- package/{src/resources/skills/create-gsd-extension → dist/resources/skills/create-lsd-extension}/SKILL.md +6 -6
- package/{src/resources/skills/create-gsd-extension → dist/resources/skills/create-lsd-extension}/references/custom-tools.md +1 -1
- package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/extension-lifecycle.md +2 -2
- package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/extensioncontext-reference.md +1 -1
- package/{src/resources/skills/create-gsd-extension → dist/resources/skills/create-lsd-extension}/references/key-rules-gotchas.md +4 -4
- package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/packaging-distribution.md +6 -6
- package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/workflows/create-extension.md +3 -3
- package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/workflows/debug-extension.md +5 -5
- package/dist/resources/skills/teams-debug/SKILL.md +5 -6
- package/dist/resources/skills/teams-document/SKILL.md +1 -2
- package/dist/resources/skills/teams-plan/SKILL.md +3 -4
- package/dist/resources/skills/teams-run/SKILL.md +3 -4
- package/dist/resources/skills/teams-verify/SKILL.md +4 -5
- package/dist/startup-model-validation.js +1 -0
- package/dist/welcome-screen.js +13 -11
- package/dist/wizard.js +12 -0
- package/package.json +1 -1
- package/packages/pi-ai/dist/models.generated.d.ts +688 -409
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +761 -488
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/scripts/generate-models.ts +40 -18
- package/packages/pi-ai/src/models.generated.ts +759 -486
- package/packages/pi-coding-agent/dist/cli/config-selector.js +1 -1
- package/packages/pi-coding-agent/dist/cli/config-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts +1 -2
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +6 -30
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +6 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +44 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/skill-tool.test.js +9 -5
- package/packages/pi-coding-agent/dist/core/skill-tool.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/skills.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/skills.js +3 -2
- package/packages/pi-coding-agent/dist/core/skills.js.map +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js +1 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/main.js +1 -1
- package/packages/pi-coding-agent/dist/main.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +2 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +15 -12
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +6 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +25 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +10 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/extension-ui-controller.js +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/extension-ui-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +31 -22
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +18 -5
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +139 -20
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +4 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/cli/config-selector.ts +1 -1
- package/packages/pi-coding-agent/src/core/agent-session.ts +5 -28
- package/packages/pi-coding-agent/src/core/settings-manager.ts +52 -1
- package/packages/pi-coding-agent/src/core/skill-tool.test.ts +18 -5
- package/packages/pi-coding-agent/src/core/skills.ts +3 -2
- package/packages/pi-coding-agent/src/index.ts +1 -1
- package/packages/pi-coding-agent/src/main.ts +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/bash-execution.ts +2 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +12 -13
- package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +39 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +10 -0
- package/packages/pi-coding-agent/src/modes/interactive/controllers/extension-ui-controller.ts +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +46 -20
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +171 -20
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +4 -0
- package/packages/pi-tui/dist/components/editor.d.ts +1 -0
- package/packages/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/editor.js +23 -0
- package/packages/pi-tui/dist/components/editor.js.map +1 -1
- package/packages/pi-tui/src/components/editor.ts +23 -0
- package/pkg/dist/modes/interactive/theme/theme.d.ts +18 -5
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js +139 -20
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.js +4 -0
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
- package/pkg/package.json +1 -1
- package/src/resources/extensions/memory/auto-extract.ts +23 -3
- package/src/resources/extensions/memory/dream.ts +814 -0
- package/src/resources/extensions/memory/extension-manifest.json +2 -2
- package/src/resources/extensions/memory/index.ts +134 -13
- package/src/resources/extensions/memory/tests/auto-extract.test.ts +10 -2
- package/src/resources/extensions/memory/tests/dream.test.ts +142 -0
- package/src/resources/extensions/slash-commands/extension-manifest.json +10 -10
- package/src/resources/extensions/slash-commands/index.ts +3 -7
- package/src/resources/extensions/slash-commands/plan.ts +192 -46
- package/src/resources/extensions/subagent/agents.ts +11 -1
- package/src/resources/extensions/subagent/configured-model.ts +3 -2
- package/src/resources/extensions/subagent/index.ts +38 -30
- package/src/resources/extensions/subagent/launch-helpers.ts +30 -0
- package/src/resources/extensions/subagent/model-resolution.ts +40 -3
- package/src/resources/extensions/usage/extension-manifest.json +11 -0
- package/src/resources/extensions/usage/index.ts +441 -0
- package/{dist/resources/skills/create-gsd-extension → src/resources/skills/create-lsd-extension}/SKILL.md +6 -6
- package/{dist/resources/skills/create-gsd-extension → src/resources/skills/create-lsd-extension}/references/custom-tools.md +1 -1
- package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/extension-lifecycle.md +2 -2
- package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/extensioncontext-reference.md +1 -1
- package/{dist/resources/skills/create-gsd-extension → src/resources/skills/create-lsd-extension}/references/key-rules-gotchas.md +4 -4
- package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/packaging-distribution.md +6 -6
- package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/workflows/create-extension.md +3 -3
- package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/workflows/debug-extension.md +5 -5
- package/src/resources/skills/teams-debug/SKILL.md +5 -6
- package/src/resources/skills/teams-document/SKILL.md +1 -2
- package/src/resources/skills/teams-plan/SKILL.md +3 -4
- package/src/resources/skills/teams-run/SKILL.md +3 -4
- package/src/resources/skills/teams-verify/SKILL.md +4 -5
- package/dist/resources/extensions/slash-commands/create-extension.js +0 -264
- package/dist/resources/extensions/slash-commands/create-slash-command.js +0 -208
- package/src/resources/extensions/slash-commands/create-extension.ts +0 -297
- package/src/resources/extensions/slash-commands/create-slash-command.ts +0 -234
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/compaction-session-control.md +0 -0
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/custom-commands.md +0 -0
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/custom-rendering.md +0 -0
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/custom-ui.md +0 -0
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/events-reference.md +0 -0
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/extensionapi-reference.md +0 -0
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/mode-behavior.md +0 -0
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/model-provider-management.md +0 -0
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/remote-execution-overrides.md +0 -0
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/state-management.md +0 -0
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/references/system-prompt-modification.md +0 -0
- /package/dist/resources/skills/{create-gsd-extension → create-lsd-extension}/workflows/add-capability.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/compaction-session-control.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/custom-commands.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/custom-rendering.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/custom-ui.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/events-reference.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/extensionapi-reference.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/mode-behavior.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/model-provider-management.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/remote-execution-overrides.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/state-management.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/references/system-prompt-modification.md +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/templates/extension-skeleton.ts +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/templates/stateful-tool-skeleton.ts +0 -0
- /package/src/resources/skills/{create-gsd-extension → create-lsd-extension}/workflows/add-capability.md +0 -0
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
# Test in isolation
|
|
27
|
-
|
|
27
|
+
lsd -e ./path/to/extension.ts
|
|
28
28
|
|
|
29
|
-
# Check
|
|
30
|
-
# Extension errors are logged but don't crash
|
|
29
|
+
# Check LSD startup output for errors
|
|
30
|
+
# Extension errors are logged but don't crash LSD
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
## Step 3: Verify File Location
|
|
@@ -38,7 +38,7 @@ Community extensions must be in auto-discovery paths:
|
|
|
38
38
|
- `.gsd/extensions/*.ts`
|
|
39
39
|
- `.gsd/extensions/*/index.ts`
|
|
40
40
|
|
|
41
|
-
Note: `~/.gsd/agent/extensions/` is reserved for bundled extensions synced from the
|
|
41
|
+
Note: `~/.gsd/agent/extensions/` is reserved for bundled extensions synced from the lsd-pi package.
|
|
42
42
|
|
|
43
43
|
The file must `export default function(pi: ExtensionAPI) { ... }`.
|
|
44
44
|
|
|
@@ -49,7 +49,7 @@ Read `../references/key-rules-gotchas.md` and verify each rule against the exten
|
|
|
49
49
|
## Step 5: Add Debugging
|
|
50
50
|
|
|
51
51
|
```typescript
|
|
52
|
-
// Temporary: log to stderr (visible in
|
|
52
|
+
// Temporary: log to stderr (visible in LSD output)
|
|
53
53
|
console.error("[my-ext] Loading...");
|
|
54
54
|
|
|
55
55
|
pi.on("session_start", async (_event, ctx) => {
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: teams-debug
|
|
3
3
|
description: "Fix any bug related to an active Teams plan. Can be triggered by the user at any time or automatically from teams-verify on failure. Reads the plan for context, spawns a targeted builder subagent to fix the issue, then appends a debug status update to the plan."
|
|
4
|
-
user-invocable: true
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Teams: Debug
|
|
8
7
|
|
|
9
8
|
Fix a bug related to the current Teams plan. This skill can be triggered:
|
|
10
|
-
- **By the user at any time** — e.g. "something's broken, use `/teams-debug`"
|
|
11
|
-
- **Automatically from `/teams-verify`** — when a scenario fails during manual verification
|
|
9
|
+
- **By the user at any time** — e.g. "something's broken, use `/skill:teams-debug`"
|
|
10
|
+
- **Automatically from `/skill:teams-verify`** — when a scenario fails during manual verification
|
|
12
11
|
|
|
13
12
|
It reads the plan (which contains all review and verification history) before fixing.
|
|
14
13
|
|
|
15
|
-
**Prerequisite:** A `.lsd/plan/PLAN-*.md` file must exist. If none found, stop and tell the user to run `/teams-plan` first.
|
|
14
|
+
**Prerequisite:** A `.lsd/plan/PLAN-*.md` file must exist. If none found, stop and tell the user to run `/skill:teams-plan` first.
|
|
16
15
|
|
|
17
16
|
---
|
|
18
17
|
|
|
@@ -32,7 +31,7 @@ Otherwise, ask:
|
|
|
32
31
|
|
|
33
32
|
> **What's the bug?**
|
|
34
33
|
>
|
|
35
|
-
> Describe what went wrong, what you expected, and what you saw. Include the scenario name if it came from `/teams-verify`.
|
|
34
|
+
> Describe what went wrong, what you expected, and what you saw. Include the scenario name if it came from `/skill:teams-verify`.
|
|
36
35
|
|
|
37
36
|
Wait for their response.
|
|
38
37
|
|
|
@@ -127,4 +126,4 @@ Print:
|
|
|
127
126
|
```
|
|
128
127
|
|
|
129
128
|
Then ask:
|
|
130
|
-
> **Want to re-verify this scenario? Run `/teams-verify` to continue from where you left off.**
|
|
129
|
+
> **Want to re-verify this scenario? Run `/skill:teams-verify` to continue from where you left off.**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: teams-document
|
|
3
3
|
description: "Update existing project docs (README.md, ARCHITECTURE.md, etc.) and the active plan file to reflect the latest build. Spawns a worker subagent scribe to find and update relevant documentation files and ensure the plan is accurate, then appends a docs status update to the plan."
|
|
4
|
-
user-invocable: true
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Teams: Document
|
|
@@ -9,7 +8,7 @@ user-invocable: true
|
|
|
9
8
|
Update existing project documentation to reflect what was built in the current plan. Spawns a worker subagent that finds relevant docs and updates them — no new files created unless explicitly needed.
|
|
10
9
|
|
|
11
10
|
**Prerequisite:** A `.lsd/plan/PLAN-*.md` file must exist. If none found, stop:
|
|
12
|
-
> No plan files found in `.lsd/plan/`. Run `/teams-plan` first.
|
|
11
|
+
> No plan files found in `.lsd/plan/`. Run `/skill:teams-plan` first.
|
|
13
12
|
|
|
14
13
|
---
|
|
15
14
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: teams-plan
|
|
3
3
|
description: "Plan and build a feature. Orchestrator plans, spawns sequential builder subagents per phase (with Playwright/Maestro verification), then a reviewer subagent, then a builder to apply fixes. Supports parallel mode for independent phases."
|
|
4
|
-
user-invocable: true
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Teams: Plan + Build
|
|
@@ -41,7 +40,7 @@ mkdir -p .lsd/plan
|
|
|
41
40
|
- Check for existing plan files: `.lsd/plan/PLAN-*.md`
|
|
42
41
|
- Count existing files to determine N (next plan number = count + 1)
|
|
43
42
|
- If plans exist, inform the user:
|
|
44
|
-
> **Found [N-1] existing plan(s). Creating Plan #[N]. Use `/teams-run` to resume an existing plan.**
|
|
43
|
+
> **Found [N-1] existing plan(s). Creating Plan #[N]. Use `/skill:teams-run` to resume an existing plan.**
|
|
45
44
|
- If no existing plans: plan number = 1
|
|
46
45
|
|
|
47
46
|
Write `.lsd/plan/PLAN-[N].md`:
|
|
@@ -291,7 +290,7 @@ Final summary format:
|
|
|
291
290
|
```
|
|
292
291
|
|
|
293
292
|
Then suggest:
|
|
294
|
-
> **Build done. Run `/teams-verify` to walk through manual E2E verification.**
|
|
293
|
+
> **Build done. Run `/skill:teams-verify` to walk through manual E2E verification.**
|
|
295
294
|
|
|
296
295
|
---
|
|
297
296
|
|
|
@@ -299,7 +298,7 @@ Then suggest:
|
|
|
299
298
|
|
|
300
299
|
Ask the user:
|
|
301
300
|
|
|
302
|
-
> **"Would you like to update your documentation? Run `/teams-document` to have the scribe update your README, ARCHITECTURE.md, and other docs."**
|
|
301
|
+
> **"Would you like to update your documentation? Run `/skill:teams-document` to have the scribe update your README, ARCHITECTURE.md, and other docs."**
|
|
303
302
|
|
|
304
303
|
If yes, invoke the `teams-document` skill.
|
|
305
304
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: teams-run
|
|
3
3
|
description: "Resume building a single Teams plan. Orchestrator spawns sequential or parallel builder subagents per incomplete phase, then a reviewer subagent, then applies fixes."
|
|
4
|
-
user-invocable: true
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Teams: Run (Resume Build)
|
|
@@ -13,7 +12,7 @@ You are the orchestrator. Resume an existing build by running all incomplete pha
|
|
|
13
12
|
## Step 1: Find the Plan
|
|
14
13
|
|
|
15
14
|
List all files matching `.lsd/plan/PLAN-*.md`. If none exist:
|
|
16
|
-
> No plan files found in `.lsd/plan/`. Use `/teams-plan` to create a plan first.
|
|
15
|
+
> No plan files found in `.lsd/plan/`. Use `/skill:teams-plan` to create a plan first.
|
|
17
16
|
|
|
18
17
|
If multiple plan files exist, show the list and ask the user which plan to resume. Default to the highest-numbered plan.
|
|
19
18
|
|
|
@@ -216,7 +215,7 @@ Final summary:
|
|
|
216
215
|
```
|
|
217
216
|
|
|
218
217
|
Then suggest:
|
|
219
|
-
> **Build done. Run `/teams-verify` to walk through manual E2E verification.**
|
|
218
|
+
> **Build done. Run `/skill:teams-verify` to walk through manual E2E verification.**
|
|
220
219
|
|
|
221
220
|
---
|
|
222
221
|
|
|
@@ -224,7 +223,7 @@ Then suggest:
|
|
|
224
223
|
|
|
225
224
|
Ask the user:
|
|
226
225
|
|
|
227
|
-
> **"Would you like to update your documentation? Run `/teams-document` to have the scribe update your README, ARCHITECTURE.md, and other docs."**
|
|
226
|
+
> **"Would you like to update your documentation? Run `/skill:teams-document` to have the scribe update your README, ARCHITECTURE.md, and other docs."**
|
|
228
227
|
|
|
229
228
|
If yes, invoke the `teams-document` skill.
|
|
230
229
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: teams-verify
|
|
3
3
|
description: "Guide the user through manually verifying the build E2E — walks through each scenario step-by-step, records pass/fail, and appends a verification status update to the plan file."
|
|
4
|
-
user-invocable: true
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Teams: Manual Verify
|
|
@@ -13,7 +12,7 @@ You guide the user through manually verifying the completed build end-to-end. On
|
|
|
13
12
|
## Step 1: Load the Plan
|
|
14
13
|
|
|
15
14
|
Find and read the most recent `.lsd/plan/PLAN-*.md` (highest number). Store as `PLAN_FILE`. If none exist:
|
|
16
|
-
> No plan files found in `.lsd/plan/`. Run `/teams-plan` first.
|
|
15
|
+
> No plan files found in `.lsd/plan/`. Run `/skill:teams-plan` first.
|
|
17
16
|
|
|
18
17
|
Extract:
|
|
19
18
|
- Plan ID (the `Plan ID:` field — e.g. `#2`)
|
|
@@ -63,7 +62,7 @@ Then ask:
|
|
|
63
62
|
|
|
64
63
|
- **pass** → record it, move to next scenario
|
|
65
64
|
- **fail** → ask: *"What went wrong?"* Record their description. Then immediately offer:
|
|
66
|
-
> **Bug detected. Run `/teams-debug` to fix it now, or continue verifying the rest first?**
|
|
65
|
+
> **Bug detected. Run `/skill:teams-debug` to fix it now, or continue verifying the rest first?**
|
|
67
66
|
|
|
68
67
|
If they say **fix now**: invoke the `teams-debug` skill directly, passing the scenario name and their failure description as context. After the fix is applied, re-run this scenario before continuing.
|
|
69
68
|
|
|
@@ -115,9 +114,9 @@ Print the final result:
|
|
|
115
114
|
If there are failures, offer:
|
|
116
115
|
|
|
117
116
|
> **N scenario(s) failed. Options:**
|
|
118
|
-
> - `/teams-debug` — fix bugs one at a time with full plan context (recommended)
|
|
117
|
+
> - `/skill:teams-debug` — fix bugs one at a time with full plan context (recommended)
|
|
119
118
|
> - **Fix all** — I spawn a single builder to address all failures at once
|
|
120
119
|
|
|
121
|
-
If they choose **`/teams-debug`**: invoke the `teams-debug` skill for each failed scenario in order, passing the scenario name and failure description. After each fix, update the `## Verification` section in the plan to mark the scenario as `FIXED`.
|
|
120
|
+
If they choose **`/skill:teams-debug`**: invoke the `teams-debug` skill for each failed scenario in order, passing the scenario name and failure description. After each fix, update the `## Verification` section in the plan to mark the scenario as `FIXED`.
|
|
122
121
|
|
|
123
122
|
If they choose **fix all**: read the failures from the plan's `## Verification` section and spawn a **Sonnet** builder subagent with the full list of issues. Then offer to re-run verification on just the failed scenarios.
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { showInterviewRound } from "../shared/tui.js";
|
|
2
|
-
export default function createExtension(pi) {
|
|
3
|
-
pi.registerCommand("create-extension", {
|
|
4
|
-
description: "Scaffold a new pi extension with interview-driven context gathering",
|
|
5
|
-
async handler(args, ctx) {
|
|
6
|
-
const inlineName = (typeof args === "string" ? args : "").trim();
|
|
7
|
-
// ── Interview — always runs first ─────────────────────────────────────
|
|
8
|
-
const questions = [
|
|
9
|
-
...(!inlineName
|
|
10
|
-
? [
|
|
11
|
-
{
|
|
12
|
-
id: "purpose",
|
|
13
|
-
header: "Purpose",
|
|
14
|
-
question: "What should this extension do?",
|
|
15
|
-
options: [
|
|
16
|
-
{
|
|
17
|
-
label: "Add a custom tool",
|
|
18
|
-
description: "Register a new tool the LLM can call (like gsd_plan, plan_clarify).",
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
label: "Add a slash command",
|
|
22
|
-
description: "A /command the user types — runs logic, optionally triggers an agent turn.",
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
label: "React to agent events",
|
|
26
|
-
description: "Hook into turn_end, agent_end, tool_call, etc. to observe or intercept.",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: "Custom TUI component",
|
|
30
|
-
description: "Render a widget, overlay, dialog, or custom editor in the terminal UI.",
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
]
|
|
35
|
-
: []),
|
|
36
|
-
{
|
|
37
|
-
id: "ui",
|
|
38
|
-
header: "UI",
|
|
39
|
-
question: "Does this extension need any custom UI?",
|
|
40
|
-
options: [
|
|
41
|
-
{
|
|
42
|
-
label: "No UI",
|
|
43
|
-
description: "Pure logic — no dialogs, widgets, or custom rendering needed.",
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
label: "Dialogs only",
|
|
47
|
-
description: "Uses built-in ctx.ui.select / ctx.ui.input / ctx.ui.confirm dialogs.",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
label: "Status / widget",
|
|
51
|
-
description: "Shows a persistent status indicator or footer widget.",
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
label: "Full custom component",
|
|
55
|
-
description: "Uses ctx.ui.custom() to render a fully bespoke TUI component.",
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
id: "events",
|
|
61
|
-
header: "Events",
|
|
62
|
-
question: "Does it need to hook into the agent lifecycle?",
|
|
63
|
-
options: [
|
|
64
|
-
{
|
|
65
|
-
label: "No — standalone",
|
|
66
|
-
description: "Runs only when explicitly invoked — no event listeners needed.",
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
label: "Yes — tool_call",
|
|
70
|
-
description: "Intercepts or observes tool calls before or after they run.",
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
label: "Yes — turn / session",
|
|
74
|
-
description: "Reacts to turn_end, agent_end, session_start, or similar lifecycle events.",
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
label: "Yes — context / prompt",
|
|
78
|
-
description: "Modifies the system prompt or filters messages via context / before_agent_start.",
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
id: "persistence",
|
|
84
|
-
header: "State",
|
|
85
|
-
question: "Does this extension need to persist state across sessions?",
|
|
86
|
-
options: [
|
|
87
|
-
{
|
|
88
|
-
label: "No state needed",
|
|
89
|
-
description: "Stateless — each invocation is independent.",
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
label: "In-memory only",
|
|
93
|
-
description: "Keeps state while the session is running but doesn't survive restarts.",
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
label: "Persisted to session",
|
|
97
|
-
description: "Uses pi.appendEntry() to write state into the session JSONL for resume.",
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
id: "complexity",
|
|
103
|
-
header: "Complexity",
|
|
104
|
-
question: "How complex is the implementation?",
|
|
105
|
-
options: [
|
|
106
|
-
{
|
|
107
|
-
label: "Simple — one concern",
|
|
108
|
-
description: "A single tool or command, minimal branching, easy to follow.",
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
label: "Moderate — a few parts",
|
|
112
|
-
description: "A command plus an event hook, or a tool with custom rendering.",
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
label: "Complex — full extension",
|
|
116
|
-
description: "Multiple tools, commands, events, UI, and state working together.",
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
},
|
|
120
|
-
];
|
|
121
|
-
const result = await showInterviewRound(questions, {
|
|
122
|
-
progress: "New pi extension · Context",
|
|
123
|
-
reviewHeadline: "Review your choices",
|
|
124
|
-
exitHeadline: "Cancel extension creation?",
|
|
125
|
-
exitLabel: "cancel",
|
|
126
|
-
}, ctx);
|
|
127
|
-
// User hit Esc — bail silently
|
|
128
|
-
if (!result.answers || Object.keys(result.answers).length === 0) {
|
|
129
|
-
ctx.ui.notify("Cancelled.", "info");
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
// ── Resolve name / description ────────────────────────────────────────
|
|
133
|
-
let extensionDescription = inlineName;
|
|
134
|
-
if (!extensionDescription) {
|
|
135
|
-
const purpose = result.answers["purpose"];
|
|
136
|
-
if (purpose) {
|
|
137
|
-
extensionDescription = purpose.notes?.trim()
|
|
138
|
-
? purpose.notes.trim()
|
|
139
|
-
: Array.isArray(purpose.selected) ? purpose.selected[0] : purpose.selected;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
if (!extensionDescription) {
|
|
143
|
-
ctx.ui.notify("No description captured — add details in the notes field next time.", "warning");
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
// ── Build and send the enriched prompt ────────────────────────────────
|
|
147
|
-
sendPrompt(extensionDescription, result, pi);
|
|
148
|
-
},
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
// ─── Prompt builder ───────────────────────────────────────────────────────────
|
|
152
|
-
function formatAnswers(result) {
|
|
153
|
-
const lines = [];
|
|
154
|
-
const purpose = result.answers["purpose"];
|
|
155
|
-
if (purpose?.notes) {
|
|
156
|
-
lines.push(`- **Extension goal (user's words)**: ${purpose.notes}`);
|
|
157
|
-
}
|
|
158
|
-
const ui = result.answers["ui"];
|
|
159
|
-
if (ui) {
|
|
160
|
-
const selected = Array.isArray(ui.selected) ? ui.selected[0] : ui.selected;
|
|
161
|
-
lines.push(`- **UI needs**: ${selected}${ui.notes ? ` — ${ui.notes}` : ""}`);
|
|
162
|
-
}
|
|
163
|
-
const events = result.answers["events"];
|
|
164
|
-
if (events) {
|
|
165
|
-
const selected = Array.isArray(events.selected) ? events.selected[0] : events.selected;
|
|
166
|
-
lines.push(`- **Event hooks**: ${selected}${events.notes ? ` — ${events.notes}` : ""}`);
|
|
167
|
-
}
|
|
168
|
-
const persistence = result.answers["persistence"];
|
|
169
|
-
if (persistence) {
|
|
170
|
-
const selected = Array.isArray(persistence.selected) ? persistence.selected[0] : persistence.selected;
|
|
171
|
-
lines.push(`- **State persistence**: ${selected}${persistence.notes ? ` — ${persistence.notes}` : ""}`);
|
|
172
|
-
}
|
|
173
|
-
const complexity = result.answers["complexity"];
|
|
174
|
-
if (complexity) {
|
|
175
|
-
const selected = Array.isArray(complexity.selected) ? complexity.selected[0] : complexity.selected;
|
|
176
|
-
lines.push(`- **Complexity**: ${selected}${complexity.notes ? ` — ${complexity.notes}` : ""}`);
|
|
177
|
-
}
|
|
178
|
-
return lines.join("\n");
|
|
179
|
-
}
|
|
180
|
-
function sendPrompt(description, result, pi) {
|
|
181
|
-
const contextSection = `\n## Context gathered from user\n${formatAnswers(result)}\n`;
|
|
182
|
-
// Determine which doc sections to highlight based on answers
|
|
183
|
-
const uiAnswer = result.answers["ui"];
|
|
184
|
-
const uiSelected = uiAnswer
|
|
185
|
-
? (Array.isArray(uiAnswer.selected) ? uiAnswer.selected[0] : uiAnswer.selected)
|
|
186
|
-
: "";
|
|
187
|
-
const eventsAnswer = result.answers["events"];
|
|
188
|
-
const eventsSelected = eventsAnswer
|
|
189
|
-
? (Array.isArray(eventsAnswer.selected) ? eventsAnswer.selected[0] : eventsAnswer.selected)
|
|
190
|
-
: "";
|
|
191
|
-
const persistenceAnswer = result.answers["persistence"];
|
|
192
|
-
const persistenceSelected = persistenceAnswer
|
|
193
|
-
? (Array.isArray(persistenceAnswer.selected) ? persistenceAnswer.selected[0] : persistenceAnswer.selected)
|
|
194
|
-
: "";
|
|
195
|
-
const docHints = [
|
|
196
|
-
"- `~/.gsd/agent/docs/extending-pi/01-what-are-extensions.md` — capabilities overview",
|
|
197
|
-
"- `~/.gsd/agent/docs/extending-pi/03-getting-started.md` — minimal extension, hot reload",
|
|
198
|
-
"- `~/.gsd/agent/docs/extending-pi/08-extensioncontext-what-you-can-access.md` — ExtensionContext API",
|
|
199
|
-
"- `~/.gsd/agent/docs/extending-pi/09-extensionapi-what-you-can-do.md` — ExtensionAPI: registration, messaging",
|
|
200
|
-
"- `~/.gsd/agent/docs/extending-pi/22-key-rules-gotchas.md` — must-read rules before shipping",
|
|
201
|
-
];
|
|
202
|
-
if (uiSelected.includes("custom component")) {
|
|
203
|
-
docHints.push("- `~/.gsd/agent/docs/extending-pi/12-custom-ui-visual-components.md` — dialogs, widgets, overlays");
|
|
204
|
-
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/06-ctx-ui-custom-full-custom-components.md` — ctx.ui.custom() API");
|
|
205
|
-
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/07-built-in-components-the-building-blocks.md` — Text, Box, SelectList");
|
|
206
|
-
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/09-keyboard-input-how-to-handle-keys.md` — Key, matchesKey");
|
|
207
|
-
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/10-line-width-the-cardinal-rule.md` — truncation, width rules");
|
|
208
|
-
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/19-building-a-complete-component-step-by-step.md` — step-by-step guide");
|
|
209
|
-
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/21-common-mistakes-and-how-to-avoid-them.md` — pitfalls");
|
|
210
|
-
}
|
|
211
|
-
else if (uiSelected.includes("Dialogs")) {
|
|
212
|
-
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/04-built-in-dialog-methods.md` — select, confirm, input, editor");
|
|
213
|
-
}
|
|
214
|
-
else if (uiSelected.includes("Status")) {
|
|
215
|
-
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/05-persistent-ui-elements.md` — status, widgets, footer, header");
|
|
216
|
-
}
|
|
217
|
-
if (uiSelected.includes("tool") || result.answers["purpose"]) {
|
|
218
|
-
docHints.push("- `~/.gsd/agent/docs/extending-pi/14-custom-rendering-controlling-what-the-user-sees.md` — renderCall / renderResult");
|
|
219
|
-
}
|
|
220
|
-
if (eventsSelected && !eventsSelected.includes("standalone")) {
|
|
221
|
-
docHints.push("- `~/.gsd/agent/docs/extending-pi/07-events-the-nervous-system.md` — all events reference");
|
|
222
|
-
}
|
|
223
|
-
if (eventsSelected.includes("context / prompt")) {
|
|
224
|
-
docHints.push("- `~/.gsd/agent/docs/extending-pi/15-system-prompt-modification.md` — system prompt hooks");
|
|
225
|
-
}
|
|
226
|
-
if (persistenceSelected.includes("session")) {
|
|
227
|
-
docHints.push("- `~/.gsd/agent/docs/extending-pi/13-state-management-persistence.md` — pi.appendEntry, session state");
|
|
228
|
-
}
|
|
229
|
-
const prompt = `Create a new pi extension based on this description:
|
|
230
|
-
|
|
231
|
-
"${description}"
|
|
232
|
-
${contextSection}
|
|
233
|
-
## Reference documentation
|
|
234
|
-
|
|
235
|
-
Before writing any code, read the relevant docs below. They contain the exact APIs, rules, and patterns for building pi extensions — do not guess or rely on general TypeScript knowledge alone.
|
|
236
|
-
|
|
237
|
-
${docHints.join("\n")}
|
|
238
|
-
|
|
239
|
-
## Output
|
|
240
|
-
|
|
241
|
-
Write the complete implementation as a single self-contained extension file:
|
|
242
|
-
|
|
243
|
-
\`~/.gsd/agent/extensions/<kebab-case-name>.ts\`
|
|
244
|
-
|
|
245
|
-
Then register it in the main extensions index:
|
|
246
|
-
|
|
247
|
-
\`~/.gsd/agent/extensions/index.ts\` — import and call the new extension's default export alongside existing ones
|
|
248
|
-
|
|
249
|
-
## Rules you must follow exactly
|
|
250
|
-
|
|
251
|
-
- Extension entry point: \`export default function <camelCaseName>(pi: ExtensionAPI): void { ... }\`
|
|
252
|
-
- Import type: \`import type { ExtensionAPI, ExtensionContext, ExtensionCommandContext } from "@gsd/pi-coding-agent";\`
|
|
253
|
-
- \`pi\` is the registration surface — call \`pi.registerCommand\`, \`pi.registerTool\`, \`pi.on\`, \`pi.registerShortcut\` inside the default export
|
|
254
|
-
- \`ctx\` (ExtensionCommandContext or ExtensionContext) is passed to handlers and event callbacks — never stored, never assumed available globally
|
|
255
|
-
- To send a message to the agent: \`pi.sendUserMessage("...")\` or \`pi.sendMessage({ content, display }, { triggerTurn })\`
|
|
256
|
-
- To show UI: \`ctx.ui.notify\`, \`ctx.ui.select\`, \`ctx.ui.input\`, \`ctx.ui.confirm\`, \`ctx.ui.custom\`
|
|
257
|
-
- To run shell commands: \`await pi.exec("cmd", ["arg1"])\` — returns \`{ stdout, stderr, exitCode }\`
|
|
258
|
-
- Events use \`pi.on("event_name", async (event, ctx) => { ... })\`
|
|
259
|
-
- No direct file I/O without \`node:fs\` — import it explicitly if needed
|
|
260
|
-
- Read the gotchas file before finalising: \`22-key-rules-gotchas.md\`
|
|
261
|
-
|
|
262
|
-
After writing the files, run \`/reload\` to load the new extension.`;
|
|
263
|
-
pi.sendUserMessage(prompt);
|
|
264
|
-
}
|