@thiagodiogo/pscode 2.2.0 → 2.2.1

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.
@@ -1,4 +1,4 @@
1
- import { buildNextStepComment } from './trello-next-step-comment.js';
1
+ import { buildNextStepComment, buildNextStepReminder } from './trello-next-step-comment.js';
2
2
  export function getApplyChangeSkillTemplate() {
3
3
  return {
4
4
  name: 'pscode-apply-change',
@@ -25,6 +25,7 @@ function getApplyInstructions() {
25
25
  .split('\n')
26
26
  .map((line) => (line.length > 0 ? ` ${line}` : ''))
27
27
  .join('\n');
28
+ const completeReminder = buildNextStepReminder('<card title>', '/ps:complete');
28
29
  return `Implement tasks from a Pscode change.
29
30
 
30
31
  **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.
@@ -197,6 +198,7 @@ function getApplyInstructions() {
197
198
  mcp__claude_ai_Trello_Custom__update_card { card_id: "<cardId>", list_id: "<lists.deploy.id>" }
198
199
  \`\`\`
199
200
  b. Add a comment in Portuguese:
201
+ ${completeReminder}
200
202
  \`\`\`tool
201
203
  mcp__claude_ai_Trello_Custom__add_comment
202
204
  card_id: "<cardId>"
@@ -1,4 +1,4 @@
1
- import { buildNextStepComment } from './trello-next-step-comment.js';
1
+ import { buildNextStepComment, buildNextStepReminder } from './trello-next-step-comment.js';
2
2
  export function getProposeSkillTemplate() {
3
3
  return {
4
4
  name: 'pscode-propose',
@@ -25,6 +25,7 @@ function getProposeInstructions() {
25
25
  .split('\n')
26
26
  .map((line) => (line.length > 0 ? ` ${line}` : ''))
27
27
  .join('\n');
28
+ const applyReminder = buildNextStepReminder('<card title>', '/ps:apply');
28
29
  return `Propose a new change - create the change and generate all artifacts in one step.
29
30
 
30
31
  I'll create a change with artifacts:
@@ -233,6 +234,7 @@ update the card with the refinement content **before** asking for approval.
233
234
  \`\`\`
234
235
 
235
236
  2. **Add a refinement comment** in Portuguese (if \`cardId\` exists):
237
+ ${applyReminder}
236
238
  \`\`\`tool
237
239
  mcp__claude_ai_Trello_Custom__add_comment
238
240
  card_id: "<cardId>"
@@ -283,6 +285,7 @@ Now just move the card and register the explicit approval.
283
285
  \`\`\`
284
286
 
285
287
  2. **Add a final Trello comment** (if cardId exists):
288
+ ${applyReminder}
286
289
  \`\`\`tool
287
290
  mcp__claude_ai_Trello_Custom__add_comment
288
291
  card_id: "<cardId>"
@@ -140,10 +140,6 @@ Save the returned card \`id\` as \`cardId\` and \`url\` as \`cardUrl\`.
140
140
 
141
141
  ## Step 7 — Add next-step comment
142
142
 
143
- Add a comment to the card with the command to take this task to the next stage,
144
- with the card title (\`<title>\` from Step 3) pre-filled as the quoted argument so
145
- it is ready to copy and paste.
146
-
147
143
  ${getNextStepCommentInstructionBlock('<title>', '/ps:propose')}
148
144
 
149
145
  ---
@@ -20,6 +20,16 @@
20
20
  * is null, undefined or empty.
21
21
  */
22
22
  export declare function buildNextStepComment(cardName: string, nextCommand: string, fallbackChangeName?: string): string;
23
+ /**
24
+ * Returns a one-line reminder telling the agent to substitute the placeholder
25
+ * title with the real card title before posting, so the embedded next-step
26
+ * command is never left without its quoted argument. Use it right before tool
27
+ * blocks that interpolate `buildNextStepComment` output directly (propose, apply).
28
+ *
29
+ * @param cardName The placeholder shown in the generated command (e.g. "<card title>").
30
+ * @param nextCommand The command to advance the workflow (e.g. "/ps:apply").
31
+ */
32
+ export declare function buildNextStepReminder(cardName: string, nextCommand: string): string;
23
33
  /**
24
34
  * Returns the instruction block embedded inside a workflow skill template. It
25
35
  * tells the AI agent to post a next-step comment built via `buildNextStepComment`,
@@ -64,6 +64,19 @@ ${label}, rode:
64
64
  ${command} "${argument}"
65
65
  \`\`\``;
66
66
  }
67
+ /**
68
+ * Returns a one-line reminder telling the agent to substitute the placeholder
69
+ * title with the real card title before posting, so the embedded next-step
70
+ * command is never left without its quoted argument. Use it right before tool
71
+ * blocks that interpolate `buildNextStepComment` output directly (propose, apply).
72
+ *
73
+ * @param cardName The placeholder shown in the generated command (e.g. "<card title>").
74
+ * @param nextCommand The command to advance the workflow (e.g. "/ps:apply").
75
+ */
76
+ export function buildNextStepReminder(cardName, nextCommand) {
77
+ const command = normalizeCommand(nextCommand);
78
+ return `**IMPORTANT**: Replace \`${cardName}\` below with the actual card title — the command **must always** include the quoted title argument, never post \`${command}\` by itself.`;
79
+ }
67
80
  /**
68
81
  * Returns the instruction block embedded inside a workflow skill template. It
69
82
  * tells the AI agent to post a next-step comment built via `buildNextStepComment`,
@@ -74,15 +87,17 @@ ${command} "${argument}"
74
87
  * @param nextCommand The command to advance the workflow (e.g. "/ps:apply").
75
88
  */
76
89
  export function getNextStepCommentInstructionBlock(cardName, nextCommand) {
90
+ const command = normalizeCommand(nextCommand);
77
91
  const comment = buildNextStepComment(cardName, nextCommand);
78
92
  const indented = comment
79
93
  .split('\n')
80
94
  .map((line) => (line.length > 0 ? ` ${line}` : ''))
81
95
  .join('\n');
82
- return `## Step Add next-step comment
96
+ return `Post a comment on the card with the ready-to-paste command for the next stage,
97
+ using \`buildNextStepComment\` so the card title is pre-filled as the quoted argument.
83
98
 
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:
99
+ **IMPORTANT**: Replace \`${cardName}\` with the actual card title from Step 3. The command
100
+ **must always** include the quoted title argument never post \`${command}\` by itself.
86
101
 
87
102
  \`\`\`tool
88
103
  mcp__claude_ai_Trello_Custom__add_comment
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thiagodiogo/pscode",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "AI-native system for spec-driven development",
5
5
  "keywords": [
6
6
  "pscode",
package/LICENSE DELETED
@@ -1,22 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 OpenSpec Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-