@pasko70/pibo 1.4.0 → 1.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 +183 -183
- package/context/codex-base-prompt.md +148 -148
- package/context/compute-worker.md +23 -23
- package/context/pibo-compaction-prompt.md +100 -100
- package/context/pibo-native-tooling.md +18 -18
- package/context/pibo-system-prompt.md +77 -77
- package/dist/apps/chat/agent-store.js +82 -82
- package/dist/apps/chat/data/project-service.js +166 -166
- package/dist/apps/chat/data/read-state-service.js +18 -18
- package/dist/apps/chat/data/timeline-query-service.js +8 -8
- package/dist/apps/chat/model-catalog.js +5 -1
- package/dist/apps/chat/static-assets.js +853 -853
- package/dist/apps/chat/workflow-persistence.js +255 -255
- package/dist/apps/chat-ui/assets/{dist-7YaJd19a.js → dist-B2BEpL7n.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CiYeO8nN.js → dist-BAGS_xkV.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BIvPnn_C.js → dist-BAXNalar.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CjSI6y5z.js → dist-BwUvs6Ph.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-Ubstha8t.js → dist-C0zsJ8II.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-KXCMNKIL.js → dist-C3PnEkhb.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-CVQU42Fn.js → dist-CYPL-B2Z.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-BbNE72h8.js → dist-CiDSXgtg.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-D7TCkoFT.js → dist-DnACFKyO.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-ChSZNqKE.js → dist-ZB1-ui2y.js} +1 -1
- package/dist/apps/chat-ui/assets/{dist-8Noo5eCN.js → dist-vKlxFkTa.js} +1 -1
- package/dist/apps/chat-ui/assets/{index-CmxtUVG1.js → index-0x7tuTNX.js} +3 -3
- package/dist/apps/chat-ui/assets/{index-C25VYnyb.css → index-B-qaya1G.css} +1 -1
- package/dist/apps/chat-ui/index.html +18 -18
- package/dist/apps/chat-ui/manifest.webmanifest +25 -25
- package/dist/apps/chat-ui/sw.js +41 -41
- package/dist/apps/chat-vscode-web/index.html +12 -12
- package/dist/apps/cli-ui/cliSessionsCommand.js +23 -23
- package/dist/apps/context-files-ui/index.html +11 -11
- package/dist/apps/vscode-artifacts/latest.vsix +0 -0
- package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.4.2.vsix +0 -0
- package/dist/bin/pibo.js +0 -0
- package/dist/bin/rg.js +0 -0
- package/dist/cli.js +35 -35
- package/dist/compute/cli.js +54 -54
- package/dist/core/runtime.js +2 -0
- package/dist/core/session-router.js +1 -0
- package/dist/cron/cli.js +15 -15
- package/dist/cron/store.js +49 -49
- package/dist/data/cli.js +23 -23
- package/dist/data/event-log.js +23 -23
- package/dist/data/message-store.js +20 -20
- package/dist/data/navigation-store.js +9 -9
- package/dist/data/observation-store.js +4 -4
- package/dist/data/payload-store.js +17 -17
- package/dist/data/schema.js +429 -429
- package/dist/data/session-store.js +4 -4
- package/dist/data/telemetry-queries.js +54 -54
- package/dist/data/telemetry.js +156 -156
- package/dist/debug/events.js +12 -12
- package/dist/debug/failures.js +6 -6
- package/dist/debug/index.js +207 -207
- package/dist/debug/messages.js +6 -6
- package/dist/debug/pty.js +124 -124
- package/dist/debug/session.js +29 -29
- package/dist/debug/tools.js +5 -5
- package/dist/debug/web-snapshot-browser-scripts.js +294 -294
- package/dist/debug/web-streaming-browser-library.js +925 -925
- package/dist/debug/web-streaming-browser-scripts.js +232 -232
- package/dist/debug/web-streaming-provider-telemetry.js +4 -4
- package/dist/debug/web.js +93 -93
- package/dist/gateway/cli.js +19 -19
- package/dist/mcp/config-command.js +53 -53
- package/dist/mcp/index.js +21 -21
- package/dist/mcp/registry.js +11 -11
- package/dist/pi-packages/cli.js +11 -11
- package/dist/plugins/context-files-store.js +110 -110
- package/dist/plugins/context-files.js +4 -4
- package/dist/providers/glm.js +59 -0
- package/dist/ralph/cli.js +18 -18
- package/dist/ralph/templates.js +140 -140
- package/dist/reliability/store.js +226 -226
- package/dist/sessions/pibo-data-store.js +16 -16
- package/dist/sessions/sqlite-store.js +53 -53
- package/dist/setup/cli.js +58 -58
- package/dist/tools/agent-browser-wrapper.js +80 -80
- package/dist/tools/browser-use-cdp.js +12 -12
- package/dist/tools/browser-use-wrapper.js +762 -762
- package/dist/tools/guides.js +455 -455
- package/dist/tools/index.js +99 -99
- package/dist/tools/runtime/node-worker-source.js +205 -205
- package/dist/tools/runtime/python-worker-source.js +177 -177
- package/dist/vscode/cli.js +9 -9
- package/dist/web-annotations/cdp.js +900 -900
- package/dist/web-annotations/store.js +96 -96
- package/docs/README.md +23 -23
- package/docs/ops/install-developer-host.md +112 -112
- package/docs/ops/install-user-host.md +96 -96
- package/docs/ops/upgrade-user-to-developer-host.md +69 -69
- package/docs/ops/vscode-extension-release.md +160 -160
- package/package.json +1 -1
- package/skills/builtin/pi-agent-harness/SKILL.md +319 -319
- package/skills/builtin/pi-agent-harness/agents/openai.yaml +4 -4
- package/skills/builtin/pibo-docker-system/SKILL.md +170 -170
- package/skills/builtin/pibo-spec-writing/SKILL.md +330 -330
- package/skills/builtin/prd/SKILL.md +143 -143
- package/skills/builtin/ralph-loop/SKILL.md +359 -359
- package/skills/builtin/ralph-prd-json/SKILL.md +123 -123
- package/skills/builtin/skill-creator/LICENSE.txt +201 -201
- package/skills/builtin/skill-creator/SKILL.md +513 -513
- package/skills/builtin/skill-creator/agents/analyzer.md +274 -274
- package/skills/builtin/skill-creator/agents/comparator.md +202 -202
- package/skills/builtin/skill-creator/agents/grader.md +223 -223
- package/skills/builtin/skill-creator/assets/eval_review.html +146 -146
- package/skills/builtin/skill-creator/eval-viewer/generate_review.py +471 -471
- package/skills/builtin/skill-creator/eval-viewer/viewer.html +1325 -1325
- package/skills/builtin/skill-creator/references/schemas.md +430 -430
- package/skills/builtin/skill-creator/scripts/aggregate_benchmark.py +401 -401
- package/skills/builtin/skill-creator/scripts/generate_report.py +326 -326
- package/skills/builtin/skill-creator/scripts/improve_description.py +247 -247
- package/skills/builtin/skill-creator/scripts/package_skill.py +136 -136
- package/skills/builtin/skill-creator/scripts/quick_validate.py +102 -102
- package/skills/builtin/skill-creator/scripts/run_eval.py +310 -310
- package/skills/builtin/skill-creator/scripts/run_loop.py +328 -328
- package/skills/builtin/skill-creator/scripts/utils.py +47 -47
- package/skills/builtin/web-annotations/SKILL.md +93 -93
- package/src/mcp/LICENSE.mcp-cli +21 -21
- package/dist/apps/vscode-artifacts/pibo-vscode-1.3.0.vsix +0 -0
- package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.3.3.vsix +0 -0
- package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.3.4.vsix +0 -0
- package/dist/apps/vscode-artifacts/pibo-vscode-ext-1.3.5.vsix +0 -0
- package/dist/core/shared-app.js +0 -17
- package/dist/data/final-app-space-cutover-migration.js +0 -728
- package/dist/data/shared-app-migration.js +0 -757
- package/dist/session-ui/ownerViewModel.js +0 -27
- package/dist/shared-app.js +0 -4
|
@@ -1,330 +1,330 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pibo-spec-writing
|
|
3
|
-
description: Defines how Pibo specs are written, structured, reviewed, and split into proposals, capability specs, phase specs, designs, and tasks. Use this whenever the user asks to create, review, rewrite, compare, or implement a spec; mentions requirements, acceptance criteria, scope, roadmap, proposal, design plan, tasks, OpenSpec, Spec Kit, GSD, or spec-driven development; or asks where project documentation should live.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Pibo Spec Writing
|
|
7
|
-
|
|
8
|
-
Use this skill when creating or reviewing specs for Pibo. A good Pibo spec is behavior-first, scoped, testable, concise, and traceable to implementation work. Keep implementation details out of the spec unless they are externally visible constraints.
|
|
9
|
-
|
|
10
|
-
## Core principles
|
|
11
|
-
|
|
12
|
-
Write specs so another agent can implement and verify the work without reading the original chat.
|
|
13
|
-
|
|
14
|
-
1. Start with why the change matters.
|
|
15
|
-
2. Define the observable behavior, not the code shape.
|
|
16
|
-
3. Bound the scope with clear in-scope and out-of-scope lists.
|
|
17
|
-
4. Make every requirement testable.
|
|
18
|
-
5. Add scenarios or acceptance criteria for each important behavior.
|
|
19
|
-
6. Track assumptions and open questions instead of hiding them.
|
|
20
|
-
7. Link requirements to phases, tasks, or plans when the work is large.
|
|
21
|
-
8. Use clear prose: active voice, concrete words, short paragraphs, and no puffery.
|
|
22
|
-
9. For user-facing UI, CLI, TUI, gateway, runtime, or agent-routing changes, name the expected verification level instead of assuming unit tests are enough.
|
|
23
|
-
|
|
24
|
-
## Where specs live
|
|
25
|
-
|
|
26
|
-
Follow the project documentation structure:
|
|
27
|
-
|
|
28
|
-
```text
|
|
29
|
-
docs/
|
|
30
|
-
project/ Current project docs and canonical documentation
|
|
31
|
-
specs/ Product, technical, and implementation specifications
|
|
32
|
-
plans/ Implementation plans and design plans
|
|
33
|
-
reports/ Investigation, validation, and generated reports
|
|
34
|
-
legacy/ Old documentation kept for reference
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Do not create new root-level `plans/`, `reports/`, or `specs/` directories.
|
|
38
|
-
|
|
39
|
-
Use `docs/specs/` for durable specs. Use `docs/plans/` for implementation plans. Use `docs/reports/` for analyses, validations, and findings.
|
|
40
|
-
|
|
41
|
-
## Choose the right spec shape
|
|
42
|
-
|
|
43
|
-
### Capability spec
|
|
44
|
-
|
|
45
|
-
Use a capability spec for durable system behavior, especially behavior that should remain true after the current change ships.
|
|
46
|
-
|
|
47
|
-
Good path:
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
docs/specs/capabilities/<capability-name>.md
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Use this for auth behavior, session routing, profile behavior, tool registration, gateway contracts, API behavior, UI behavior, or other long-lived contracts.
|
|
54
|
-
|
|
55
|
-
### Change spec
|
|
56
|
-
|
|
57
|
-
Use a change spec when proposing a feature, fix, or migration.
|
|
58
|
-
|
|
59
|
-
Good path:
|
|
60
|
-
|
|
61
|
-
```text
|
|
62
|
-
docs/specs/changes/<change-name>/
|
|
63
|
-
proposal.md
|
|
64
|
-
spec.md
|
|
65
|
-
design.md # include when technical choices matter
|
|
66
|
-
tasks.md # include when ready to implement
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Phase spec
|
|
70
|
-
|
|
71
|
-
Use a phase spec for multi-step work that needs a roadmap.
|
|
72
|
-
|
|
73
|
-
Good path:
|
|
74
|
-
|
|
75
|
-
```text
|
|
76
|
-
docs/specs/phases/<NN-phase-name>/
|
|
77
|
-
spec.md
|
|
78
|
-
context.md # implementation decisions, references, existing-code notes
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Required structure for most Pibo specs
|
|
82
|
-
|
|
83
|
-
Use this template unless the task clearly needs a smaller artifact.
|
|
84
|
-
|
|
85
|
-
```markdown
|
|
86
|
-
# Spec: [Name]
|
|
87
|
-
|
|
88
|
-
**Status:** Draft | Approved | Implementing | Done
|
|
89
|
-
**Created:** YYYY-MM-DD
|
|
90
|
-
**Requester / Source:** [user, issue, discussion, or change]
|
|
91
|
-
**Related docs:** [links]
|
|
92
|
-
|
|
93
|
-
## Why
|
|
94
|
-
|
|
95
|
-
[Problem, opportunity, or user need. One or two concrete paragraphs.]
|
|
96
|
-
|
|
97
|
-
## Goal
|
|
98
|
-
|
|
99
|
-
[One precise sentence that says what changes from current state to target state.]
|
|
100
|
-
|
|
101
|
-
## Background / Current State
|
|
102
|
-
|
|
103
|
-
[What exists today. What is broken, missing, confusing, slow, unsafe, or expensive.]
|
|
104
|
-
|
|
105
|
-
## Scope
|
|
106
|
-
|
|
107
|
-
### In Scope
|
|
108
|
-
|
|
109
|
-
- [Concrete behavior or deliverable]
|
|
110
|
-
|
|
111
|
-
### Out of Scope
|
|
112
|
-
|
|
113
|
-
- [Excluded item] — [reason]
|
|
114
|
-
|
|
115
|
-
## Requirements
|
|
116
|
-
|
|
117
|
-
### Requirement: [Name]
|
|
118
|
-
|
|
119
|
-
The system MUST/SHALL [observable behavior].
|
|
120
|
-
|
|
121
|
-
#### Current
|
|
122
|
-
|
|
123
|
-
[Current behavior or absence of behavior.]
|
|
124
|
-
|
|
125
|
-
#### Target
|
|
126
|
-
|
|
127
|
-
[Desired behavior.]
|
|
128
|
-
|
|
129
|
-
#### Acceptance
|
|
130
|
-
|
|
131
|
-
[Concrete pass/fail check.]
|
|
132
|
-
|
|
133
|
-
#### Scenario: [Name]
|
|
134
|
-
|
|
135
|
-
- GIVEN [state]
|
|
136
|
-
- WHEN [action/event]
|
|
137
|
-
- THEN [expected outcome]
|
|
138
|
-
|
|
139
|
-
## Edge Cases
|
|
140
|
-
|
|
141
|
-
- [Boundary, failure, permission, concurrency, or empty-state case]
|
|
142
|
-
|
|
143
|
-
## Constraints
|
|
144
|
-
|
|
145
|
-
- **Compatibility:** ...
|
|
146
|
-
- **Security / Privacy:** ...
|
|
147
|
-
- **Performance:** ...
|
|
148
|
-
- **Dependencies:** ...
|
|
149
|
-
|
|
150
|
-
## Success Criteria
|
|
151
|
-
|
|
152
|
-
- [ ] SC-001: [Measurable or directly observable outcome]
|
|
153
|
-
- [ ] SC-002: [Another pass/fail outcome]
|
|
154
|
-
|
|
155
|
-
## Assumptions and Open Questions
|
|
156
|
-
|
|
157
|
-
### Assumptions
|
|
158
|
-
|
|
159
|
-
- [Reasonable default taken to keep progress moving]
|
|
160
|
-
|
|
161
|
-
### Open Questions
|
|
162
|
-
|
|
163
|
-
- [Question that materially affects scope, UX, security, or architecture]
|
|
164
|
-
|
|
165
|
-
## Traceability
|
|
166
|
-
|
|
167
|
-
| Requirement | Scenario / Story | Plan / Task | Status |
|
|
168
|
-
|---|---|---|---|
|
|
169
|
-
| REQ-001 | [Scenario] | [Plan or task] | Pending |
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
## Minimal spec
|
|
173
|
-
|
|
174
|
-
For small work, use the shortest form that remains testable:
|
|
175
|
-
|
|
176
|
-
```markdown
|
|
177
|
-
# Spec: [Name]
|
|
178
|
-
|
|
179
|
-
## Why
|
|
180
|
-
## Goal
|
|
181
|
-
## Scope
|
|
182
|
-
### In Scope
|
|
183
|
-
### Out of Scope
|
|
184
|
-
## Requirements
|
|
185
|
-
## Acceptance Criteria
|
|
186
|
-
## Assumptions / Open Questions
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
Use the full template when the change touches multiple modules, changes public behavior, affects auth/security/data, or will be implemented across multiple sessions.
|
|
190
|
-
|
|
191
|
-
## Requirement rules
|
|
192
|
-
|
|
193
|
-
Write requirements as behavior contracts.
|
|
194
|
-
|
|
195
|
-
Good:
|
|
196
|
-
|
|
197
|
-
```markdown
|
|
198
|
-
### Requirement: Dev gateway status is discoverable
|
|
199
|
-
|
|
200
|
-
The CLI MUST show whether the dev gateway is running, its PID when known, and the command to inspect logs.
|
|
201
|
-
|
|
202
|
-
#### Scenario: Gateway is running
|
|
203
|
-
- GIVEN the dev gateway process is active
|
|
204
|
-
- WHEN an operator runs `pibo gateway dev status`
|
|
205
|
-
- THEN the output includes status, PID, port, and next diagnostic command
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
Weak:
|
|
209
|
-
|
|
210
|
-
```markdown
|
|
211
|
-
### Requirement: Improve gateway status
|
|
212
|
-
Make gateway status better and more robust.
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
A requirement is ready when a reviewer can say pass or fail without guessing.
|
|
216
|
-
|
|
217
|
-
## Reuse, parity, and verification clarity
|
|
218
|
-
|
|
219
|
-
When a feature is described as "same as Web", "derived from Web", "reuse the view", "shared UI", "Terminal View", or similar, do not silently reduce that to shared data. State the intended reuse level:
|
|
220
|
-
|
|
221
|
-
- data/state only
|
|
222
|
-
- renderer-neutral view model
|
|
223
|
-
- interaction/controller logic
|
|
224
|
-
- renderer/component logic
|
|
225
|
-
- visual and behavioral parity
|
|
226
|
-
|
|
227
|
-
If visual or behavioral parity is required, add acceptance checks that compare the relevant surfaces with the same fixture or user flow. If parity is intentionally out of scope, say so and describe the user-visible difference.
|
|
228
|
-
|
|
229
|
-
For user-facing UI, CLI, TUI, gateway, runtime, auth, or agent-routing specs, include at least one realistic validation scenario for the default user path when feasible. Fake data, demo mode, mocks, and render snapshots are useful, but they should not be the only acceptance evidence for behavior users will exercise directly unless the real path is unavailable or explicitly out of scope.
|
|
230
|
-
|
|
231
|
-
## Scenario rules
|
|
232
|
-
|
|
233
|
-
Prefer GIVEN / WHEN / THEN for user-visible behavior and system contracts. Use WHEN / THEN only for simple event-response behavior.
|
|
234
|
-
|
|
235
|
-
Cover at least:
|
|
236
|
-
|
|
237
|
-
- primary success path
|
|
238
|
-
- empty or missing state
|
|
239
|
-
- invalid input or permission failure
|
|
240
|
-
- migration or compatibility path when relevant
|
|
241
|
-
|
|
242
|
-
## Proposal structure
|
|
243
|
-
|
|
244
|
-
Use `proposal.md` to explain intent before deep design.
|
|
245
|
-
|
|
246
|
-
```markdown
|
|
247
|
-
# Proposal: [Change]
|
|
248
|
-
|
|
249
|
-
## Why
|
|
250
|
-
|
|
251
|
-
## What Changes
|
|
252
|
-
|
|
253
|
-
## Capabilities
|
|
254
|
-
|
|
255
|
-
### New Capabilities
|
|
256
|
-
- `<kebab-name>`: [brief behavior area]
|
|
257
|
-
|
|
258
|
-
### Modified Capabilities
|
|
259
|
-
- `<existing-name>`: [changed behavior]
|
|
260
|
-
|
|
261
|
-
## Impact
|
|
262
|
-
|
|
263
|
-
- **Code:** ...
|
|
264
|
-
- **APIs / CLI:** ...
|
|
265
|
-
- **Data:** ...
|
|
266
|
-
- **Auth / Security:** ...
|
|
267
|
-
- **Docs:** ...
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
## Design structure
|
|
271
|
-
|
|
272
|
-
Use `design.md` when technical choices matter. Keep requirements in the spec; put implementation choices here.
|
|
273
|
-
|
|
274
|
-
```markdown
|
|
275
|
-
# Design: [Change]
|
|
276
|
-
|
|
277
|
-
## Context
|
|
278
|
-
## Goals / Non-Goals
|
|
279
|
-
## Decisions
|
|
280
|
-
### Decision: [Choice]
|
|
281
|
-
- **Choice:** ...
|
|
282
|
-
- **Rationale:** ...
|
|
283
|
-
- **Alternatives considered:** ...
|
|
284
|
-
|
|
285
|
-
## Risks / Trade-offs
|
|
286
|
-
## Migration / Rollback
|
|
287
|
-
## Open Questions
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
## Tasks structure
|
|
291
|
-
|
|
292
|
-
Use `tasks.md` only after the spec and design are stable enough to act on.
|
|
293
|
-
|
|
294
|
-
```markdown
|
|
295
|
-
# Tasks: [Change]
|
|
296
|
-
|
|
297
|
-
## 1. Setup / Foundation
|
|
298
|
-
- [ ] 1.1 [Concrete task with file path]
|
|
299
|
-
|
|
300
|
-
## 2. Requirement: [Name]
|
|
301
|
-
- [ ] 2.1 [Test or validation task]
|
|
302
|
-
- [ ] 2.2 [Implementation task]
|
|
303
|
-
|
|
304
|
-
## 3. Validation
|
|
305
|
-
- [ ] 3.1 Run [command]
|
|
306
|
-
- [ ] 3.2 Verify [observable behavior]
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
Tasks should be small enough for one agent session. Include file paths and validation commands when known.
|
|
310
|
-
|
|
311
|
-
## Review checklist
|
|
312
|
-
|
|
313
|
-
Before treating a spec as ready, check:
|
|
314
|
-
|
|
315
|
-
- [ ] The `Why` names a real problem or opportunity.
|
|
316
|
-
- [ ] The `Goal` is specific and measurable.
|
|
317
|
-
- [ ] Scope has both in-scope and out-of-scope items.
|
|
318
|
-
- [ ] Requirements use MUST or SHALL for mandatory behavior.
|
|
319
|
-
- [ ] Each requirement has acceptance checks or scenarios.
|
|
320
|
-
- [ ] Edge cases include failure and empty-state behavior where relevant.
|
|
321
|
-
- [ ] Assumptions are visible.
|
|
322
|
-
- [ ] Open questions are few and material.
|
|
323
|
-
- [ ] Implementation details live in `design.md` or `tasks.md`, not in behavioral requirements.
|
|
324
|
-
- [ ] The spec is concise, concrete, and free of promotional language.
|
|
325
|
-
|
|
326
|
-
## Writing style
|
|
327
|
-
|
|
328
|
-
Write for humans and agents. Prefer short sentences. Use active voice. Omit needless words. Avoid vague adjectives such as robust, seamless, powerful, and cutting-edge. Replace them with concrete behavior.
|
|
329
|
-
|
|
330
|
-
Use tables only when they make comparison or traceability easier. Do not decorate specs with excessive emoji or bold text.
|
|
1
|
+
---
|
|
2
|
+
name: pibo-spec-writing
|
|
3
|
+
description: Defines how Pibo specs are written, structured, reviewed, and split into proposals, capability specs, phase specs, designs, and tasks. Use this whenever the user asks to create, review, rewrite, compare, or implement a spec; mentions requirements, acceptance criteria, scope, roadmap, proposal, design plan, tasks, OpenSpec, Spec Kit, GSD, or spec-driven development; or asks where project documentation should live.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pibo Spec Writing
|
|
7
|
+
|
|
8
|
+
Use this skill when creating or reviewing specs for Pibo. A good Pibo spec is behavior-first, scoped, testable, concise, and traceable to implementation work. Keep implementation details out of the spec unless they are externally visible constraints.
|
|
9
|
+
|
|
10
|
+
## Core principles
|
|
11
|
+
|
|
12
|
+
Write specs so another agent can implement and verify the work without reading the original chat.
|
|
13
|
+
|
|
14
|
+
1. Start with why the change matters.
|
|
15
|
+
2. Define the observable behavior, not the code shape.
|
|
16
|
+
3. Bound the scope with clear in-scope and out-of-scope lists.
|
|
17
|
+
4. Make every requirement testable.
|
|
18
|
+
5. Add scenarios or acceptance criteria for each important behavior.
|
|
19
|
+
6. Track assumptions and open questions instead of hiding them.
|
|
20
|
+
7. Link requirements to phases, tasks, or plans when the work is large.
|
|
21
|
+
8. Use clear prose: active voice, concrete words, short paragraphs, and no puffery.
|
|
22
|
+
9. For user-facing UI, CLI, TUI, gateway, runtime, or agent-routing changes, name the expected verification level instead of assuming unit tests are enough.
|
|
23
|
+
|
|
24
|
+
## Where specs live
|
|
25
|
+
|
|
26
|
+
Follow the project documentation structure:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
docs/
|
|
30
|
+
project/ Current project docs and canonical documentation
|
|
31
|
+
specs/ Product, technical, and implementation specifications
|
|
32
|
+
plans/ Implementation plans and design plans
|
|
33
|
+
reports/ Investigation, validation, and generated reports
|
|
34
|
+
legacy/ Old documentation kept for reference
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Do not create new root-level `plans/`, `reports/`, or `specs/` directories.
|
|
38
|
+
|
|
39
|
+
Use `docs/specs/` for durable specs. Use `docs/plans/` for implementation plans. Use `docs/reports/` for analyses, validations, and findings.
|
|
40
|
+
|
|
41
|
+
## Choose the right spec shape
|
|
42
|
+
|
|
43
|
+
### Capability spec
|
|
44
|
+
|
|
45
|
+
Use a capability spec for durable system behavior, especially behavior that should remain true after the current change ships.
|
|
46
|
+
|
|
47
|
+
Good path:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
docs/specs/capabilities/<capability-name>.md
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Use this for auth behavior, session routing, profile behavior, tool registration, gateway contracts, API behavior, UI behavior, or other long-lived contracts.
|
|
54
|
+
|
|
55
|
+
### Change spec
|
|
56
|
+
|
|
57
|
+
Use a change spec when proposing a feature, fix, or migration.
|
|
58
|
+
|
|
59
|
+
Good path:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
docs/specs/changes/<change-name>/
|
|
63
|
+
proposal.md
|
|
64
|
+
spec.md
|
|
65
|
+
design.md # include when technical choices matter
|
|
66
|
+
tasks.md # include when ready to implement
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Phase spec
|
|
70
|
+
|
|
71
|
+
Use a phase spec for multi-step work that needs a roadmap.
|
|
72
|
+
|
|
73
|
+
Good path:
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
docs/specs/phases/<NN-phase-name>/
|
|
77
|
+
spec.md
|
|
78
|
+
context.md # implementation decisions, references, existing-code notes
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Required structure for most Pibo specs
|
|
82
|
+
|
|
83
|
+
Use this template unless the task clearly needs a smaller artifact.
|
|
84
|
+
|
|
85
|
+
```markdown
|
|
86
|
+
# Spec: [Name]
|
|
87
|
+
|
|
88
|
+
**Status:** Draft | Approved | Implementing | Done
|
|
89
|
+
**Created:** YYYY-MM-DD
|
|
90
|
+
**Requester / Source:** [user, issue, discussion, or change]
|
|
91
|
+
**Related docs:** [links]
|
|
92
|
+
|
|
93
|
+
## Why
|
|
94
|
+
|
|
95
|
+
[Problem, opportunity, or user need. One or two concrete paragraphs.]
|
|
96
|
+
|
|
97
|
+
## Goal
|
|
98
|
+
|
|
99
|
+
[One precise sentence that says what changes from current state to target state.]
|
|
100
|
+
|
|
101
|
+
## Background / Current State
|
|
102
|
+
|
|
103
|
+
[What exists today. What is broken, missing, confusing, slow, unsafe, or expensive.]
|
|
104
|
+
|
|
105
|
+
## Scope
|
|
106
|
+
|
|
107
|
+
### In Scope
|
|
108
|
+
|
|
109
|
+
- [Concrete behavior or deliverable]
|
|
110
|
+
|
|
111
|
+
### Out of Scope
|
|
112
|
+
|
|
113
|
+
- [Excluded item] — [reason]
|
|
114
|
+
|
|
115
|
+
## Requirements
|
|
116
|
+
|
|
117
|
+
### Requirement: [Name]
|
|
118
|
+
|
|
119
|
+
The system MUST/SHALL [observable behavior].
|
|
120
|
+
|
|
121
|
+
#### Current
|
|
122
|
+
|
|
123
|
+
[Current behavior or absence of behavior.]
|
|
124
|
+
|
|
125
|
+
#### Target
|
|
126
|
+
|
|
127
|
+
[Desired behavior.]
|
|
128
|
+
|
|
129
|
+
#### Acceptance
|
|
130
|
+
|
|
131
|
+
[Concrete pass/fail check.]
|
|
132
|
+
|
|
133
|
+
#### Scenario: [Name]
|
|
134
|
+
|
|
135
|
+
- GIVEN [state]
|
|
136
|
+
- WHEN [action/event]
|
|
137
|
+
- THEN [expected outcome]
|
|
138
|
+
|
|
139
|
+
## Edge Cases
|
|
140
|
+
|
|
141
|
+
- [Boundary, failure, permission, concurrency, or empty-state case]
|
|
142
|
+
|
|
143
|
+
## Constraints
|
|
144
|
+
|
|
145
|
+
- **Compatibility:** ...
|
|
146
|
+
- **Security / Privacy:** ...
|
|
147
|
+
- **Performance:** ...
|
|
148
|
+
- **Dependencies:** ...
|
|
149
|
+
|
|
150
|
+
## Success Criteria
|
|
151
|
+
|
|
152
|
+
- [ ] SC-001: [Measurable or directly observable outcome]
|
|
153
|
+
- [ ] SC-002: [Another pass/fail outcome]
|
|
154
|
+
|
|
155
|
+
## Assumptions and Open Questions
|
|
156
|
+
|
|
157
|
+
### Assumptions
|
|
158
|
+
|
|
159
|
+
- [Reasonable default taken to keep progress moving]
|
|
160
|
+
|
|
161
|
+
### Open Questions
|
|
162
|
+
|
|
163
|
+
- [Question that materially affects scope, UX, security, or architecture]
|
|
164
|
+
|
|
165
|
+
## Traceability
|
|
166
|
+
|
|
167
|
+
| Requirement | Scenario / Story | Plan / Task | Status |
|
|
168
|
+
|---|---|---|---|
|
|
169
|
+
| REQ-001 | [Scenario] | [Plan or task] | Pending |
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Minimal spec
|
|
173
|
+
|
|
174
|
+
For small work, use the shortest form that remains testable:
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
# Spec: [Name]
|
|
178
|
+
|
|
179
|
+
## Why
|
|
180
|
+
## Goal
|
|
181
|
+
## Scope
|
|
182
|
+
### In Scope
|
|
183
|
+
### Out of Scope
|
|
184
|
+
## Requirements
|
|
185
|
+
## Acceptance Criteria
|
|
186
|
+
## Assumptions / Open Questions
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Use the full template when the change touches multiple modules, changes public behavior, affects auth/security/data, or will be implemented across multiple sessions.
|
|
190
|
+
|
|
191
|
+
## Requirement rules
|
|
192
|
+
|
|
193
|
+
Write requirements as behavior contracts.
|
|
194
|
+
|
|
195
|
+
Good:
|
|
196
|
+
|
|
197
|
+
```markdown
|
|
198
|
+
### Requirement: Dev gateway status is discoverable
|
|
199
|
+
|
|
200
|
+
The CLI MUST show whether the dev gateway is running, its PID when known, and the command to inspect logs.
|
|
201
|
+
|
|
202
|
+
#### Scenario: Gateway is running
|
|
203
|
+
- GIVEN the dev gateway process is active
|
|
204
|
+
- WHEN an operator runs `pibo gateway dev status`
|
|
205
|
+
- THEN the output includes status, PID, port, and next diagnostic command
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Weak:
|
|
209
|
+
|
|
210
|
+
```markdown
|
|
211
|
+
### Requirement: Improve gateway status
|
|
212
|
+
Make gateway status better and more robust.
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
A requirement is ready when a reviewer can say pass or fail without guessing.
|
|
216
|
+
|
|
217
|
+
## Reuse, parity, and verification clarity
|
|
218
|
+
|
|
219
|
+
When a feature is described as "same as Web", "derived from Web", "reuse the view", "shared UI", "Terminal View", or similar, do not silently reduce that to shared data. State the intended reuse level:
|
|
220
|
+
|
|
221
|
+
- data/state only
|
|
222
|
+
- renderer-neutral view model
|
|
223
|
+
- interaction/controller logic
|
|
224
|
+
- renderer/component logic
|
|
225
|
+
- visual and behavioral parity
|
|
226
|
+
|
|
227
|
+
If visual or behavioral parity is required, add acceptance checks that compare the relevant surfaces with the same fixture or user flow. If parity is intentionally out of scope, say so and describe the user-visible difference.
|
|
228
|
+
|
|
229
|
+
For user-facing UI, CLI, TUI, gateway, runtime, auth, or agent-routing specs, include at least one realistic validation scenario for the default user path when feasible. Fake data, demo mode, mocks, and render snapshots are useful, but they should not be the only acceptance evidence for behavior users will exercise directly unless the real path is unavailable or explicitly out of scope.
|
|
230
|
+
|
|
231
|
+
## Scenario rules
|
|
232
|
+
|
|
233
|
+
Prefer GIVEN / WHEN / THEN for user-visible behavior and system contracts. Use WHEN / THEN only for simple event-response behavior.
|
|
234
|
+
|
|
235
|
+
Cover at least:
|
|
236
|
+
|
|
237
|
+
- primary success path
|
|
238
|
+
- empty or missing state
|
|
239
|
+
- invalid input or permission failure
|
|
240
|
+
- migration or compatibility path when relevant
|
|
241
|
+
|
|
242
|
+
## Proposal structure
|
|
243
|
+
|
|
244
|
+
Use `proposal.md` to explain intent before deep design.
|
|
245
|
+
|
|
246
|
+
```markdown
|
|
247
|
+
# Proposal: [Change]
|
|
248
|
+
|
|
249
|
+
## Why
|
|
250
|
+
|
|
251
|
+
## What Changes
|
|
252
|
+
|
|
253
|
+
## Capabilities
|
|
254
|
+
|
|
255
|
+
### New Capabilities
|
|
256
|
+
- `<kebab-name>`: [brief behavior area]
|
|
257
|
+
|
|
258
|
+
### Modified Capabilities
|
|
259
|
+
- `<existing-name>`: [changed behavior]
|
|
260
|
+
|
|
261
|
+
## Impact
|
|
262
|
+
|
|
263
|
+
- **Code:** ...
|
|
264
|
+
- **APIs / CLI:** ...
|
|
265
|
+
- **Data:** ...
|
|
266
|
+
- **Auth / Security:** ...
|
|
267
|
+
- **Docs:** ...
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## Design structure
|
|
271
|
+
|
|
272
|
+
Use `design.md` when technical choices matter. Keep requirements in the spec; put implementation choices here.
|
|
273
|
+
|
|
274
|
+
```markdown
|
|
275
|
+
# Design: [Change]
|
|
276
|
+
|
|
277
|
+
## Context
|
|
278
|
+
## Goals / Non-Goals
|
|
279
|
+
## Decisions
|
|
280
|
+
### Decision: [Choice]
|
|
281
|
+
- **Choice:** ...
|
|
282
|
+
- **Rationale:** ...
|
|
283
|
+
- **Alternatives considered:** ...
|
|
284
|
+
|
|
285
|
+
## Risks / Trade-offs
|
|
286
|
+
## Migration / Rollback
|
|
287
|
+
## Open Questions
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Tasks structure
|
|
291
|
+
|
|
292
|
+
Use `tasks.md` only after the spec and design are stable enough to act on.
|
|
293
|
+
|
|
294
|
+
```markdown
|
|
295
|
+
# Tasks: [Change]
|
|
296
|
+
|
|
297
|
+
## 1. Setup / Foundation
|
|
298
|
+
- [ ] 1.1 [Concrete task with file path]
|
|
299
|
+
|
|
300
|
+
## 2. Requirement: [Name]
|
|
301
|
+
- [ ] 2.1 [Test or validation task]
|
|
302
|
+
- [ ] 2.2 [Implementation task]
|
|
303
|
+
|
|
304
|
+
## 3. Validation
|
|
305
|
+
- [ ] 3.1 Run [command]
|
|
306
|
+
- [ ] 3.2 Verify [observable behavior]
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Tasks should be small enough for one agent session. Include file paths and validation commands when known.
|
|
310
|
+
|
|
311
|
+
## Review checklist
|
|
312
|
+
|
|
313
|
+
Before treating a spec as ready, check:
|
|
314
|
+
|
|
315
|
+
- [ ] The `Why` names a real problem or opportunity.
|
|
316
|
+
- [ ] The `Goal` is specific and measurable.
|
|
317
|
+
- [ ] Scope has both in-scope and out-of-scope items.
|
|
318
|
+
- [ ] Requirements use MUST or SHALL for mandatory behavior.
|
|
319
|
+
- [ ] Each requirement has acceptance checks or scenarios.
|
|
320
|
+
- [ ] Edge cases include failure and empty-state behavior where relevant.
|
|
321
|
+
- [ ] Assumptions are visible.
|
|
322
|
+
- [ ] Open questions are few and material.
|
|
323
|
+
- [ ] Implementation details live in `design.md` or `tasks.md`, not in behavioral requirements.
|
|
324
|
+
- [ ] The spec is concise, concrete, and free of promotional language.
|
|
325
|
+
|
|
326
|
+
## Writing style
|
|
327
|
+
|
|
328
|
+
Write for humans and agents. Prefer short sentences. Use active voice. Omit needless words. Avoid vague adjectives such as robust, seamless, powerful, and cutting-edge. Replace them with concrete behavior.
|
|
329
|
+
|
|
330
|
+
Use tables only when they make comparison or traceability easier. Do not decorate specs with excessive emoji or bold text.
|