@protolabsai/proto 0.21.0 → 0.22.0
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/bundled/sprint-contract/SKILL.md +62 -0
- package/cli.js +2720 -2349
- package/package.json +2 -2
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sprint-contract
|
|
3
|
+
description: Negotiate a sprint contract before coding — locks down exactly which files will be touched, what will change, and the acceptance criteria. Activates the scope lock to prevent scope creep.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Sprint Contract
|
|
7
|
+
|
|
8
|
+
Produce an explicit, machine-readable sprint contract before writing any code.
|
|
9
|
+
The contract defines the permitted file set (scope lock), acceptance criteria,
|
|
10
|
+
and a sequenced implementation plan.
|
|
11
|
+
|
|
12
|
+
**Announce at start:** "I'm using the sprint-contract skill to negotiate the contract before coding."
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
1. **Read the task** — understand exactly what is being asked
|
|
17
|
+
2. **Explore** — use fff**grep and fff**find_files to locate relevant files; read key files to understand current state
|
|
18
|
+
3. **Identify the change surface** — determine the minimum set of files that must change
|
|
19
|
+
4. **Produce the contract** — output a JSON contract (see format below)
|
|
20
|
+
5. **Activate scope lock** — write the contract to `.proto/sprint-contract.json` so the harness can enforce the file set
|
|
21
|
+
|
|
22
|
+
## Contract Format
|
|
23
|
+
|
|
24
|
+
Output a JSON block with this exact structure:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"task": "one-sentence description of what will be built",
|
|
29
|
+
"filesToCreate": ["/absolute/path/to/new/file.ts"],
|
|
30
|
+
"filesToModify": ["/absolute/path/to/existing/file.ts"],
|
|
31
|
+
"functionsToChange": {
|
|
32
|
+
"/absolute/path/to/file.ts": ["functionName", "ClassName.methodName"]
|
|
33
|
+
},
|
|
34
|
+
"acceptanceCriteria": [
|
|
35
|
+
"The X test passes",
|
|
36
|
+
"Feature Y is accessible via Z",
|
|
37
|
+
"No existing tests are broken"
|
|
38
|
+
],
|
|
39
|
+
"implementationSequence": [
|
|
40
|
+
"1. Add type definitions to types.ts",
|
|
41
|
+
"2. Implement service in service.ts",
|
|
42
|
+
"3. Wire into existing call site in client.ts",
|
|
43
|
+
"4. Add tests"
|
|
44
|
+
],
|
|
45
|
+
"risks": ["Changing X may affect Y — verify after"]
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Rules
|
|
50
|
+
|
|
51
|
+
- **Minimize scope**: only include files that genuinely need to change
|
|
52
|
+
- **Absolute paths**: all file paths must be absolute
|
|
53
|
+
- **No speculation**: only include files you have verified exist (via read or search)
|
|
54
|
+
- **Testable criteria**: each acceptance criterion must be objectively verifiable
|
|
55
|
+
- **Sequenced implementation**: order steps to minimize breakage (types → impl → tests)
|
|
56
|
+
|
|
57
|
+
## After the Contract
|
|
58
|
+
|
|
59
|
+
Write the JSON to `.proto/sprint-contract.json` in the project root.
|
|
60
|
+
Then report: "Sprint contract negotiated. Scope lock activated for N files."
|
|
61
|
+
|
|
62
|
+
The harness will automatically prevent edits to files outside the contract's file set.
|