@thiagodiogo/pscode 2.0.0 → 2.1.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/LICENSE +22 -22
- package/README.md +142 -142
- package/bin/pscode.js +4 -4
- package/dist/commands/feedback.js +4 -4
- package/dist/commands/schema.js +60 -60
- package/dist/core/collections/initiatives/templates.js +57 -57
- package/dist/core/command-generation/adapters/claude.js +8 -8
- package/dist/core/command-generation/adapters/codex.js +6 -6
- package/dist/core/command-generation/adapters/cursor.js +8 -8
- package/dist/core/command-generation/adapters/gemini.js +5 -5
- package/dist/core/command-generation/adapters/github-copilot.js +5 -5
- package/dist/core/completions/generators/bash-generator.js +41 -41
- package/dist/core/completions/generators/fish-generator.js +7 -7
- package/dist/core/completions/generators/powershell-generator.js +29 -29
- package/dist/core/completions/generators/zsh-generator.js +33 -33
- package/dist/core/completions/templates/bash-templates.js +24 -24
- package/dist/core/completions/templates/fish-templates.js +38 -38
- package/dist/core/completions/templates/powershell-templates.js +28 -28
- package/dist/core/completions/templates/zsh-templates.js +39 -39
- package/dist/core/profiles.d.ts +1 -1
- package/dist/core/profiles.js +1 -1
- package/dist/core/templates/workflows/apply-change.js +264 -264
- package/dist/core/templates/workflows/archive-change.js +204 -204
- package/dist/core/templates/workflows/bulk-archive-change.js +472 -472
- package/dist/core/templates/workflows/continue-change.js +214 -214
- package/dist/core/templates/workflows/explore.js +735 -735
- package/dist/core/templates/workflows/feedback.js +97 -97
- package/dist/core/templates/workflows/ff-change.js +180 -180
- package/dist/core/templates/workflows/new-change.js +123 -123
- package/dist/core/templates/workflows/onboard.js +584 -584
- package/dist/core/templates/workflows/propose.js +324 -324
- package/dist/core/templates/workflows/trello-draft.js +194 -194
- package/dist/core/templates/workflows/trello-next-step-comment.d.ts +26 -0
- package/dist/core/templates/workflows/trello-next-step-comment.js +58 -0
- package/dist/core/templates/workflows/trello-setup.js +292 -292
- package/dist/core/templates/workflows/verify-change.js +318 -318
- package/dist/core/workspace/open-surface.js +30 -30
- package/package.json +1 -1
- package/schemas/spec-driven/schema.yaml +153 -153
- package/schemas/spec-driven/templates/design.md +19 -19
- package/schemas/spec-driven/templates/proposal.md +23 -23
- package/schemas/spec-driven/templates/spec.md +8 -8
- package/schemas/spec-driven/templates/tasks.md +9 -9
- package/schemas/workspace-planning/schema.yaml +72 -72
- package/schemas/workspace-planning/templates/design.md +33 -33
- package/schemas/workspace-planning/templates/proposal.md +28 -28
- package/schemas/workspace-planning/templates/spec.md +9 -9
- package/schemas/workspace-planning/templates/tasks.md +15 -15
- package/scripts/postinstall.js +83 -83
|
@@ -2,103 +2,103 @@ export function getFeedbackSkillTemplate() {
|
|
|
2
2
|
return {
|
|
3
3
|
name: 'feedback',
|
|
4
4
|
description: 'Collect and submit user feedback about Pscode with context enrichment and anonymization.',
|
|
5
|
-
instructions: `Help the user submit feedback about Pscode.
|
|
6
|
-
|
|
7
|
-
**Goal**: Guide the user through collecting, enriching, and submitting feedback while ensuring privacy through anonymization.
|
|
8
|
-
|
|
9
|
-
**Process**
|
|
10
|
-
|
|
11
|
-
1. **Gather context from the conversation**
|
|
12
|
-
- Review recent conversation history for context
|
|
13
|
-
- Identify what task was being performed
|
|
14
|
-
- Note what worked well or poorly
|
|
15
|
-
- Capture specific friction points or praise
|
|
16
|
-
|
|
17
|
-
2. **Draft enriched feedback**
|
|
18
|
-
- Create a clear, descriptive title (single sentence, no "Feedback:" prefix needed)
|
|
19
|
-
- Write a body that includes:
|
|
20
|
-
- What the user was trying to do
|
|
21
|
-
- What happened (good or bad)
|
|
22
|
-
- Relevant context from the conversation
|
|
23
|
-
- Any specific suggestions or requests
|
|
24
|
-
|
|
25
|
-
3. **Anonymize sensitive information**
|
|
26
|
-
- Replace file paths with \`<path>\` or generic descriptions
|
|
27
|
-
- Replace API keys, tokens, secrets with \`<redacted>\`
|
|
28
|
-
- Replace company/organization names with \`<company>\`
|
|
29
|
-
- Replace personal names with \`<user>\`
|
|
30
|
-
- Replace specific URLs with \`<url>\` unless public/relevant
|
|
31
|
-
- Keep technical details that help understand the issue
|
|
32
|
-
|
|
33
|
-
4. **Present draft for approval**
|
|
34
|
-
- Show the complete draft to the user
|
|
35
|
-
- Display both title and body clearly
|
|
36
|
-
- Ask for explicit approval before submitting
|
|
37
|
-
- Allow the user to request modifications
|
|
38
|
-
|
|
39
|
-
5. **Submit on confirmation**
|
|
40
|
-
- Use the \`pscode feedback\` command to submit
|
|
41
|
-
- Format: \`pscode feedback "title" --body "body content"\`
|
|
42
|
-
- The command will automatically add metadata (version, platform, timestamp)
|
|
43
|
-
|
|
44
|
-
**Example Draft**
|
|
45
|
-
|
|
46
|
-
\`\`\`
|
|
47
|
-
Title: Error handling in artifact workflow needs improvement
|
|
48
|
-
|
|
49
|
-
Body:
|
|
50
|
-
I was working on creating a new change and encountered an issue with
|
|
51
|
-
the artifact workflow. When I tried to continue after creating the
|
|
52
|
-
proposal, the system didn't clearly indicate that I needed to complete
|
|
53
|
-
the specs first.
|
|
54
|
-
|
|
55
|
-
Suggestion: Add clearer error messages that explain dependency chains
|
|
56
|
-
in the artifact workflow. Something like "Cannot create design.md
|
|
57
|
-
because specs are not complete (0/2 done)."
|
|
58
|
-
|
|
59
|
-
Context: Using the spec-driven schema with <path>/my-project
|
|
60
|
-
\`\`\`
|
|
61
|
-
|
|
62
|
-
**Anonymization Examples**
|
|
63
|
-
|
|
64
|
-
Before:
|
|
65
|
-
\`\`\`
|
|
66
|
-
Working on /Users/john/mycompany/auth-service/src/oauth.ts
|
|
67
|
-
Failed with API key: sk_live_abc123xyz
|
|
68
|
-
Working at Acme Corp
|
|
69
|
-
\`\`\`
|
|
70
|
-
|
|
71
|
-
After:
|
|
72
|
-
\`\`\`
|
|
73
|
-
Working on <path>/oauth.ts
|
|
74
|
-
Failed with API key: <redacted>
|
|
75
|
-
Working at <company>
|
|
76
|
-
\`\`\`
|
|
77
|
-
|
|
78
|
-
**Guardrails**
|
|
79
|
-
|
|
80
|
-
- MUST show complete draft before submitting
|
|
81
|
-
- MUST ask for explicit approval
|
|
82
|
-
- MUST anonymize sensitive information
|
|
83
|
-
- ALLOW user to modify draft before submitting
|
|
84
|
-
- DO NOT submit without user confirmation
|
|
85
|
-
- DO include relevant technical context
|
|
86
|
-
- DO keep conversation-specific insights
|
|
87
|
-
|
|
88
|
-
**User Confirmation Required**
|
|
89
|
-
|
|
90
|
-
Always ask:
|
|
91
|
-
\`\`\`
|
|
92
|
-
Here's the feedback I've drafted:
|
|
93
|
-
|
|
94
|
-
Title: [title]
|
|
95
|
-
|
|
96
|
-
Body:
|
|
97
|
-
[body]
|
|
98
|
-
|
|
99
|
-
Does this look good? I can modify it if you'd like, or submit it as-is.
|
|
100
|
-
\`\`\`
|
|
101
|
-
|
|
5
|
+
instructions: `Help the user submit feedback about Pscode.
|
|
6
|
+
|
|
7
|
+
**Goal**: Guide the user through collecting, enriching, and submitting feedback while ensuring privacy through anonymization.
|
|
8
|
+
|
|
9
|
+
**Process**
|
|
10
|
+
|
|
11
|
+
1. **Gather context from the conversation**
|
|
12
|
+
- Review recent conversation history for context
|
|
13
|
+
- Identify what task was being performed
|
|
14
|
+
- Note what worked well or poorly
|
|
15
|
+
- Capture specific friction points or praise
|
|
16
|
+
|
|
17
|
+
2. **Draft enriched feedback**
|
|
18
|
+
- Create a clear, descriptive title (single sentence, no "Feedback:" prefix needed)
|
|
19
|
+
- Write a body that includes:
|
|
20
|
+
- What the user was trying to do
|
|
21
|
+
- What happened (good or bad)
|
|
22
|
+
- Relevant context from the conversation
|
|
23
|
+
- Any specific suggestions or requests
|
|
24
|
+
|
|
25
|
+
3. **Anonymize sensitive information**
|
|
26
|
+
- Replace file paths with \`<path>\` or generic descriptions
|
|
27
|
+
- Replace API keys, tokens, secrets with \`<redacted>\`
|
|
28
|
+
- Replace company/organization names with \`<company>\`
|
|
29
|
+
- Replace personal names with \`<user>\`
|
|
30
|
+
- Replace specific URLs with \`<url>\` unless public/relevant
|
|
31
|
+
- Keep technical details that help understand the issue
|
|
32
|
+
|
|
33
|
+
4. **Present draft for approval**
|
|
34
|
+
- Show the complete draft to the user
|
|
35
|
+
- Display both title and body clearly
|
|
36
|
+
- Ask for explicit approval before submitting
|
|
37
|
+
- Allow the user to request modifications
|
|
38
|
+
|
|
39
|
+
5. **Submit on confirmation**
|
|
40
|
+
- Use the \`pscode feedback\` command to submit
|
|
41
|
+
- Format: \`pscode feedback "title" --body "body content"\`
|
|
42
|
+
- The command will automatically add metadata (version, platform, timestamp)
|
|
43
|
+
|
|
44
|
+
**Example Draft**
|
|
45
|
+
|
|
46
|
+
\`\`\`
|
|
47
|
+
Title: Error handling in artifact workflow needs improvement
|
|
48
|
+
|
|
49
|
+
Body:
|
|
50
|
+
I was working on creating a new change and encountered an issue with
|
|
51
|
+
the artifact workflow. When I tried to continue after creating the
|
|
52
|
+
proposal, the system didn't clearly indicate that I needed to complete
|
|
53
|
+
the specs first.
|
|
54
|
+
|
|
55
|
+
Suggestion: Add clearer error messages that explain dependency chains
|
|
56
|
+
in the artifact workflow. Something like "Cannot create design.md
|
|
57
|
+
because specs are not complete (0/2 done)."
|
|
58
|
+
|
|
59
|
+
Context: Using the spec-driven schema with <path>/my-project
|
|
60
|
+
\`\`\`
|
|
61
|
+
|
|
62
|
+
**Anonymization Examples**
|
|
63
|
+
|
|
64
|
+
Before:
|
|
65
|
+
\`\`\`
|
|
66
|
+
Working on /Users/john/mycompany/auth-service/src/oauth.ts
|
|
67
|
+
Failed with API key: sk_live_abc123xyz
|
|
68
|
+
Working at Acme Corp
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
After:
|
|
72
|
+
\`\`\`
|
|
73
|
+
Working on <path>/oauth.ts
|
|
74
|
+
Failed with API key: <redacted>
|
|
75
|
+
Working at <company>
|
|
76
|
+
\`\`\`
|
|
77
|
+
|
|
78
|
+
**Guardrails**
|
|
79
|
+
|
|
80
|
+
- MUST show complete draft before submitting
|
|
81
|
+
- MUST ask for explicit approval
|
|
82
|
+
- MUST anonymize sensitive information
|
|
83
|
+
- ALLOW user to modify draft before submitting
|
|
84
|
+
- DO NOT submit without user confirmation
|
|
85
|
+
- DO include relevant technical context
|
|
86
|
+
- DO keep conversation-specific insights
|
|
87
|
+
|
|
88
|
+
**User Confirmation Required**
|
|
89
|
+
|
|
90
|
+
Always ask:
|
|
91
|
+
\`\`\`
|
|
92
|
+
Here's the feedback I've drafted:
|
|
93
|
+
|
|
94
|
+
Title: [title]
|
|
95
|
+
|
|
96
|
+
Body:
|
|
97
|
+
[body]
|
|
98
|
+
|
|
99
|
+
Does this look good? I can modify it if you'd like, or submit it as-is.
|
|
100
|
+
\`\`\`
|
|
101
|
+
|
|
102
102
|
Only proceed with submission after user confirms.`,
|
|
103
103
|
license: 'MIT',
|
|
104
104
|
compatibility: 'Requires pscode CLI.',
|
|
@@ -2,96 +2,96 @@ export function getFfChangeSkillTemplate() {
|
|
|
2
2
|
return {
|
|
3
3
|
name: 'pscode-ff-change',
|
|
4
4
|
description: 'Fast-forward through Pscode artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.',
|
|
5
|
-
instructions: `Fast-forward through artifact creation - generate everything needed to start implementation in one go.
|
|
6
|
-
|
|
7
|
-
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
8
|
-
|
|
9
|
-
**Steps**
|
|
10
|
-
|
|
11
|
-
1. **If no clear input provided, ask what they want to build**
|
|
12
|
-
|
|
13
|
-
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
14
|
-
> "What change do you want to work on? Describe what you want to build or fix."
|
|
15
|
-
|
|
16
|
-
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
17
|
-
|
|
18
|
-
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
19
|
-
|
|
20
|
-
2. **Create the change directory**
|
|
21
|
-
\`\`\`bash
|
|
22
|
-
pscode new change "<name>"
|
|
23
|
-
\`\`\`
|
|
24
|
-
This creates a scaffolded change in the planning home resolved by the CLI.
|
|
25
|
-
|
|
26
|
-
3. **Get the artifact build order**
|
|
27
|
-
\`\`\`bash
|
|
28
|
-
pscode status --change "<name>" --json
|
|
29
|
-
\`\`\`
|
|
30
|
-
Parse the JSON to get:
|
|
31
|
-
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
32
|
-
- \`artifacts\`: list of all artifacts with their status and dependencies
|
|
33
|
-
- \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
|
|
34
|
-
|
|
35
|
-
4. **Create artifacts in sequence until apply-ready**
|
|
36
|
-
|
|
37
|
-
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
38
|
-
|
|
39
|
-
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
40
|
-
|
|
41
|
-
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
42
|
-
- Get instructions:
|
|
43
|
-
\`\`\`bash
|
|
44
|
-
pscode instructions <artifact-id> --change "<name>" --json
|
|
45
|
-
\`\`\`
|
|
46
|
-
- The instructions JSON includes:
|
|
47
|
-
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
48
|
-
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
49
|
-
- \`template\`: The structure to use for your output file
|
|
50
|
-
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
51
|
-
- \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
|
|
52
|
-
- \`dependencies\`: Completed artifacts to read for context
|
|
53
|
-
- Read any completed dependency files for context
|
|
54
|
-
- Create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`
|
|
55
|
-
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
56
|
-
- Show brief progress: "✓ Created <artifact-id>"
|
|
57
|
-
|
|
58
|
-
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
59
|
-
- After creating each artifact, re-run \`pscode status --change "<name>" --json\`
|
|
60
|
-
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
61
|
-
- Stop when all \`applyRequires\` artifacts are done
|
|
62
|
-
|
|
63
|
-
c. **If an artifact requires user input** (unclear context):
|
|
64
|
-
- Use **AskUserQuestion tool** to clarify
|
|
65
|
-
- Then continue with creation
|
|
66
|
-
|
|
67
|
-
5. **Show final status**
|
|
68
|
-
\`\`\`bash
|
|
69
|
-
pscode status --change "<name>"
|
|
70
|
-
\`\`\`
|
|
71
|
-
|
|
72
|
-
**Output**
|
|
73
|
-
|
|
74
|
-
After completing all artifacts, summarize:
|
|
75
|
-
- Change name and location
|
|
76
|
-
- List of artifacts created with brief descriptions
|
|
77
|
-
- What's ready: "All artifacts created! Ready for implementation."
|
|
78
|
-
- Prompt: "Run \`/ps:apply\` or ask me to implement to start working on the tasks."
|
|
79
|
-
|
|
80
|
-
**Artifact Creation Guidelines**
|
|
81
|
-
|
|
82
|
-
- Follow the \`instruction\` field from \`pscode instructions\` for each artifact type
|
|
83
|
-
- The schema defines what each artifact should contain - follow it
|
|
84
|
-
- Read dependency artifacts for context before creating new ones
|
|
85
|
-
- Use \`template\` as the structure for your output file - fill in its sections
|
|
86
|
-
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
87
|
-
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
88
|
-
- These guide what you write, but should never appear in the output
|
|
89
|
-
|
|
90
|
-
**Guardrails**
|
|
91
|
-
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
92
|
-
- Always read dependency artifacts before creating a new one
|
|
93
|
-
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
94
|
-
- If a change with that name already exists, suggest continuing that change instead
|
|
5
|
+
instructions: `Fast-forward through artifact creation - generate everything needed to start implementation in one go.
|
|
6
|
+
|
|
7
|
+
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
8
|
+
|
|
9
|
+
**Steps**
|
|
10
|
+
|
|
11
|
+
1. **If no clear input provided, ask what they want to build**
|
|
12
|
+
|
|
13
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
14
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
15
|
+
|
|
16
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
17
|
+
|
|
18
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
19
|
+
|
|
20
|
+
2. **Create the change directory**
|
|
21
|
+
\`\`\`bash
|
|
22
|
+
pscode new change "<name>"
|
|
23
|
+
\`\`\`
|
|
24
|
+
This creates a scaffolded change in the planning home resolved by the CLI.
|
|
25
|
+
|
|
26
|
+
3. **Get the artifact build order**
|
|
27
|
+
\`\`\`bash
|
|
28
|
+
pscode status --change "<name>" --json
|
|
29
|
+
\`\`\`
|
|
30
|
+
Parse the JSON to get:
|
|
31
|
+
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
32
|
+
- \`artifacts\`: list of all artifacts with their status and dependencies
|
|
33
|
+
- \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
|
|
34
|
+
|
|
35
|
+
4. **Create artifacts in sequence until apply-ready**
|
|
36
|
+
|
|
37
|
+
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
38
|
+
|
|
39
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
40
|
+
|
|
41
|
+
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
42
|
+
- Get instructions:
|
|
43
|
+
\`\`\`bash
|
|
44
|
+
pscode instructions <artifact-id> --change "<name>" --json
|
|
45
|
+
\`\`\`
|
|
46
|
+
- The instructions JSON includes:
|
|
47
|
+
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
48
|
+
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
49
|
+
- \`template\`: The structure to use for your output file
|
|
50
|
+
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
51
|
+
- \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
|
|
52
|
+
- \`dependencies\`: Completed artifacts to read for context
|
|
53
|
+
- Read any completed dependency files for context
|
|
54
|
+
- Create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`
|
|
55
|
+
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
56
|
+
- Show brief progress: "✓ Created <artifact-id>"
|
|
57
|
+
|
|
58
|
+
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
59
|
+
- After creating each artifact, re-run \`pscode status --change "<name>" --json\`
|
|
60
|
+
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
61
|
+
- Stop when all \`applyRequires\` artifacts are done
|
|
62
|
+
|
|
63
|
+
c. **If an artifact requires user input** (unclear context):
|
|
64
|
+
- Use **AskUserQuestion tool** to clarify
|
|
65
|
+
- Then continue with creation
|
|
66
|
+
|
|
67
|
+
5. **Show final status**
|
|
68
|
+
\`\`\`bash
|
|
69
|
+
pscode status --change "<name>"
|
|
70
|
+
\`\`\`
|
|
71
|
+
|
|
72
|
+
**Output**
|
|
73
|
+
|
|
74
|
+
After completing all artifacts, summarize:
|
|
75
|
+
- Change name and location
|
|
76
|
+
- List of artifacts created with brief descriptions
|
|
77
|
+
- What's ready: "All artifacts created! Ready for implementation."
|
|
78
|
+
- Prompt: "Run \`/ps:apply\` or ask me to implement to start working on the tasks."
|
|
79
|
+
|
|
80
|
+
**Artifact Creation Guidelines**
|
|
81
|
+
|
|
82
|
+
- Follow the \`instruction\` field from \`pscode instructions\` for each artifact type
|
|
83
|
+
- The schema defines what each artifact should contain - follow it
|
|
84
|
+
- Read dependency artifacts for context before creating new ones
|
|
85
|
+
- Use \`template\` as the structure for your output file - fill in its sections
|
|
86
|
+
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
87
|
+
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
88
|
+
- These guide what you write, but should never appear in the output
|
|
89
|
+
|
|
90
|
+
**Guardrails**
|
|
91
|
+
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
92
|
+
- Always read dependency artifacts before creating a new one
|
|
93
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
94
|
+
- If a change with that name already exists, suggest continuing that change instead
|
|
95
95
|
- Verify each artifact file exists after writing before proceeding to next`,
|
|
96
96
|
license: 'MIT',
|
|
97
97
|
compatibility: 'Requires pscode CLI.',
|
|
@@ -104,96 +104,96 @@ export function getPsFfCommandTemplate() {
|
|
|
104
104
|
description: 'Create a change and generate all artifacts needed for implementation in one go',
|
|
105
105
|
category: 'Workflow',
|
|
106
106
|
tags: ['workflow', 'artifacts', 'experimental'],
|
|
107
|
-
content: `Fast-forward through artifact creation - generate everything needed to start implementation.
|
|
108
|
-
|
|
109
|
-
**Input**: The argument after \`/ps:ff\` is the change name (kebab-case), OR a description of what the user wants to build.
|
|
110
|
-
|
|
111
|
-
**Steps**
|
|
112
|
-
|
|
113
|
-
1. **If no input provided, ask what they want to build**
|
|
114
|
-
|
|
115
|
-
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
116
|
-
> "What change do you want to work on? Describe what you want to build or fix."
|
|
117
|
-
|
|
118
|
-
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
119
|
-
|
|
120
|
-
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
121
|
-
|
|
122
|
-
2. **Create the change directory**
|
|
123
|
-
\`\`\`bash
|
|
124
|
-
pscode new change "<name>"
|
|
125
|
-
\`\`\`
|
|
126
|
-
This creates a scaffolded change in the planning home resolved by the CLI.
|
|
127
|
-
|
|
128
|
-
3. **Get the artifact build order**
|
|
129
|
-
\`\`\`bash
|
|
130
|
-
pscode status --change "<name>" --json
|
|
131
|
-
\`\`\`
|
|
132
|
-
Parse the JSON to get:
|
|
133
|
-
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
134
|
-
- \`artifacts\`: list of all artifacts with their status and dependencies
|
|
135
|
-
- \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
|
|
136
|
-
|
|
137
|
-
4. **Create artifacts in sequence until apply-ready**
|
|
138
|
-
|
|
139
|
-
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
140
|
-
|
|
141
|
-
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
142
|
-
|
|
143
|
-
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
144
|
-
- Get instructions:
|
|
145
|
-
\`\`\`bash
|
|
146
|
-
pscode instructions <artifact-id> --change "<name>" --json
|
|
147
|
-
\`\`\`
|
|
148
|
-
- The instructions JSON includes:
|
|
149
|
-
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
150
|
-
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
151
|
-
- \`template\`: The structure to use for your output file
|
|
152
|
-
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
153
|
-
- \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
|
|
154
|
-
- \`dependencies\`: Completed artifacts to read for context
|
|
155
|
-
- Read any completed dependency files for context
|
|
156
|
-
- Create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`
|
|
157
|
-
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
158
|
-
- Show brief progress: "✓ Created <artifact-id>"
|
|
159
|
-
|
|
160
|
-
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
161
|
-
- After creating each artifact, re-run \`pscode status --change "<name>" --json\`
|
|
162
|
-
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
163
|
-
- Stop when all \`applyRequires\` artifacts are done
|
|
164
|
-
|
|
165
|
-
c. **If an artifact requires user input** (unclear context):
|
|
166
|
-
- Use **AskUserQuestion tool** to clarify
|
|
167
|
-
- Then continue with creation
|
|
168
|
-
|
|
169
|
-
5. **Show final status**
|
|
170
|
-
\`\`\`bash
|
|
171
|
-
pscode status --change "<name>"
|
|
172
|
-
\`\`\`
|
|
173
|
-
|
|
174
|
-
**Output**
|
|
175
|
-
|
|
176
|
-
After completing all artifacts, summarize:
|
|
177
|
-
- Change name and location
|
|
178
|
-
- List of artifacts created with brief descriptions
|
|
179
|
-
- What's ready: "All artifacts created! Ready for implementation."
|
|
180
|
-
- Prompt: "Run \`/ps:apply\` to start implementing."
|
|
181
|
-
|
|
182
|
-
**Artifact Creation Guidelines**
|
|
183
|
-
|
|
184
|
-
- Follow the \`instruction\` field from \`pscode instructions\` for each artifact type
|
|
185
|
-
- The schema defines what each artifact should contain - follow it
|
|
186
|
-
- Read dependency artifacts for context before creating new ones
|
|
187
|
-
- Use \`template\` as the structure for your output file - fill in its sections
|
|
188
|
-
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
189
|
-
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
190
|
-
- These guide what you write, but should never appear in the output
|
|
191
|
-
|
|
192
|
-
**Guardrails**
|
|
193
|
-
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
194
|
-
- Always read dependency artifacts before creating a new one
|
|
195
|
-
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
196
|
-
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
107
|
+
content: `Fast-forward through artifact creation - generate everything needed to start implementation.
|
|
108
|
+
|
|
109
|
+
**Input**: The argument after \`/ps:ff\` is the change name (kebab-case), OR a description of what the user wants to build.
|
|
110
|
+
|
|
111
|
+
**Steps**
|
|
112
|
+
|
|
113
|
+
1. **If no input provided, ask what they want to build**
|
|
114
|
+
|
|
115
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
116
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
117
|
+
|
|
118
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → \`add-user-auth\`).
|
|
119
|
+
|
|
120
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
121
|
+
|
|
122
|
+
2. **Create the change directory**
|
|
123
|
+
\`\`\`bash
|
|
124
|
+
pscode new change "<name>"
|
|
125
|
+
\`\`\`
|
|
126
|
+
This creates a scaffolded change in the planning home resolved by the CLI.
|
|
127
|
+
|
|
128
|
+
3. **Get the artifact build order**
|
|
129
|
+
\`\`\`bash
|
|
130
|
+
pscode status --change "<name>" --json
|
|
131
|
+
\`\`\`
|
|
132
|
+
Parse the JSON to get:
|
|
133
|
+
- \`applyRequires\`: array of artifact IDs needed before implementation (e.g., \`["tasks"]\`)
|
|
134
|
+
- \`artifacts\`: list of all artifacts with their status and dependencies
|
|
135
|
+
- \`planningHome\`, \`changeRoot\`, \`artifactPaths\`, and \`actionContext\`: path and scope context. Use these instead of assuming repo-local paths.
|
|
136
|
+
|
|
137
|
+
4. **Create artifacts in sequence until apply-ready**
|
|
138
|
+
|
|
139
|
+
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
140
|
+
|
|
141
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
142
|
+
|
|
143
|
+
a. **For each artifact that is \`ready\` (dependencies satisfied)**:
|
|
144
|
+
- Get instructions:
|
|
145
|
+
\`\`\`bash
|
|
146
|
+
pscode instructions <artifact-id> --change "<name>" --json
|
|
147
|
+
\`\`\`
|
|
148
|
+
- The instructions JSON includes:
|
|
149
|
+
- \`context\`: Project background (constraints for you - do NOT include in output)
|
|
150
|
+
- \`rules\`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
151
|
+
- \`template\`: The structure to use for your output file
|
|
152
|
+
- \`instruction\`: Schema-specific guidance for this artifact type
|
|
153
|
+
- \`resolvedOutputPath\`: Resolved path or pattern to write the artifact
|
|
154
|
+
- \`dependencies\`: Completed artifacts to read for context
|
|
155
|
+
- Read any completed dependency files for context
|
|
156
|
+
- Create the artifact file using \`template\` as the structure and write it to \`resolvedOutputPath\`
|
|
157
|
+
- Apply \`context\` and \`rules\` as constraints - but do NOT copy them into the file
|
|
158
|
+
- Show brief progress: "✓ Created <artifact-id>"
|
|
159
|
+
|
|
160
|
+
b. **Continue until all \`applyRequires\` artifacts are complete**
|
|
161
|
+
- After creating each artifact, re-run \`pscode status --change "<name>" --json\`
|
|
162
|
+
- Check if every artifact ID in \`applyRequires\` has \`status: "done"\` in the artifacts array
|
|
163
|
+
- Stop when all \`applyRequires\` artifacts are done
|
|
164
|
+
|
|
165
|
+
c. **If an artifact requires user input** (unclear context):
|
|
166
|
+
- Use **AskUserQuestion tool** to clarify
|
|
167
|
+
- Then continue with creation
|
|
168
|
+
|
|
169
|
+
5. **Show final status**
|
|
170
|
+
\`\`\`bash
|
|
171
|
+
pscode status --change "<name>"
|
|
172
|
+
\`\`\`
|
|
173
|
+
|
|
174
|
+
**Output**
|
|
175
|
+
|
|
176
|
+
After completing all artifacts, summarize:
|
|
177
|
+
- Change name and location
|
|
178
|
+
- List of artifacts created with brief descriptions
|
|
179
|
+
- What's ready: "All artifacts created! Ready for implementation."
|
|
180
|
+
- Prompt: "Run \`/ps:apply\` to start implementing."
|
|
181
|
+
|
|
182
|
+
**Artifact Creation Guidelines**
|
|
183
|
+
|
|
184
|
+
- Follow the \`instruction\` field from \`pscode instructions\` for each artifact type
|
|
185
|
+
- The schema defines what each artifact should contain - follow it
|
|
186
|
+
- Read dependency artifacts for context before creating new ones
|
|
187
|
+
- Use \`template\` as the structure for your output file - fill in its sections
|
|
188
|
+
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
189
|
+
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
190
|
+
- These guide what you write, but should never appear in the output
|
|
191
|
+
|
|
192
|
+
**Guardrails**
|
|
193
|
+
- Create ALL artifacts needed for implementation (as defined by schema's \`apply.requires\`)
|
|
194
|
+
- Always read dependency artifacts before creating a new one
|
|
195
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
196
|
+
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
197
197
|
- Verify each artifact file exists after writing before proceeding to next`
|
|
198
198
|
};
|
|
199
199
|
}
|