@thiagodiogo/pscode 2.1.0 → 2.2.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/dist/cli/index.js +3 -0
- package/dist/core/completions/command-registry.js +8 -0
- package/dist/core/config-prompts.d.ts +1 -1
- package/dist/core/config-prompts.js +8 -1
- package/dist/core/init.d.ts +3 -0
- package/dist/core/init.js +83 -4
- package/dist/core/pr-init-prompt.d.ts +13 -0
- package/dist/core/pr-init-prompt.js +76 -0
- package/dist/core/presets/dixi.d.ts +1 -0
- package/dist/core/presets/dixi.js +15 -25
- package/dist/core/profile-sync-drift.js +2 -0
- package/dist/core/profiles.d.ts +4 -4
- package/dist/core/profiles.js +4 -3
- package/dist/core/project-config.d.ts +31 -0
- package/dist/core/project-config.js +24 -0
- package/dist/core/shared/skill-generation.js +5 -2
- package/dist/core/templates/skill-templates.d.ts +1 -0
- package/dist/core/templates/skill-templates.js +2 -0
- package/dist/core/templates/types.d.ts +0 -1
- package/dist/core/templates/workflows/apply-change.js +27 -3
- package/dist/core/templates/workflows/archive-change.js +0 -1
- package/dist/core/templates/workflows/bulk-archive-change.js +0 -1
- package/dist/core/templates/workflows/continue-change.js +0 -1
- package/dist/core/templates/workflows/explore.js +0 -1
- package/dist/core/templates/workflows/feedback.js +0 -1
- package/dist/core/templates/workflows/ff-change.js +0 -1
- package/dist/core/templates/workflows/handoff.d.ts +10 -0
- package/dist/core/templates/workflows/handoff.js +31 -0
- package/dist/core/templates/workflows/new-change.js +0 -1
- package/dist/core/templates/workflows/onboard.js +0 -1
- package/dist/core/templates/workflows/propose.js +45 -31
- package/dist/core/templates/workflows/trello-draft.js +4 -16
- package/dist/core/templates/workflows/trello-next-step-comment.d.ts +22 -15
- package/dist/core/templates/workflows/trello-next-step-comment.js +69 -31
- package/dist/core/templates/workflows/trello-setup.js +0 -1
- package/dist/core/templates/workflows/verify-change.js +0 -1
- package/package.json +1 -1
- package/pscode/content/dixi/commands/ps/apply.md +15 -0
- package/pscode/content/dixi/commands/ps/archive.md +14 -0
- package/pscode/content/dixi/commands/ps/complete.md +14 -0
- package/pscode/content/dixi/commands/ps/draft.md +15 -0
- package/pscode/content/dixi/commands/ps/explore.md +14 -0
- package/pscode/content/dixi/commands/ps/propose.md +14 -0
- package/pscode/content/dixi/commands/ps/trello-setup.md +14 -0
- package/pscode/content/dixi/commands/pstld/adr.md +75 -0
- package/pscode/content/dixi/commands/pstld/arch-check.md +64 -0
- package/pscode/content/dixi/commands/pstld/dod.md +66 -0
- package/pscode/content/dixi/commands/pstld/jira-draft.md +80 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { buildNextStepComment } from './trello-next-step-comment.js';
|
|
1
2
|
export function getApplyChangeSkillTemplate() {
|
|
2
3
|
return {
|
|
3
4
|
name: 'pscode-apply-change',
|
|
4
5
|
description: 'Implement tasks from an Pscode change. Use when the user wants to start implementing, continue implementation, or work through tasks.',
|
|
5
6
|
instructions: getApplyInstructions(),
|
|
6
|
-
license: 'MIT',
|
|
7
7
|
compatibility: 'Requires pscode CLI.',
|
|
8
8
|
metadata: { author: 'pscode', version: '1.0' },
|
|
9
9
|
};
|
|
@@ -18,6 +18,13 @@ export function getPsApplyCommandTemplate() {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
function getApplyInstructions() {
|
|
21
|
+
// Pre-filled next-step comment (card title interpolated), shared via the
|
|
22
|
+
// trello-next-step-comment utility and indented to sit inside the Trello
|
|
23
|
+
// comment `text: |` block in the testing phase below.
|
|
24
|
+
const completeNextStep = buildNextStepComment('<card title>', '/ps:complete')
|
|
25
|
+
.split('\n')
|
|
26
|
+
.map((line) => (line.length > 0 ? ` ${line}` : ''))
|
|
27
|
+
.join('\n');
|
|
21
28
|
return `Implement tasks from a Pscode change.
|
|
22
29
|
|
|
23
30
|
**Input**: Optionally specify a change name (e.g., \`/ps:apply add-auth\`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
@@ -94,10 +101,27 @@ function getApplyInstructions() {
|
|
|
94
101
|
|
|
95
102
|
**Workspace guard:** If status JSON reports \`actionContext.mode: "workspace-planning"\` and \`allowedEditRoots\` is empty, explain that full workspace apply is not supported in this slice. Treat linked repos and folders as read-only context, ask the user to select an affected area, and STOP before editing files.
|
|
96
103
|
|
|
97
|
-
5. **Read context files**
|
|
104
|
+
5. **Read context files and PR config**
|
|
98
105
|
|
|
99
106
|
Read every file path listed under \`contextFiles\` from the apply instructions output.
|
|
100
107
|
|
|
108
|
+
Additionally, use the **Read tool** to read \`pscode/config.yaml\` from the current working directory.
|
|
109
|
+
|
|
110
|
+
**If \`pscode/config.yaml\` exists and \`pr.enabled: true\`:**
|
|
111
|
+
|
|
112
|
+
Before starting any implementation, inform the user of the PR workflow requirements:
|
|
113
|
+
|
|
114
|
+
> 🔀 **Workflow de PR ativo** — este projeto requer branches dedicadas e Pull Requests.
|
|
115
|
+
> - Branch: crie uma branch com o padrão \`<pr.branch.pattern>\` antes de codificar
|
|
116
|
+
> - Título do PR: \`<pr.title.template>\`
|
|
117
|
+
> - Descrição do PR: use o template definido em \`pr.description.template\`
|
|
118
|
+
> - Ao abrir o PR: \`<"comente o link do PR nesta task" se pr.comments.linkInTask: true, senão omita>\`
|
|
119
|
+
|
|
120
|
+
The agent MUST create the branch with the configured pattern before making any code changes.
|
|
121
|
+
Template variables available: \`{change-name}\` = current change name, \`{type}\` = feat/fix/chore, \`{ticket}\` = ticket ID if available.
|
|
122
|
+
|
|
123
|
+
**If \`pscode/config.yaml\` does not exist, or \`pr.enabled: false\`, or file not found:** continue normally without any PR instructions.
|
|
124
|
+
|
|
101
125
|
6. **Show current progress**
|
|
102
126
|
|
|
103
127
|
Display:
|
|
@@ -182,7 +206,7 @@ function getApplyInstructions() {
|
|
|
182
206
|
Testado por: <usuario / Claude>
|
|
183
207
|
Status: Funcionando
|
|
184
208
|
|
|
185
|
-
|
|
209
|
+
${completeNextStep}
|
|
186
210
|
\`\`\`
|
|
187
211
|
|
|
188
212
|
If any Trello call fails, continue — Trello is auxiliary, never blocking.
|
|
@@ -3,7 +3,6 @@ export function getCompleteChangeSkillTemplate() {
|
|
|
3
3
|
name: 'pscode-archive-change',
|
|
4
4
|
description: 'Complete a completed change. Use when the user wants to finalize and complete a change after implementation is complete.',
|
|
5
5
|
instructions: getArchiveInstructions(),
|
|
6
|
-
license: 'MIT',
|
|
7
6
|
compatibility: 'Requires pscode CLI.',
|
|
8
7
|
metadata: { author: 'pscode', version: '1.0' },
|
|
9
8
|
};
|
|
@@ -239,7 +239,6 @@ No active changes found. Create a new change to get started.
|
|
|
239
239
|
- Preserve .pscode.yaml when moving to archive
|
|
240
240
|
- Archive directory target uses current date: YYYY-MM-DD-<name>
|
|
241
241
|
- If archive target exists, fail that change but continue with others`,
|
|
242
|
-
license: 'MIT',
|
|
243
242
|
compatibility: 'Requires pscode CLI.',
|
|
244
243
|
metadata: { author: 'pscode', version: '1.0' },
|
|
245
244
|
};
|
|
@@ -110,7 +110,6 @@ For other schemas, follow the \`instruction\` field from the CLI output.
|
|
|
110
110
|
- **IMPORTANT**: \`context\` and \`rules\` are constraints for YOU, not content for the file
|
|
111
111
|
- Do NOT copy \`<context>\`, \`<rules>\`, \`<project_context>\` blocks into the artifact
|
|
112
112
|
- These guide what you write, but should never appear in the output`,
|
|
113
|
-
license: 'MIT',
|
|
114
113
|
compatibility: 'Requires pscode CLI.',
|
|
115
114
|
metadata: { author: 'pscode', version: '1.0' },
|
|
116
115
|
};
|
|
@@ -426,7 +426,6 @@ Do NOT move the card. End the loop.
|
|
|
426
426
|
- **Do question assumptions** - Including the user's and your own
|
|
427
427
|
- **Always run the refinement loop after propose** - When exploration leads to a proposal, the refinement validation loop (Steps RF1–RF3) is mandatory, not optional
|
|
428
428
|
- **Preserve the loop** - Do not exit until the user explicitly approves or cancels`,
|
|
429
|
-
license: 'MIT',
|
|
430
429
|
compatibility: 'Requires pscode CLI.',
|
|
431
430
|
metadata: { author: 'pscode', version: '1.0' },
|
|
432
431
|
};
|
|
@@ -100,7 +100,6 @@ Does this look good? I can modify it if you'd like, or submit it as-is.
|
|
|
100
100
|
\`\`\`
|
|
101
101
|
|
|
102
102
|
Only proceed with submission after user confirms.`,
|
|
103
|
-
license: 'MIT',
|
|
104
103
|
compatibility: 'Requires pscode CLI.',
|
|
105
104
|
metadata: { author: 'pscode', version: '1.0' },
|
|
106
105
|
};
|
|
@@ -93,7 +93,6 @@ After completing all artifacts, summarize:
|
|
|
93
93
|
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
94
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
|
-
license: 'MIT',
|
|
97
96
|
compatibility: 'Requires pscode CLI.',
|
|
98
97
|
metadata: { author: 'pscode', version: '1.0' },
|
|
99
98
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handoff Skill / Command Template
|
|
3
|
+
*
|
|
4
|
+
* Compacts the current conversation into a handoff document so a fresh agent
|
|
5
|
+
* (or the same user in a new session) can continue the work seamlessly.
|
|
6
|
+
*/
|
|
7
|
+
import type { SkillTemplate, CommandTemplate } from '../types.js';
|
|
8
|
+
export declare function getHandoffSkillTemplate(): SkillTemplate;
|
|
9
|
+
export declare function getHandoffCommandTemplate(): CommandTemplate;
|
|
10
|
+
//# sourceMappingURL=handoff.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export function getHandoffSkillTemplate() {
|
|
2
|
+
return {
|
|
3
|
+
name: 'pscode-handoff',
|
|
4
|
+
description: 'Compact the current conversation into a handoff document for another agent to pick up. Use when the user wants to hand off work to a new session or agent.',
|
|
5
|
+
instructions: getHandoffInstructions(),
|
|
6
|
+
compatibility: 'Works with any pscode project.',
|
|
7
|
+
metadata: { author: 'pscode', version: '1.0' },
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function getHandoffInstructions() {
|
|
11
|
+
return `Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS — not the current workspace.
|
|
12
|
+
|
|
13
|
+
Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.
|
|
14
|
+
|
|
15
|
+
Do not duplicate content already captured in other artifacts (PRDs, plans, ADRs, issues, commits, diffs, pscode change files). Reference them by path or URL instead.
|
|
16
|
+
|
|
17
|
+
Redact any sensitive information, such as API keys, passwords, or personally identifiable information.
|
|
18
|
+
|
|
19
|
+
If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
22
|
+
export function getHandoffCommandTemplate() {
|
|
23
|
+
return {
|
|
24
|
+
name: 'PS: Handoff',
|
|
25
|
+
description: 'Compact the current conversation into a handoff document for another agent to pick up',
|
|
26
|
+
category: 'Workflow',
|
|
27
|
+
tags: ['handoff', 'sessao', 'continuacao', 'workflow'],
|
|
28
|
+
content: getHandoffInstructions(),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=handoff.js.map
|
|
@@ -65,7 +65,6 @@ After completing the steps, summarize:
|
|
|
65
65
|
- If the name is invalid (not kebab-case), ask for a valid name
|
|
66
66
|
- If a change with that name already exists, suggest continuing that change instead
|
|
67
67
|
- Pass --schema if using a non-default workflow`,
|
|
68
|
-
license: 'MIT',
|
|
69
68
|
compatibility: 'Requires pscode CLI.',
|
|
70
69
|
metadata: { author: 'pscode', version: '1.0' },
|
|
71
70
|
};
|
|
@@ -3,7 +3,6 @@ export function getOnboardSkillTemplate() {
|
|
|
3
3
|
name: 'pscode-onboard',
|
|
4
4
|
description: 'Guided onboarding for Pscode - walk through a complete workflow cycle with narration and real codebase work.',
|
|
5
5
|
instructions: getOnboardInstructions(),
|
|
6
|
-
license: 'MIT',
|
|
7
6
|
compatibility: 'Requires pscode CLI.',
|
|
8
7
|
metadata: { author: 'pscode', version: '1.0' },
|
|
9
8
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { buildNextStepComment } from './trello-next-step-comment.js';
|
|
1
2
|
export function getProposeSkillTemplate() {
|
|
2
3
|
return {
|
|
3
4
|
name: 'pscode-propose',
|
|
4
5
|
description: 'Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.',
|
|
5
6
|
instructions: getProposeInstructions(),
|
|
6
|
-
license: 'MIT',
|
|
7
7
|
compatibility: 'Requires pscode CLI.',
|
|
8
8
|
metadata: { author: 'pscode', version: '1.0' },
|
|
9
9
|
};
|
|
@@ -18,6 +18,13 @@ export function getPsProposeCommandTemplate() {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
function getProposeInstructions() {
|
|
21
|
+
// Pre-filled next-step comment (card title interpolated), shared via the
|
|
22
|
+
// trello-next-step-comment utility and indented to sit inside the Trello
|
|
23
|
+
// comment `text: |` blocks below.
|
|
24
|
+
const applyNextStep = buildNextStepComment('<card title>', '/ps:apply')
|
|
25
|
+
.split('\n')
|
|
26
|
+
.map((line) => (line.length > 0 ? ` ${line}` : ''))
|
|
27
|
+
.join('\n');
|
|
21
28
|
return `Propose a new change - create the change and generate all artifacts in one step.
|
|
22
29
|
|
|
23
30
|
I'll create a change with artifacts:
|
|
@@ -25,7 +32,7 @@ I'll create a change with artifacts:
|
|
|
25
32
|
- design.md (how)
|
|
26
33
|
- tasks.md (implementation steps)
|
|
27
34
|
|
|
28
|
-
After artifacts are created, a **refinement validation loop** runs: the
|
|
35
|
+
After artifacts are created, a **refinement validation loop** runs: the Trello card is updated with the refined plan, the user reviews it, gives feedback, and when satisfied the card is moved to Ready to Dev.
|
|
29
36
|
|
|
30
37
|
When ready to implement, run /ps:apply
|
|
31
38
|
|
|
@@ -203,22 +210,10 @@ Para iniciar a implementação quando aprovado:
|
|
|
203
210
|
|
|
204
211
|
---
|
|
205
212
|
|
|
206
|
-
### Step
|
|
207
|
-
|
|
208
|
-
Use **AskUserQuestion** to ask:
|
|
209
|
-
|
|
210
|
-
> "A implementação e o planejamento estão de acordo com o esperado?"
|
|
213
|
+
### Step R1b — Update Trello card (before asking for approval)
|
|
211
214
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
- 🔄 Não, quero ajustar o plano
|
|
215
|
-
- ❌ Cancelar (manter em refinamento)
|
|
216
|
-
|
|
217
|
-
**Do NOT update the Trello card description or add any comment before the user approves.**
|
|
218
|
-
|
|
219
|
-
---
|
|
220
|
-
|
|
221
|
-
### Step R2a — If APPROVED (Sim, está refinada)
|
|
215
|
+
So the user can use the Trello card itself as a visual reference when deciding,
|
|
216
|
+
update the card with the refinement content **before** asking for approval.
|
|
222
217
|
|
|
223
218
|
1. **Update Trello card description** (if \`cardId\` exists):
|
|
224
219
|
Build the description from the artifacts already read in Step R1:
|
|
@@ -237,7 +232,7 @@ Options:
|
|
|
237
232
|
**Artefatos:** pscode/changes/<name>/
|
|
238
233
|
\`\`\`
|
|
239
234
|
|
|
240
|
-
2. **Add a comment** in Portuguese (if \`cardId\` exists):
|
|
235
|
+
2. **Add a refinement comment** in Portuguese (if \`cardId\` exists):
|
|
241
236
|
\`\`\`tool
|
|
242
237
|
mcp__claude_ai_Trello_Custom__add_comment
|
|
243
238
|
card_id: "<cardId>"
|
|
@@ -250,22 +245,44 @@ Options:
|
|
|
250
245
|
### Resumo
|
|
251
246
|
<2-3 line summary of what will be built>
|
|
252
247
|
|
|
253
|
-
|
|
254
|
-
\`\`\`
|
|
255
|
-
/ps:apply <name>
|
|
256
|
-
\`\`\`
|
|
248
|
+
${applyNextStep}
|
|
257
249
|
|
|
258
250
|
_Aguardando aprovação para mover para Ready to Dev._
|
|
259
251
|
\`\`\`
|
|
260
252
|
|
|
261
|
-
|
|
253
|
+
If any Trello call fails, continue — Trello is auxiliary, never blocking.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
### Step R2 — Ask for user approval
|
|
258
|
+
|
|
259
|
+
Use **AskUserQuestion** to ask:
|
|
260
|
+
|
|
261
|
+
> "A implementação e o planejamento estão de acordo com o esperado?"
|
|
262
|
+
|
|
263
|
+
Options:
|
|
264
|
+
- ✅ Sim, está refinada — mover para Ready to Dev
|
|
265
|
+
- 🔄 Não, quero ajustar o plano
|
|
266
|
+
- ❌ Cancelar (manter em refinamento)
|
|
267
|
+
|
|
268
|
+
At this point the Trello card already reflects the current refinement (Step R1b),
|
|
269
|
+
so the user can review it before deciding.
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
### Step R2a — If APPROVED (Sim, está refinada)
|
|
274
|
+
|
|
275
|
+
The card description and refinement comment were already added in Step R1b.
|
|
276
|
+
Now just move the card and register the explicit approval.
|
|
277
|
+
|
|
278
|
+
1. **Move the Trello card to the ready list** (if \`lists.ready\` is configured and \`cardId\` exists):
|
|
262
279
|
\`\`\`tool
|
|
263
280
|
mcp__claude_ai_Trello_Custom__update_card
|
|
264
281
|
card_id: "<cardId>"
|
|
265
282
|
list_id: "<lists.ready.id>"
|
|
266
283
|
\`\`\`
|
|
267
284
|
|
|
268
|
-
|
|
285
|
+
2. **Add a final Trello comment** (if cardId exists):
|
|
269
286
|
\`\`\`tool
|
|
270
287
|
mcp__claude_ai_Trello_Custom__add_comment
|
|
271
288
|
card_id: "<cardId>"
|
|
@@ -274,13 +291,10 @@ Options:
|
|
|
274
291
|
|
|
275
292
|
O planejamento foi revisado e aprovado.
|
|
276
293
|
|
|
277
|
-
|
|
278
|
-
\`\`\`
|
|
279
|
-
/ps:apply <name>
|
|
280
|
-
\`\`\`
|
|
294
|
+
${applyNextStep}
|
|
281
295
|
\`\`\`
|
|
282
296
|
|
|
283
|
-
|
|
297
|
+
3. **Show success message:**
|
|
284
298
|
\`\`\`markdown
|
|
285
299
|
## ✅ Pronto para desenvolvimento!
|
|
286
300
|
|
|
@@ -305,9 +319,9 @@ Options:
|
|
|
305
319
|
- Changes to technical approach → update \`design.md\`
|
|
306
320
|
- Changes to tasks → update \`tasks.md\`
|
|
307
321
|
|
|
308
|
-
3. **Go back to Step R1** and show the updated refinement summary
|
|
322
|
+
3. **Go back to Step R1** and show the updated refinement summary, then **re-run Step R1b**
|
|
323
|
+
so the Trello card description and comment reflect the adjusted plan before asking again.
|
|
309
324
|
Keep looping until the user approves or cancels.
|
|
310
|
-
**Do NOT update the Trello description or add comments until the user approves.**
|
|
311
325
|
|
|
312
326
|
---
|
|
313
327
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { getNextStepCommentInstructionBlock } from './trello-next-step-comment.js';
|
|
1
2
|
export function getTrelloDraftSkillTemplate() {
|
|
2
3
|
return {
|
|
3
4
|
name: 'pscode-trello-draft',
|
|
4
5
|
description: 'Capture a raw idea or concept into the Backlog Trello list. Use when the user wants to quickly record something without refining it into a task yet.',
|
|
5
6
|
instructions: getTrelloDraftInstructions(),
|
|
6
|
-
license: 'MIT',
|
|
7
7
|
compatibility: 'Requires pscode CLI and Trello MCP server configured via /ps:trello-setup.',
|
|
8
8
|
metadata: { author: 'pscode', version: '1.0' },
|
|
9
9
|
};
|
|
@@ -141,22 +141,10 @@ Save the returned card \`id\` as \`cardId\` and \`url\` as \`cardUrl\`.
|
|
|
141
141
|
## Step 7 — Add next-step comment
|
|
142
142
|
|
|
143
143
|
Add a comment to the card with the command to take this task to the next stage,
|
|
144
|
-
|
|
144
|
+
with the card title (\`<title>\` from Step 3) pre-filled as the quoted argument so
|
|
145
|
+
it is ready to copy and paste.
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
mcp__claude_ai_Trello_Custom__add_comment
|
|
148
|
-
card_id: "<cardId>"
|
|
149
|
-
text: |
|
|
150
|
-
## Próximo passo
|
|
151
|
-
|
|
152
|
-
Para refinar e gerar os artefatos da change, rode:
|
|
153
|
-
|
|
154
|
-
\`\`\`
|
|
155
|
-
/ps:propose
|
|
156
|
-
\`\`\`
|
|
157
|
-
\`\`\`
|
|
158
|
-
|
|
159
|
-
If this call fails, log the error and continue — the comment is auxiliary, never blocking.
|
|
147
|
+
${getNextStepCommentInstructionBlock('<title>', '/ps:propose')}
|
|
160
148
|
|
|
161
149
|
---
|
|
162
150
|
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Trello Next-Step Comment Utility
|
|
3
3
|
*
|
|
4
|
-
* Builds
|
|
5
|
-
*
|
|
6
|
-
* to the next stage.
|
|
4
|
+
* Builds the Trello comment posted at the end of each workflow step, showing
|
|
5
|
+
* the exact command (with the card title pre-filled as a quoted argument) to
|
|
6
|
+
* advance to the next stage — so the dev can copy/paste without typing the name.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* Pure functions, no side effects and no Trello API calls: the card title is
|
|
9
|
+
* already available in each skill's flow. Shared across the ps:draft, ps:propose
|
|
10
|
+
* and ps:apply skill templates to avoid drift in the comment format.
|
|
10
11
|
*/
|
|
11
|
-
export type WorkflowStage = 'draft' | 'explore' | 'propose' | 'apply';
|
|
12
12
|
/**
|
|
13
|
-
* Returns the
|
|
14
|
-
*
|
|
13
|
+
* Returns the Markdown text for the next-step comment: a header, a description
|
|
14
|
+
* line, and a code block with the command and pre-filled, quoted card title.
|
|
15
|
+
* Paste the result into mcp__claude_ai_Trello_Custom__add_comment as `text`.
|
|
16
|
+
*
|
|
17
|
+
* @param cardName The card title to interpolate as the argument.
|
|
18
|
+
* @param nextCommand The command to advance the workflow (e.g. "/ps:apply").
|
|
19
|
+
* @param fallbackChangeName Optional kebab-case change name used when `cardName`
|
|
20
|
+
* is null, undefined or empty.
|
|
15
21
|
*/
|
|
16
|
-
export declare function buildNextStepComment(
|
|
22
|
+
export declare function buildNextStepComment(cardName: string, nextCommand: string, fallbackChangeName?: string): string;
|
|
17
23
|
/**
|
|
18
|
-
* Returns the instruction block
|
|
19
|
-
*
|
|
24
|
+
* Returns the instruction block embedded inside a workflow skill template. It
|
|
25
|
+
* tells the AI agent to post a next-step comment built via `buildNextStepComment`,
|
|
26
|
+
* with the card title pre-filled as the command argument.
|
|
20
27
|
*
|
|
21
|
-
* @param
|
|
22
|
-
*
|
|
23
|
-
*
|
|
28
|
+
* @param cardName Placeholder (or literal) card title shown in the generated
|
|
29
|
+
* command (e.g. "<título do card>").
|
|
30
|
+
* @param nextCommand The command to advance the workflow (e.g. "/ps:apply").
|
|
24
31
|
*/
|
|
25
|
-
export declare function getNextStepCommentInstructionBlock(
|
|
32
|
+
export declare function getNextStepCommentInstructionBlock(cardName: string, nextCommand: string): string;
|
|
26
33
|
//# sourceMappingURL=trello-next-step-comment.d.ts.map
|
|
@@ -1,56 +1,94 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Trello Next-Step Comment Utility
|
|
3
3
|
*
|
|
4
|
-
* Builds
|
|
5
|
-
*
|
|
6
|
-
* to the next stage.
|
|
4
|
+
* Builds the Trello comment posted at the end of each workflow step, showing
|
|
5
|
+
* the exact command (with the card title pre-filled as a quoted argument) to
|
|
6
|
+
* advance to the next stage — so the dev can copy/paste without typing the name.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* Pure functions, no side effects and no Trello API calls: the card title is
|
|
9
|
+
* already available in each skill's flow. Shared across the ps:draft, ps:propose
|
|
10
|
+
* and ps:apply skill templates to avoid drift in the comment format.
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
/** Human-readable label describing what the next command does. */
|
|
13
|
+
const NEXT_STEP_LABELS = {
|
|
14
|
+
'/ps:propose': 'Para refinar e gerar os artefatos da change',
|
|
15
|
+
'/ps:apply': 'Para implementar as tasks da change',
|
|
16
|
+
'/ps:complete': 'Para finalizar e arquivar a change',
|
|
16
17
|
};
|
|
18
|
+
/** Normalizes a command so it always starts with a single leading slash. */
|
|
19
|
+
function normalizeCommand(nextCommand) {
|
|
20
|
+
const trimmed = (nextCommand ?? '').trim();
|
|
21
|
+
if (trimmed.length === 0)
|
|
22
|
+
return '';
|
|
23
|
+
return trimmed.startsWith('/') ? trimmed : `/${trimmed}`;
|
|
24
|
+
}
|
|
25
|
+
/** Converts an arbitrary string into a kebab-case identifier. */
|
|
26
|
+
function toKebabCase(value) {
|
|
27
|
+
return (value ?? '')
|
|
28
|
+
.normalize('NFD')
|
|
29
|
+
.replace(/[̀-ͯ]/g, '')
|
|
30
|
+
.trim()
|
|
31
|
+
.toLowerCase()
|
|
32
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
33
|
+
.replace(/^-+|-+$/g, '');
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Resolves the argument placed after the command. Uses the card title when
|
|
37
|
+
* available, otherwise falls back to the kebab-case change identifier. Internal
|
|
38
|
+
* double quotes are escaped so the generated command stays valid.
|
|
39
|
+
*/
|
|
40
|
+
function resolveArgument(cardName, fallbackChangeName) {
|
|
41
|
+
const name = (cardName ?? '').trim();
|
|
42
|
+
const resolved = name.length > 0 ? name : toKebabCase(fallbackChangeName) || 'nova-change';
|
|
43
|
+
return resolved.replace(/"/g, '\\"');
|
|
44
|
+
}
|
|
17
45
|
/**
|
|
18
|
-
* Returns the
|
|
19
|
-
*
|
|
46
|
+
* Returns the Markdown text for the next-step comment: a header, a description
|
|
47
|
+
* line, and a code block with the command and pre-filled, quoted card title.
|
|
48
|
+
* Paste the result into mcp__claude_ai_Trello_Custom__add_comment as `text`.
|
|
49
|
+
*
|
|
50
|
+
* @param cardName The card title to interpolate as the argument.
|
|
51
|
+
* @param nextCommand The command to advance the workflow (e.g. "/ps:apply").
|
|
52
|
+
* @param fallbackChangeName Optional kebab-case change name used when `cardName`
|
|
53
|
+
* is null, undefined or empty.
|
|
20
54
|
*/
|
|
21
|
-
export function buildNextStepComment(
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
55
|
+
export function buildNextStepComment(cardName, nextCommand, fallbackChangeName = '') {
|
|
56
|
+
const command = normalizeCommand(nextCommand);
|
|
57
|
+
const label = NEXT_STEP_LABELS[command] ?? 'Para avançar para a próxima etapa';
|
|
58
|
+
const argument = resolveArgument(cardName, fallbackChangeName);
|
|
59
|
+
return `## Próximo passo
|
|
60
|
+
|
|
61
|
+
${label}, rode:
|
|
25
62
|
|
|
26
63
|
\`\`\`
|
|
27
|
-
|
|
64
|
+
${command} "${argument}"
|
|
28
65
|
\`\`\``;
|
|
29
66
|
}
|
|
30
67
|
/**
|
|
31
|
-
* Returns the instruction block
|
|
32
|
-
*
|
|
68
|
+
* Returns the instruction block embedded inside a workflow skill template. It
|
|
69
|
+
* tells the AI agent to post a next-step comment built via `buildNextStepComment`,
|
|
70
|
+
* with the card title pre-filled as the command argument.
|
|
33
71
|
*
|
|
34
|
-
* @param
|
|
35
|
-
*
|
|
36
|
-
*
|
|
72
|
+
* @param cardName Placeholder (or literal) card title shown in the generated
|
|
73
|
+
* command (e.g. "<título do card>").
|
|
74
|
+
* @param nextCommand The command to advance the workflow (e.g. "/ps:apply").
|
|
37
75
|
*/
|
|
38
|
-
export function getNextStepCommentInstructionBlock(
|
|
39
|
-
const
|
|
40
|
-
const
|
|
76
|
+
export function getNextStepCommentInstructionBlock(cardName, nextCommand) {
|
|
77
|
+
const comment = buildNextStepComment(cardName, nextCommand);
|
|
78
|
+
const indented = comment
|
|
79
|
+
.split('\n')
|
|
80
|
+
.map((line) => (line.length > 0 ? ` ${line}` : ''))
|
|
81
|
+
.join('\n');
|
|
41
82
|
return `## Step — Add next-step comment
|
|
42
83
|
|
|
43
|
-
Post a comment on the card
|
|
84
|
+
Post a comment on the card with the ready-to-paste command for the next stage,
|
|
85
|
+
using \`buildNextStepComment\` so the card title is pre-filled as the quoted argument:
|
|
44
86
|
|
|
45
87
|
\`\`\`tool
|
|
46
88
|
mcp__claude_ai_Trello_Custom__add_comment
|
|
47
89
|
card_id: "<cardId>"
|
|
48
90
|
text: |
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
\`\`\`
|
|
52
|
-
/${next.command} "${escapedTitleVar}"
|
|
53
|
-
\`\`\`
|
|
91
|
+
${indented}
|
|
54
92
|
\`\`\`
|
|
55
93
|
|
|
56
94
|
If this call fails, log the error and continue — the comment is auxiliary, never blocking.`;
|
|
@@ -3,7 +3,6 @@ export function getTrelloSetupSkillTemplate() {
|
|
|
3
3
|
name: 'pscode-trello-setup',
|
|
4
4
|
description: 'Configure Trello integration for your Pscode workflow. Checks MCP availability, reads or creates a Trello board, and writes pscode/trello.yaml with your stage-to-list mapping.',
|
|
5
5
|
instructions: getTrelloSetupInstructions(),
|
|
6
|
-
license: 'MIT',
|
|
7
6
|
compatibility: 'Requires pscode CLI and the Trello MCP server.',
|
|
8
7
|
metadata: { author: 'pscode', version: '1.0' },
|
|
9
8
|
};
|
|
@@ -162,7 +162,6 @@ Use clear markdown with:
|
|
|
162
162
|
- Code references in format: \`file.ts:123\`
|
|
163
163
|
- Specific, actionable recommendations
|
|
164
164
|
- No vague suggestions like "consider reviewing"`,
|
|
165
|
-
license: 'MIT',
|
|
166
165
|
compatibility: 'Requires pscode CLI.',
|
|
167
166
|
metadata: { author: 'pscode', version: '1.0' },
|
|
168
167
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "PS: Apply (Dixi)"
|
|
3
|
+
description: Implement tasks with Dixi stack-aware context
|
|
4
|
+
category: Workflow
|
|
5
|
+
tags: [workflow, apply, dixi]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Implement tasks with Dixi architectural awareness.
|
|
9
|
+
|
|
10
|
+
**Dixi preamble** (execute before starting implementation):
|
|
11
|
+
1. Read `.pscode-dixi.yaml` (if present) to identify `stack` and `family`.
|
|
12
|
+
2. Read `pastelsdd/context/architecture.md` (if present) to load architectural constraints — use them as guardrails during implementation.
|
|
13
|
+
3. Read `pastelsdd/context/testing.md` (if present) to load testing conventions.
|
|
14
|
+
|
|
15
|
+
Then execute the standard `pscode-apply-change` skill instructions in full.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "PS: Archive (Dixi)"
|
|
3
|
+
description: Complete a change with Dixi stack-aware context
|
|
4
|
+
category: Workflow
|
|
5
|
+
tags: [workflow, archive, dixi]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Complete and archive a change with Dixi awareness.
|
|
9
|
+
|
|
10
|
+
**Dixi preamble** (execute before archiving):
|
|
11
|
+
1. Read `.pscode-dixi.yaml` (if present) to identify `stack` and `family`.
|
|
12
|
+
2. Run `/pstld:dod` (or prompt the user to run it) to verify the Definition of Done before archiving.
|
|
13
|
+
|
|
14
|
+
Then execute the standard `pscode-archive-change` skill instructions in full.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "PS: Complete (Dixi)"
|
|
3
|
+
description: Complete a change with Dixi DoD verification
|
|
4
|
+
category: Workflow
|
|
5
|
+
tags: [workflow, complete, dixi]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Complete a change with Dixi awareness.
|
|
9
|
+
|
|
10
|
+
**Dixi preamble** (execute before archiving):
|
|
11
|
+
1. Read `.pscode-dixi.yaml` (if present) to identify `stack` and `family`.
|
|
12
|
+
2. Read `pastelsdd/context/dod.md` (if present) and verify the Definition of Done before proceeding. If DoD criteria are not met, warn the user and ask whether to continue.
|
|
13
|
+
|
|
14
|
+
Then execute the standard `pscode-archive-change` skill instructions in full.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "PS: Draft (Dixi)"
|
|
3
|
+
description: "Capture a raw idea into the Backlog Trello list — frictionless, no refinement required"
|
|
4
|
+
category: Workflow
|
|
5
|
+
tags: [trello, draft, ideias, backlog, workflow, dixi]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Capture uma ideia ou conceito bruto diretamente no Backlog do Trello.
|
|
9
|
+
|
|
10
|
+
**Input**: Texto após `/ps:draft` é a descrição da ideia (pode ser bem rascunho — palavras soltas, fragmentos, intuições vagas).
|
|
11
|
+
Se omitido, perguntar ao usuário.
|
|
12
|
+
|
|
13
|
+
Este comando é intencionalmente sem atrito. Diferente de `/ps:propose`, faz estruturação mínima — o objetivo é velocidade de captura, não clareza.
|
|
14
|
+
|
|
15
|
+
Then execute the standard `pscode-trello-draft` skill instructions in full.
|