@thiagodiogo/pscode 1.0.0 → 2.0.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/README.md +2 -2
- package/bin/pscode.js +0 -0
- package/dist/cli/index.js +6 -7
- package/dist/commands/config.d.ts +4 -12
- package/dist/commands/config.js +69 -242
- package/dist/core/change-metadata/schema.d.ts +1 -0
- package/dist/core/change-metadata/schema.js +1 -0
- package/dist/core/{archive.d.ts → complete.d.ts} +2 -3
- package/dist/core/{archive.js → complete.js} +63 -64
- package/dist/core/completions/command-registry.js +5 -9
- package/dist/core/config-schema.d.ts +1 -5
- package/dist/core/config-schema.js +2 -5
- package/dist/core/global-config.d.ts +1 -3
- package/dist/core/global-config.js +1 -1
- package/dist/core/init.d.ts +2 -0
- package/dist/core/init.js +81 -21
- package/dist/core/jira-transition.d.ts +16 -0
- package/dist/core/jira-transition.js +29 -0
- package/dist/core/migration.d.ts +3 -12
- package/dist/core/migration.js +10 -72
- package/dist/core/presets/dixi.d.ts +32 -0
- package/dist/core/presets/dixi.js +405 -0
- package/dist/core/profile-sync-drift.js +9 -2
- package/dist/core/profiles.d.ts +23 -21
- package/dist/core/profiles.js +28 -25
- package/dist/core/shared/skill-generation.js +3 -5
- package/dist/core/shared/tool-detection.d.ts +2 -2
- package/dist/core/shared/tool-detection.js +1 -3
- package/dist/core/templates/skill-templates.d.ts +1 -2
- package/dist/core/templates/skill-templates.js +1 -2
- package/dist/core/templates/workflows/apply-change.js +3 -3
- package/dist/core/templates/workflows/archive-change.d.ts +2 -2
- package/dist/core/templates/workflows/archive-change.js +10 -10
- package/dist/core/templates/workflows/onboard.js +9 -9
- package/dist/core/update.d.ts +1 -6
- package/dist/core/update.js +5 -29
- package/dist/core/workspace/foundation.d.ts +1 -1
- package/dist/core/workspace/foundation.js +1 -1
- package/dist/core/workspace/legacy-state.js +1 -1
- package/dist/core/workspace/skills.d.ts +4 -3
- package/dist/core/workspace/skills.js +3 -3
- package/package.json +21 -22
- package/pscode/content/dixi/architectures/feature-sliced-react/eslint-architecture.mjs.template +44 -0
- package/pscode/content/dixi/architectures/feature-sliced-react/features/README.md.template +30 -0
- package/pscode/content/dixi/architectures/feature-sliced-react/skeleton.yaml +8 -0
- package/pscode/content/dixi/architectures/hexagonal-spring/ArchitectureTest.java.template +41 -0
- package/pscode/content/dixi/architectures/hexagonal-spring/skeleton.yaml +11 -0
- package/pscode/content/dixi/claude-runtime/CLAUDE.md.java.template +62 -0
- package/pscode/content/dixi/claude-runtime/CLAUDE.md.react.template +74 -0
- package/pscode/content/dixi/claude-runtime/commands/adr.md +75 -0
- package/pscode/content/dixi/claude-runtime/commands/arch-check.md +64 -0
- package/pscode/content/dixi/claude-runtime/commands/dod.md +66 -0
- package/pscode/content/dixi/claude-runtime/commands/jira-draft.md +80 -0
- package/pscode/content/dixi/claude-runtime/commands/jira-setup.md +105 -0
- package/pscode/content/dixi/claude-runtime/commands/jira-sync.md +69 -0
- package/pscode/content/dixi/claude-runtime/commands/rfc.md +73 -0
- package/pscode/content/dixi/claude-runtime/hooks/arch-guard.mjs +101 -0
- package/pscode/content/dixi/claude-runtime/hooks/jira-context.mjs +60 -0
- package/pscode/content/dixi/claude-runtime/skills/pstld-arch-guardian.md +101 -0
- package/pscode/content/dixi/claude-runtime/skills/pstld-commit-crafter.md +98 -0
- package/pscode/content/dixi/claude-runtime/skills/pstld-jira-context.md +64 -0
- package/pscode/content/dixi/context/java/architecture.md +143 -0
- package/pscode/content/dixi/context/java/naming.md +62 -0
- package/pscode/content/dixi/context/java/testing.md +162 -0
- package/pscode/content/dixi/context/react/architecture.md +119 -0
- package/pscode/content/dixi/context/react/naming.md +129 -0
- package/pscode/content/dixi/context/react/testing.md +141 -0
- package/pscode/content/dixi/context/shared/commits.md +47 -0
- package/pscode/content/dixi/context/shared/dev-flow.md +53 -0
- package/pscode/content/dixi/context/shared/dod.md +38 -0
- package/pscode/content/dixi/context/shared/pr-flow.md +53 -0
- package/pscode/content/dixi/kit/java/.editorconfig +25 -0
- package/pscode/content/dixi/kit/java/.github/workflows/ci-java.yml +68 -0
- package/pscode/content/dixi/kit/java/.husky/commit-msg +2 -0
- package/pscode/content/dixi/kit/react/.editorconfig +20 -0
- package/pscode/content/dixi/kit/react/.github/workflows/ci-react.yml +80 -0
- package/pscode/content/dixi/kit/react/.husky/commit-msg +2 -0
- package/pscode/content/dixi/kit/react/.husky/pre-commit +2 -0
- package/pscode/content/dixi/kit/react/lint-staged.config.mjs +4 -0
- package/pscode/content/dixi/kit/shared/.commitlintrc.yml +15 -0
- package/pscode/content/dixi/kit/shared/.github/pull_request_template.md +24 -0
- package/schemas/pstld-workflow/schema.yaml +67 -0
- package/schemas/pstld-workflow/templates/design.md +15 -0
- package/schemas/pstld-workflow/templates/rfc.md +26 -0
- package/schemas/pstld-workflow/templates/tasks.md +15 -0
- package/dist/core/templates/workflows/sync-specs.d.ts +0 -10
- package/dist/core/templates/workflows/sync-specs.js +0 -290
package/dist/core/profiles.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Predefined Workflow Profiles
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Core workflows included in the 'core' profile.
|
|
9
|
-
* These provide the streamlined experience for new users.
|
|
10
|
-
*/
|
|
11
|
-
export const CORE_WORKFLOWS = ['propose', 'explore', 'apply', 'sync', 'archive'];
|
|
12
|
-
/**
|
|
13
|
-
* All available workflows in the system.
|
|
4
|
+
* Add, remove or edit profiles here. Users select a profile via
|
|
5
|
+
* `pscode init --profile <name>` or `pscode config profile <name>`.
|
|
6
|
+
* The workflow lists are fixed in code — users cannot customise them.
|
|
14
7
|
*/
|
|
15
8
|
export const ALL_WORKFLOWS = [
|
|
16
9
|
'propose',
|
|
@@ -19,25 +12,35 @@ export const ALL_WORKFLOWS = [
|
|
|
19
12
|
'continue',
|
|
20
13
|
'apply',
|
|
21
14
|
'ff',
|
|
22
|
-
'
|
|
23
|
-
'archive',
|
|
15
|
+
'complete',
|
|
24
16
|
'bulk-archive',
|
|
25
17
|
'verify',
|
|
26
18
|
'onboard',
|
|
27
|
-
// Trello-specific workflows
|
|
28
19
|
'trello-setup',
|
|
29
20
|
'draft',
|
|
21
|
+
'rfc',
|
|
22
|
+
'design',
|
|
23
|
+
'tasks',
|
|
24
|
+
'arch-check',
|
|
25
|
+
'adr',
|
|
26
|
+
'jira-sync',
|
|
27
|
+
'dod',
|
|
30
28
|
];
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
export const PROFILES = {
|
|
30
|
+
standard: {
|
|
31
|
+
description: 'Padrão — propose, explore, apply, complete',
|
|
32
|
+
workflows: ['propose', 'explore', 'apply', 'complete'],
|
|
33
|
+
},
|
|
34
|
+
dixi: {
|
|
35
|
+
description: 'Dixi — RFC→Design→Tasks→Apply com guardrails para Java/Spring e React/Next.js',
|
|
36
|
+
workflows: ['rfc', 'design', 'tasks', 'apply', 'arch-check', 'adr', 'jira-sync', 'dod'],
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
export const DEFAULT_PROFILE = 'standard';
|
|
40
|
+
export function getProfileWorkflows(profile) {
|
|
41
|
+
return PROFILES[profile].workflows;
|
|
42
|
+
}
|
|
43
|
+
export function isValidProfile(name) {
|
|
44
|
+
return name in PROFILES;
|
|
42
45
|
}
|
|
43
46
|
//# sourceMappingURL=profiles.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared utilities for generating skill and command files.
|
|
5
5
|
*/
|
|
6
|
-
import { getExploreSkillTemplate, getNewChangeSkillTemplate, getContinueChangeSkillTemplate, getApplyChangeSkillTemplate, getFfChangeSkillTemplate,
|
|
6
|
+
import { getExploreSkillTemplate, getNewChangeSkillTemplate, getContinueChangeSkillTemplate, getApplyChangeSkillTemplate, getFfChangeSkillTemplate, getCompleteChangeSkillTemplate, getBulkArchiveChangeSkillTemplate, getVerifyChangeSkillTemplate, getOnboardSkillTemplate, getProposeSkillTemplate, getTrelloSetupSkillTemplate, getTrelloDraftSkillTemplate, getPsExploreCommandTemplate, getPsNewCommandTemplate, getPsContinueCommandTemplate, getPsApplyCommandTemplate, getPsFfCommandTemplate, getPsCompleteCommandTemplate, getPsBulkArchiveCommandTemplate, getPsVerifyCommandTemplate, getPsOnboardCommandTemplate, getPsProposeCommandTemplate, getTrelloSetupCommandTemplate, getTrelloDraftCommandTemplate, } from '../templates/skill-templates.js';
|
|
7
7
|
/**
|
|
8
8
|
* Gets skill templates with their directory names, optionally filtered by workflow IDs.
|
|
9
9
|
*
|
|
@@ -16,8 +16,7 @@ export function getSkillTemplates(workflowFilter) {
|
|
|
16
16
|
{ template: getContinueChangeSkillTemplate(), dirName: 'pscode-continue-change', workflowId: 'continue' },
|
|
17
17
|
{ template: getApplyChangeSkillTemplate(), dirName: 'pscode-apply-change', workflowId: 'apply' },
|
|
18
18
|
{ template: getFfChangeSkillTemplate(), dirName: 'pscode-ff-change', workflowId: 'ff' },
|
|
19
|
-
{ template:
|
|
20
|
-
{ template: getArchiveChangeSkillTemplate(), dirName: 'pscode-archive-change', workflowId: 'archive' },
|
|
19
|
+
{ template: getCompleteChangeSkillTemplate(), dirName: 'pscode-archive-change', workflowId: 'complete' },
|
|
21
20
|
{ template: getBulkArchiveChangeSkillTemplate(), dirName: 'pscode-bulk-archive-change', workflowId: 'bulk-archive' },
|
|
22
21
|
{ template: getVerifyChangeSkillTemplate(), dirName: 'pscode-verify-change', workflowId: 'verify' },
|
|
23
22
|
{ template: getOnboardSkillTemplate(), dirName: 'pscode-onboard', workflowId: 'onboard' },
|
|
@@ -43,8 +42,7 @@ export function getCommandTemplates(workflowFilter) {
|
|
|
43
42
|
{ template: getPsContinueCommandTemplate(), id: 'continue' },
|
|
44
43
|
{ template: getPsApplyCommandTemplate(), id: 'apply' },
|
|
45
44
|
{ template: getPsFfCommandTemplate(), id: 'ff' },
|
|
46
|
-
{ template:
|
|
47
|
-
{ template: getPsArchiveCommandTemplate(), id: 'archive' },
|
|
45
|
+
{ template: getPsCompleteCommandTemplate(), id: 'complete' },
|
|
48
46
|
{ template: getPsBulkArchiveCommandTemplate(), id: 'bulk-archive' },
|
|
49
47
|
{ template: getPsVerifyCommandTemplate(), id: 'verify' },
|
|
50
48
|
{ template: getPsOnboardCommandTemplate(), id: 'onboard' },
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Names of skill directories created by pscode init.
|
|
8
8
|
*/
|
|
9
|
-
export declare const SKILL_NAMES: readonly ["pscode-explore", "pscode-new-change", "pscode-continue-change", "pscode-apply-change", "pscode-ff-change", "pscode-
|
|
9
|
+
export declare const SKILL_NAMES: readonly ["pscode-explore", "pscode-new-change", "pscode-continue-change", "pscode-apply-change", "pscode-ff-change", "pscode-archive-change", "pscode-bulk-archive-change", "pscode-verify-change", "pscode-onboard", "pscode-propose"];
|
|
10
10
|
export type SkillName = (typeof SKILL_NAMES)[number];
|
|
11
11
|
/**
|
|
12
12
|
* IDs of command templates created by pscode init.
|
|
13
13
|
*/
|
|
14
|
-
export declare const COMMAND_IDS: readonly ["explore", "new", "continue", "apply", "ff", "
|
|
14
|
+
export declare const COMMAND_IDS: readonly ["explore", "new", "continue", "apply", "ff", "complete", "bulk-archive", "verify", "onboard", "propose"];
|
|
15
15
|
export type CommandId = (typeof COMMAND_IDS)[number];
|
|
16
16
|
/**
|
|
17
17
|
* Status of skill configuration for a tool.
|
|
@@ -15,7 +15,6 @@ export const SKILL_NAMES = [
|
|
|
15
15
|
'pscode-continue-change',
|
|
16
16
|
'pscode-apply-change',
|
|
17
17
|
'pscode-ff-change',
|
|
18
|
-
'pscode-sync-specs',
|
|
19
18
|
'pscode-archive-change',
|
|
20
19
|
'pscode-bulk-archive-change',
|
|
21
20
|
'pscode-verify-change',
|
|
@@ -31,8 +30,7 @@ export const COMMAND_IDS = [
|
|
|
31
30
|
'continue',
|
|
32
31
|
'apply',
|
|
33
32
|
'ff',
|
|
34
|
-
'
|
|
35
|
-
'archive',
|
|
33
|
+
'complete',
|
|
36
34
|
'bulk-archive',
|
|
37
35
|
'verify',
|
|
38
36
|
'onboard',
|
|
@@ -9,8 +9,7 @@ export { getNewChangeSkillTemplate, getPsNewCommandTemplate } from './workflows/
|
|
|
9
9
|
export { getContinueChangeSkillTemplate, getPsContinueCommandTemplate } from './workflows/continue-change.js';
|
|
10
10
|
export { getApplyChangeSkillTemplate, getPsApplyCommandTemplate } from './workflows/apply-change.js';
|
|
11
11
|
export { getFfChangeSkillTemplate, getPsFfCommandTemplate } from './workflows/ff-change.js';
|
|
12
|
-
export {
|
|
13
|
-
export { getArchiveChangeSkillTemplate, getPsArchiveCommandTemplate } from './workflows/archive-change.js';
|
|
12
|
+
export { getCompleteChangeSkillTemplate, getPsCompleteCommandTemplate } from './workflows/archive-change.js';
|
|
14
13
|
export { getBulkArchiveChangeSkillTemplate, getPsBulkArchiveCommandTemplate } from './workflows/bulk-archive-change.js';
|
|
15
14
|
export { getVerifyChangeSkillTemplate, getPsVerifyCommandTemplate } from './workflows/verify-change.js';
|
|
16
15
|
export { getOnboardSkillTemplate, getPsOnboardCommandTemplate } from './workflows/onboard.js';
|
|
@@ -8,8 +8,7 @@ export { getNewChangeSkillTemplate, getPsNewCommandTemplate } from './workflows/
|
|
|
8
8
|
export { getContinueChangeSkillTemplate, getPsContinueCommandTemplate } from './workflows/continue-change.js';
|
|
9
9
|
export { getApplyChangeSkillTemplate, getPsApplyCommandTemplate } from './workflows/apply-change.js';
|
|
10
10
|
export { getFfChangeSkillTemplate, getPsFfCommandTemplate } from './workflows/ff-change.js';
|
|
11
|
-
export {
|
|
12
|
-
export { getArchiveChangeSkillTemplate, getPsArchiveCommandTemplate } from './workflows/archive-change.js';
|
|
11
|
+
export { getCompleteChangeSkillTemplate, getPsCompleteCommandTemplate } from './workflows/archive-change.js';
|
|
13
12
|
export { getBulkArchiveChangeSkillTemplate, getPsBulkArchiveCommandTemplate } from './workflows/bulk-archive-change.js';
|
|
14
13
|
export { getVerifyChangeSkillTemplate, getPsVerifyCommandTemplate } from './workflows/verify-change.js';
|
|
15
14
|
export { getOnboardSkillTemplate, getPsOnboardCommandTemplate } from './workflows/onboard.js';
|
|
@@ -182,7 +182,7 @@ function getApplyInstructions() {
|
|
|
182
182
|
Testado por: <usuario / Claude>
|
|
183
183
|
Status: Funcionando
|
|
184
184
|
|
|
185
|
-
Proximo passo: /ps:
|
|
185
|
+
Proximo passo: /ps:complete <name> para arquivar a change.
|
|
186
186
|
\`\`\`
|
|
187
187
|
|
|
188
188
|
If any Trello call fails, continue — Trello is auxiliary, never blocking.
|
|
@@ -197,7 +197,7 @@ function getApplyInstructions() {
|
|
|
197
197
|
Display:
|
|
198
198
|
- Tasks completed this session
|
|
199
199
|
- Overall progress: "N/M tasks complete"
|
|
200
|
-
- If all done and approved: mention Trello stage (Em Teste or Ready to Deploy) and suggest \`/ps:
|
|
200
|
+
- If all done and approved: mention Trello stage (Em Teste or Ready to Deploy) and suggest \`/ps:complete\`
|
|
201
201
|
- If paused: explain why and wait for guidance
|
|
202
202
|
|
|
203
203
|
**Output During Implementation**
|
|
@@ -240,7 +240,7 @@ All tasks complete! How would you like to validate the implementation?
|
|
|
240
240
|
**Change:** <change-name>
|
|
241
241
|
**Trello:** Card moved to 🚀 Ready to Deploy ← only shown if lists.deploy is configured
|
|
242
242
|
|
|
243
|
-
Ready to archive with \`/ps:
|
|
243
|
+
Ready to archive with \`/ps:complete\`.
|
|
244
244
|
\`\`\`
|
|
245
245
|
|
|
246
246
|
**Output On Pause (Issue Encountered)**
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* templates file into workflow-focused modules.
|
|
6
6
|
*/
|
|
7
7
|
import type { SkillTemplate, CommandTemplate } from '../types.js';
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
8
|
+
export declare function getCompleteChangeSkillTemplate(): SkillTemplate;
|
|
9
|
+
export declare function getPsCompleteCommandTemplate(): CommandTemplate;
|
|
10
10
|
//# sourceMappingURL=archive-change.d.ts.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function getCompleteChangeSkillTemplate() {
|
|
2
2
|
return {
|
|
3
3
|
name: 'pscode-archive-change',
|
|
4
|
-
description: '
|
|
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
6
|
license: 'MIT',
|
|
7
7
|
compatibility: 'Requires pscode CLI.',
|
|
8
8
|
metadata: { author: 'pscode', version: '1.0' },
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
export function
|
|
11
|
+
export function getPsCompleteCommandTemplate() {
|
|
12
12
|
return {
|
|
13
|
-
name: 'PS:
|
|
14
|
-
description: '
|
|
13
|
+
name: 'PS: Complete',
|
|
14
|
+
description: 'Complete a change',
|
|
15
15
|
category: 'Workflow',
|
|
16
|
-
tags: ['workflow', '
|
|
16
|
+
tags: ['workflow', 'complete'],
|
|
17
17
|
content: getArchiveInstructions(),
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
function getArchiveInstructions() {
|
|
21
|
-
return `
|
|
21
|
+
return `Complete a change.
|
|
22
22
|
|
|
23
|
-
**Input**: Optionally specify a change name (e.g., \`/ps:
|
|
23
|
+
**Input**: Optionally specify a change name (e.g., \`/ps:complete add-auth\`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
24
24
|
|
|
25
25
|
**Steps**
|
|
26
26
|
|
|
@@ -116,7 +116,7 @@ function getArchiveInstructions() {
|
|
|
116
116
|
mcp__claude_ai_Trello_Custom__create_card
|
|
117
117
|
list_id: "<lists.done.id>"
|
|
118
118
|
name: "<human-readable change name in Portuguese>"
|
|
119
|
-
desc: "
|
|
119
|
+
desc: "Concluida via /ps:complete"
|
|
120
120
|
\`\`\`
|
|
121
121
|
Then mark it complete.
|
|
122
122
|
|
|
@@ -140,7 +140,7 @@ function getArchiveInstructions() {
|
|
|
140
140
|
mcp__claude_ai_Trello_Custom__add_comment
|
|
141
141
|
card_id: "<cardId>"
|
|
142
142
|
text: |
|
|
143
|
-
Change
|
|
143
|
+
Change concluida via /ps:complete
|
|
144
144
|
|
|
145
145
|
Change: <change-name>
|
|
146
146
|
Schema: <schema-name>
|
|
@@ -412,25 +412,25 @@ All tasks done:
|
|
|
412
412
|
- [x] Task 2
|
|
413
413
|
- [x] ...
|
|
414
414
|
|
|
415
|
-
The change is implemented! One more step—let's
|
|
415
|
+
The change is implemented! One more step—let's complete it.
|
|
416
416
|
\`\`\`
|
|
417
417
|
|
|
418
418
|
---
|
|
419
419
|
|
|
420
|
-
## Phase 10:
|
|
420
|
+
## Phase 10: Complete
|
|
421
421
|
|
|
422
422
|
**EXPLAIN:**
|
|
423
423
|
\`\`\`
|
|
424
|
-
##
|
|
424
|
+
## Completing
|
|
425
425
|
|
|
426
|
-
When a change is complete, we
|
|
426
|
+
When a change is complete, we complete it. The archive path is derived from \`planningHome.changesDir\` and the date.
|
|
427
427
|
|
|
428
|
-
|
|
428
|
+
Completed changes become your project's decision history—you can always find them later to understand why something was built a certain way.
|
|
429
429
|
\`\`\`
|
|
430
430
|
|
|
431
431
|
**DO:**
|
|
432
432
|
\`\`\`bash
|
|
433
|
-
pscode
|
|
433
|
+
pscode complete "<name>"
|
|
434
434
|
\`\`\`
|
|
435
435
|
|
|
436
436
|
**SHOW:**
|
|
@@ -463,7 +463,7 @@ automaticamente cards no Trello conforme você avança nas suas changes.
|
|
|
463
463
|
- /ps:draft → registra ideias em "Para Explorar"
|
|
464
464
|
- /ps:propose → move card para "Em Refinamento"
|
|
465
465
|
- /ps:apply → move card para "Em Desenvolvimento" e depois "Em Teste"
|
|
466
|
-
- /ps:
|
|
466
|
+
- /ps:complete → move card para "Concluído"
|
|
467
467
|
|
|
468
468
|
Deseja configurar agora?
|
|
469
469
|
\`\`\`
|
|
@@ -507,7 +507,7 @@ This same rhythm works for any size change—a small fix or a major feature.
|
|
|
507
507
|
| \`/ps:propose\` | Create a change and generate all artifacts |
|
|
508
508
|
| \`/ps:explore\` | Think through problems before/during work |
|
|
509
509
|
| \`/ps:apply\` | Implement tasks from a change |
|
|
510
|
-
| \`/ps:
|
|
510
|
+
| \`/ps:complete\` | Complete a change |
|
|
511
511
|
|
|
512
512
|
**Additional commands:**
|
|
513
513
|
|
|
@@ -567,7 +567,7 @@ If the user says they just want to see the commands or skip the tutorial:
|
|
|
567
567
|
| \`/ps:propose <name>\` | Create a change and generate all artifacts |
|
|
568
568
|
| \`/ps:explore\` | Think through problems (no code changes) |
|
|
569
569
|
| \`/ps:apply <name>\` | Implement tasks |
|
|
570
|
-
| \`/ps:
|
|
570
|
+
| \`/ps:complete <name>\` | Complete when done |
|
|
571
571
|
|
|
572
572
|
**Additional commands:**
|
|
573
573
|
|
package/dist/core/update.d.ts
CHANGED
|
@@ -35,14 +35,9 @@ export declare class UpdateCommand {
|
|
|
35
35
|
*/
|
|
36
36
|
private detectNewTools;
|
|
37
37
|
/**
|
|
38
|
-
* Displays a note about extra workflows installed that aren't in the
|
|
38
|
+
* Displays a note about extra workflows installed that aren't in the active profile.
|
|
39
39
|
*/
|
|
40
40
|
private displayExtraWorkflowsNote;
|
|
41
|
-
/**
|
|
42
|
-
* Suggest opting back into core when a custom profile still matches the old
|
|
43
|
-
* pre-sync core set. Keep custom profiles user-owned; do not mutate them.
|
|
44
|
-
*/
|
|
45
|
-
private displayOldCoreCustomProfileNote;
|
|
46
41
|
/**
|
|
47
42
|
* Removes skill directories for workflows when delivery changed to commands-only.
|
|
48
43
|
* Returns the number of directories removed.
|
package/dist/core/update.js
CHANGED
|
@@ -17,13 +17,12 @@ import { getToolVersionStatus, getSkillTemplates, getCommandContents, generateSk
|
|
|
17
17
|
import { detectLegacyArtifacts, cleanupLegacyArtifacts, formatCleanupSummary, formatDetectionSummary, getToolsFromLegacyArtifacts, } from './legacy-cleanup.js';
|
|
18
18
|
import { isInteractive } from '../utils/interactive.js';
|
|
19
19
|
import { getGlobalConfig } from './global-config.js';
|
|
20
|
-
import { getProfileWorkflows, ALL_WORKFLOWS } from './profiles.js';
|
|
20
|
+
import { getProfileWorkflows, isValidProfile, DEFAULT_PROFILE, ALL_WORKFLOWS } from './profiles.js';
|
|
21
21
|
import { getAvailableTools } from './available-tools.js';
|
|
22
22
|
import { WORKFLOW_TO_SKILL_DIR, getCommandConfiguredTools, getConfiguredToolsForProfileSync, getToolsNeedingProfileSync, } from './profile-sync-drift.js';
|
|
23
23
|
import { scanInstalledWorkflows as scanInstalledWorkflowsShared, migrateIfNeeded as migrateIfNeededShared, } from './migration.js';
|
|
24
24
|
const require = createRequire(import.meta.url);
|
|
25
25
|
const { version: PSCODE_VERSION } = require('../../package.json');
|
|
26
|
-
const OLD_CORE_WORKFLOWS = ['propose', 'explore', 'apply', 'archive'];
|
|
27
26
|
/**
|
|
28
27
|
* Scans installed workflow artifacts (skills and managed commands) across all configured tools.
|
|
29
28
|
* Returns the union of detected workflow IDs that match ALL_WORKFLOWS.
|
|
@@ -54,13 +53,9 @@ export class UpdateCommand {
|
|
|
54
53
|
migrateIfNeededShared(resolvedProjectPath, detectedTools);
|
|
55
54
|
// 3. Read global config for profile/delivery
|
|
56
55
|
const globalConfig = getGlobalConfig();
|
|
57
|
-
const profile = globalConfig.profile ?? '
|
|
56
|
+
const profile = isValidProfile(globalConfig.profile ?? '') ? globalConfig.profile : DEFAULT_PROFILE;
|
|
58
57
|
const delivery = globalConfig.delivery ?? 'both';
|
|
59
|
-
const
|
|
60
|
-
// Trello workflows are always included regardless of profile, mirroring InitCommand behavior.
|
|
61
|
-
const TRELLO_WORKFLOWS = ['trello-setup', 'task', 'draft'];
|
|
62
|
-
const workflowsSet = new Set([...profileWorkflows, ...TRELLO_WORKFLOWS]);
|
|
63
|
-
const desiredWorkflows = [...workflowsSet].filter((workflow) => ALL_WORKFLOWS.includes(workflow));
|
|
58
|
+
const desiredWorkflows = [...getProfileWorkflows(profile)];
|
|
64
59
|
const shouldGenerateSkills = delivery !== 'commands';
|
|
65
60
|
const shouldGenerateCommands = delivery !== 'skills';
|
|
66
61
|
// 4. Detect and handle legacy artifacts + upgrade legacy tools using effective config
|
|
@@ -99,7 +94,6 @@ export class UpdateCommand {
|
|
|
99
94
|
// Still check for new tool directories and extra workflows
|
|
100
95
|
this.detectNewTools(resolvedProjectPath, configuredTools);
|
|
101
96
|
this.displayExtraWorkflowsNote(resolvedProjectPath, configuredTools, desiredWorkflows);
|
|
102
|
-
this.displayOldCoreCustomProfileNote(profile, globalConfig.workflows);
|
|
103
97
|
return;
|
|
104
98
|
}
|
|
105
99
|
// 8. Display update plan
|
|
@@ -206,7 +200,6 @@ export class UpdateCommand {
|
|
|
206
200
|
this.detectNewTools(resolvedProjectPath, configuredAndNewTools);
|
|
207
201
|
// 14. Display note about extra workflows not in profile
|
|
208
202
|
this.displayExtraWorkflowsNote(resolvedProjectPath, configuredAndNewTools, desiredWorkflows);
|
|
209
|
-
this.displayOldCoreCustomProfileNote(profile, globalConfig.workflows);
|
|
210
203
|
// 15. List affected tools
|
|
211
204
|
if (updatedTools.length > 0) {
|
|
212
205
|
const toolDisplayNames = updatedTools;
|
|
@@ -260,33 +253,16 @@ export class UpdateCommand {
|
|
|
260
253
|
}
|
|
261
254
|
}
|
|
262
255
|
/**
|
|
263
|
-
* Displays a note about extra workflows installed that aren't in the
|
|
256
|
+
* Displays a note about extra workflows installed that aren't in the active profile.
|
|
264
257
|
*/
|
|
265
258
|
displayExtraWorkflowsNote(projectPath, configuredTools, profileWorkflows) {
|
|
266
259
|
const installedWorkflows = scanInstalledWorkflows(projectPath, configuredTools);
|
|
267
260
|
const profileSet = new Set(profileWorkflows);
|
|
268
261
|
const extraWorkflows = installedWorkflows.filter((w) => !profileSet.has(w));
|
|
269
262
|
if (extraWorkflows.length > 0) {
|
|
270
|
-
console.log(chalk.dim(`Note: ${extraWorkflows.length} extra workflows not in profile (use \`pscode config profile\` to
|
|
263
|
+
console.log(chalk.dim(`Note: ${extraWorkflows.length} extra workflows not in profile (use \`pscode config profile\` to switch profiles)`));
|
|
271
264
|
}
|
|
272
265
|
}
|
|
273
|
-
/**
|
|
274
|
-
* Suggest opting back into core when a custom profile still matches the old
|
|
275
|
-
* pre-sync core set. Keep custom profiles user-owned; do not mutate them.
|
|
276
|
-
*/
|
|
277
|
-
displayOldCoreCustomProfileNote(profile, workflows) {
|
|
278
|
-
if (profile !== 'custom' || !workflows) {
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
const workflowSet = new Set(workflows);
|
|
282
|
-
const matchesOldCore = workflowSet.size === OLD_CORE_WORKFLOWS.length &&
|
|
283
|
-
OLD_CORE_WORKFLOWS.every((workflow) => workflowSet.has(workflow));
|
|
284
|
-
if (!matchesOldCore) {
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
console.log(chalk.dim('Note: The core profile now includes sync. Your custom profile is preserving the old core workflow set.'));
|
|
288
|
-
console.log(chalk.dim('Run `pscode config profile core` and then `pscode update` to add sync.'));
|
|
289
|
-
}
|
|
290
266
|
/**
|
|
291
267
|
* Removes skill directories for workflows when delivery changed to commands-only.
|
|
292
268
|
* Returns the number of directories removed.
|
|
@@ -34,7 +34,7 @@ export interface WorkspaceViewState {
|
|
|
34
34
|
}
|
|
35
35
|
export interface WorkspaceSkillState {
|
|
36
36
|
selected_agents: string[];
|
|
37
|
-
last_applied_profile?:
|
|
37
|
+
last_applied_profile?: string;
|
|
38
38
|
last_applied_delivery?: 'both' | 'skills' | 'commands';
|
|
39
39
|
last_applied_workflow_ids?: string[];
|
|
40
40
|
last_applied_at?: string;
|
|
@@ -116,7 +116,7 @@ const WorkspaceContextSchema = WorkspaceInitiativeContextSchema;
|
|
|
116
116
|
const WorkspaceSkillStateSchema = z
|
|
117
117
|
.object({
|
|
118
118
|
selected_agents: z.array(z.string()),
|
|
119
|
-
last_applied_profile: z.
|
|
119
|
+
last_applied_profile: z.string().optional(),
|
|
120
120
|
last_applied_delivery: z.enum(['both', 'skills', 'commands']).optional(),
|
|
121
121
|
last_applied_workflow_ids: z.array(z.string()).optional(),
|
|
122
122
|
last_applied_at: z.string().optional(),
|
|
@@ -29,7 +29,7 @@ const PreferredOpenerSchema = z
|
|
|
29
29
|
const WorkspaceSkillStateSchema = z
|
|
30
30
|
.object({
|
|
31
31
|
selected_agents: z.array(z.string()),
|
|
32
|
-
last_applied_profile: z.enum(['
|
|
32
|
+
last_applied_profile: z.enum(['standard', 'dixi']).optional(),
|
|
33
33
|
last_applied_delivery: z.enum(['both', 'skills', 'commands']).optional(),
|
|
34
34
|
last_applied_workflow_ids: z.array(z.string()).optional(),
|
|
35
35
|
last_applied_at: z.string().optional(),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type AIToolOption } from '../config.js';
|
|
2
|
-
import { type Delivery
|
|
2
|
+
import { type Delivery } from '../global-config.js';
|
|
3
|
+
import { type ProfileName } from '../profiles.js';
|
|
3
4
|
import type { WorkspaceSkillState } from './foundation.js';
|
|
4
5
|
export interface WorkspaceSkillAgentResult {
|
|
5
6
|
tool_id: string;
|
|
@@ -22,7 +23,7 @@ export interface WorkspaceSkillFailedResult {
|
|
|
22
23
|
error: string;
|
|
23
24
|
}
|
|
24
25
|
export interface WorkspaceSkillInstallationReport {
|
|
25
|
-
profile:
|
|
26
|
+
profile: ProfileName;
|
|
26
27
|
delivery: Delivery;
|
|
27
28
|
workflow_ids: string[];
|
|
28
29
|
selected_agents: string[];
|
|
@@ -39,7 +40,7 @@ type WorkspaceSkillCapableTool = AIToolOption & {
|
|
|
39
40
|
skillsDir: string;
|
|
40
41
|
};
|
|
41
42
|
export declare function getCurrentWorkspaceSkillProfileSelection(): {
|
|
42
|
-
profile:
|
|
43
|
+
profile: ProfileName;
|
|
43
44
|
delivery: Delivery;
|
|
44
45
|
workflow_ids: string[];
|
|
45
46
|
};
|
|
@@ -4,16 +4,16 @@ import { FileSystemUtils } from '../../utils/file-system.js';
|
|
|
4
4
|
import { transformToHyphenCommands } from '../../utils/command-references.js';
|
|
5
5
|
import { AI_TOOLS } from '../config.js';
|
|
6
6
|
import { getGlobalConfig } from '../global-config.js';
|
|
7
|
-
import { getProfileWorkflows } from '../profiles.js';
|
|
7
|
+
import { getProfileWorkflows, isValidProfile, DEFAULT_PROFILE } from '../profiles.js';
|
|
8
8
|
import { generateSkillContent, getSkillTemplates, getToolSkillStatus, getToolsWithSkillsDir, extractGeneratedByVersion, } from '../shared/index.js';
|
|
9
9
|
const require = createRequire(import.meta.url);
|
|
10
10
|
const { version: PSCODE_VERSION } = require('../../../package.json');
|
|
11
11
|
const fs = nodeFs.promises;
|
|
12
12
|
function resolveWorkspaceSkillProfileContext() {
|
|
13
13
|
const globalConfig = getGlobalConfig();
|
|
14
|
-
const profile = globalConfig.profile ?? '
|
|
14
|
+
const profile = isValidProfile(globalConfig.profile ?? '') ? globalConfig.profile : DEFAULT_PROFILE;
|
|
15
15
|
const delivery = globalConfig.delivery ?? 'both';
|
|
16
|
-
const workflowIds = [...getProfileWorkflows(profile
|
|
16
|
+
const workflowIds = [...getProfileWorkflows(profile)];
|
|
17
17
|
const deliveryNotice = delivery === 'skills'
|
|
18
18
|
? null
|
|
19
19
|
: 'Workspace setup installs skills only; workspace command generation is not part of this slice.';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thiagodiogo/pscode",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "AI-native system for spec-driven development",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pscode",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"homepage": "https://github.com/eipastel/pscode",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/eipastel/pscode"
|
|
15
|
+
"url": "git+https://github.com/eipastel/pscode.git"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"author": "thiagodiogo",
|
|
@@ -27,35 +27,18 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"bin": {
|
|
30
|
-
"pscode": "
|
|
30
|
+
"pscode": "bin/pscode.js"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist",
|
|
34
34
|
"bin",
|
|
35
35
|
"schemas",
|
|
36
|
+
"pscode/content",
|
|
36
37
|
"scripts/postinstall.js",
|
|
37
38
|
"!dist/**/*.test.js",
|
|
38
39
|
"!dist/**/__tests__",
|
|
39
40
|
"!dist/**/*.map"
|
|
40
41
|
],
|
|
41
|
-
"scripts": {
|
|
42
|
-
"lint": "eslint src/",
|
|
43
|
-
"build": "node build.js",
|
|
44
|
-
"dev": "tsc --watch",
|
|
45
|
-
"dev:cli": "pnpm build && node bin/pscode.js",
|
|
46
|
-
"test": "vitest run",
|
|
47
|
-
"test:watch": "vitest",
|
|
48
|
-
"test:ui": "vitest --ui",
|
|
49
|
-
"test:coverage": "vitest --coverage",
|
|
50
|
-
"test:postinstall": "node scripts/postinstall.js",
|
|
51
|
-
"prepare": "pnpm run build",
|
|
52
|
-
"prepublishOnly": "pnpm run build",
|
|
53
|
-
"postinstall": "node scripts/postinstall.js",
|
|
54
|
-
"check:pack-version": "node scripts/pack-version-check.mjs",
|
|
55
|
-
"release": "pnpm run release:ci",
|
|
56
|
-
"release:ci": "pnpm run check:pack-version && pnpm exec changeset publish",
|
|
57
|
-
"changeset": "changeset"
|
|
58
|
-
},
|
|
59
42
|
"engines": {
|
|
60
43
|
"node": ">=20.19.0"
|
|
61
44
|
},
|
|
@@ -80,5 +63,21 @@
|
|
|
80
63
|
"posthog-node": "^5.20.0",
|
|
81
64
|
"yaml": "^2.8.2",
|
|
82
65
|
"zod": "^4.0.17"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"lint": "eslint src/",
|
|
69
|
+
"build": "node build.js",
|
|
70
|
+
"dev": "tsc --watch",
|
|
71
|
+
"dev:cli": "pnpm build && node bin/pscode.js",
|
|
72
|
+
"test": "vitest run",
|
|
73
|
+
"test:watch": "vitest",
|
|
74
|
+
"test:ui": "vitest --ui",
|
|
75
|
+
"test:coverage": "vitest --coverage",
|
|
76
|
+
"test:postinstall": "node scripts/postinstall.js",
|
|
77
|
+
"postinstall": "node scripts/postinstall.js",
|
|
78
|
+
"check:pack-version": "node scripts/pack-version-check.mjs",
|
|
79
|
+
"release": "pnpm run release:ci",
|
|
80
|
+
"release:ci": "pnpm run check:pack-version && pnpm exec changeset publish",
|
|
81
|
+
"changeset": "changeset"
|
|
83
82
|
}
|
|
84
|
-
}
|
|
83
|
+
}
|
package/pscode/content/dixi/architectures/feature-sliced-react/eslint-architecture.mjs.template
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// eslint-architecture.mjs
|
|
2
|
+
// Regras de isolamento arquitetural para feature-sliced design.
|
|
3
|
+
//
|
|
4
|
+
// Integração: adicione ao seu eslint.config.js:
|
|
5
|
+
//
|
|
6
|
+
// import architectureRules from './eslint-architecture.mjs';
|
|
7
|
+
// export default [...existingConfig, ...architectureRules];
|
|
8
|
+
|
|
9
|
+
export default [
|
|
10
|
+
{
|
|
11
|
+
files: ['src/features/**/*.{ts,tsx,js,jsx}'],
|
|
12
|
+
rules: {
|
|
13
|
+
'no-restricted-imports': [
|
|
14
|
+
'error',
|
|
15
|
+
{
|
|
16
|
+
patterns: [
|
|
17
|
+
{
|
|
18
|
+
group: ['../features/*', '../../features/*', '@/features/*/'],
|
|
19
|
+
message:
|
|
20
|
+
'Features não devem importar umas das outras. Use shared/ para código compartilhado.',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
files: ['src/pages/**/*.{ts,tsx}', 'src/app/**/*.{ts,tsx}'],
|
|
29
|
+
rules: {
|
|
30
|
+
'no-restricted-imports': [
|
|
31
|
+
'error',
|
|
32
|
+
{
|
|
33
|
+
patterns: [
|
|
34
|
+
{
|
|
35
|
+
group: ['*/application/*', '*/domain/*', '*/usecases/*'],
|
|
36
|
+
message:
|
|
37
|
+
'Páginas não devem importar lógica de negócio diretamente. Use features/ ou shared/ como intermediários.',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Features
|
|
2
|
+
|
|
3
|
+
Cada feature é uma unidade autônoma de funcionalidade de negócio.
|
|
4
|
+
|
|
5
|
+
## Estrutura de uma feature
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
features/
|
|
9
|
+
└── nome-da-feature/
|
|
10
|
+
├── components/ # Componentes React específicos da feature
|
|
11
|
+
├── hooks/ # React hooks específicos da feature
|
|
12
|
+
├── services/ # Chamadas de API específicas da feature
|
|
13
|
+
├── types/ # Tipos TypeScript específicos da feature
|
|
14
|
+
└── index.ts # Ponto de entrada — exporta apenas a API pública
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Regras de importação
|
|
18
|
+
|
|
19
|
+
- Features **não importam umas das outras**
|
|
20
|
+
- ❌ `import { foo } from '@/features/outra-feature'`
|
|
21
|
+
- ✅ Mova o código compartilhado para `shared/`
|
|
22
|
+
- Código compartilhado vive em `shared/` (componentes, hooks, serviços, tipos, utils)
|
|
23
|
+
- Páginas (`pages/` ou `app/`) podem importar de `features/` via `index.ts`
|
|
24
|
+
|
|
25
|
+
## Como criar uma nova feature
|
|
26
|
+
|
|
27
|
+
1. Crie o diretório `features/nome-da-feature/`
|
|
28
|
+
2. Adicione subdiretórios conforme necessário (`components/`, `hooks/`, etc.)
|
|
29
|
+
3. Exporte a API pública via `index.ts`
|
|
30
|
+
4. Importe nas páginas via `@/features/nome-da-feature`
|