prjct-cli 0.19.0 → 0.20.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.
- package/CHANGELOG.md +66 -6
- package/CLAUDE.md +56 -15
- package/README.md +5 -6
- package/bin/prjct +59 -42
- package/bin/prjct.ts +60 -0
- package/core/__tests__/agentic/memory-system.test.ts +18 -3
- package/core/__tests__/agentic/plan-mode.test.ts +55 -26
- package/core/__tests__/agentic/prompt-builder.test.ts +6 -6
- package/core/__tests__/utils/project-commands.test.ts +72 -0
- package/core/agentic/agent-router.ts +3 -12
- package/core/agentic/command-executor.ts +372 -3
- package/core/agentic/context-builder.ts +7 -27
- package/core/agentic/ground-truth.ts +604 -5
- package/core/agentic/index.ts +180 -0
- package/core/agentic/loop-detector.ts +418 -4
- package/core/agentic/memory-system.ts +857 -3
- package/core/agentic/plan-mode.ts +491 -4
- package/core/agentic/prompt-builder.ts +44 -65
- package/core/agentic/services.ts +13 -5
- package/core/agentic/skill-loader.ts +112 -0
- package/core/agentic/smart-context.ts +37 -122
- package/core/agentic/template-loader.ts +79 -122
- package/core/agentic/tool-registry.ts +5 -11
- package/core/agents/index.ts +1 -1
- package/core/agents/performance.ts +4 -2
- package/core/bus/bus.ts +262 -0
- package/core/bus/index.ts +3 -313
- package/core/commands/analysis.ts +5 -5
- package/core/commands/analytics.ts +11 -11
- package/core/commands/base.ts +33 -209
- package/core/commands/cleanup.ts +148 -0
- package/core/commands/command-data.ts +346 -0
- package/core/commands/commands.ts +216 -0
- package/core/commands/design.ts +83 -0
- package/core/commands/index.ts +13 -207
- package/core/commands/maintenance.ts +52 -473
- package/core/commands/planning.ts +3 -3
- package/core/commands/register.ts +104 -0
- package/core/commands/registry.ts +441 -0
- package/core/commands/setup.ts +25 -9
- package/core/commands/shipping.ts +48 -11
- package/core/commands/snapshots.ts +299 -0
- package/core/commands/workflow.ts +2 -2
- package/core/constants/index.ts +254 -4
- package/core/domain/agent-loader.ts +5 -6
- package/core/domain/task-stack.ts +555 -4
- package/core/errors.ts +127 -1
- package/core/events/events.ts +87 -0
- package/core/events/index.ts +4 -138
- package/core/index.ts +15 -23
- package/core/infrastructure/agent-detector.ts +126 -201
- package/core/infrastructure/author-detector.ts +99 -171
- package/core/infrastructure/command-installer.ts +476 -4
- package/core/infrastructure/config-manager.ts +41 -37
- package/core/infrastructure/path-manager.ts +59 -9
- package/core/infrastructure/permission-manager.ts +286 -0
- package/core/outcomes/analyzer.ts +7 -41
- package/core/outcomes/index.ts +1 -1
- package/core/outcomes/recorder.ts +1 -1
- package/core/{plugins → plugin/builtin}/webhook.ts +6 -22
- package/core/plugin/loader.ts +5 -5
- package/core/plugin/registry.ts +2 -2
- package/core/schemas/ideas.ts +85 -54
- package/core/schemas/index.ts +14 -33
- package/core/schemas/permissions.ts +177 -0
- package/core/schemas/project.ts +39 -12
- package/core/schemas/roadmap.ts +94 -59
- package/core/schemas/schemas.ts +39 -0
- package/core/schemas/shipped.ts +87 -60
- package/core/schemas/state.ts +110 -70
- package/core/server/index.ts +21 -0
- package/core/server/routes.ts +165 -0
- package/core/server/server.ts +136 -0
- package/core/server/sse.ts +135 -0
- package/core/services/agent-service.ts +170 -0
- package/core/services/breakdown-service.ts +126 -0
- package/core/services/index.ts +21 -0
- package/core/services/memory-service.ts +108 -0
- package/core/services/project-service.ts +146 -0
- package/core/services/skill-service.ts +253 -0
- package/core/session/compaction.ts +257 -0
- package/core/session/index.ts +20 -8
- package/core/{infrastructure/session-manager/migration.ts → session/log-migration.ts} +9 -9
- package/core/{infrastructure/session-manager/session-manager.ts → session/session-log-manager.ts} +27 -26
- package/core/session/{session-manager.ts → task-session-manager.ts} +7 -4
- package/core/session/utils.ts +1 -1
- package/core/storage/ideas-storage.ts +10 -26
- package/core/storage/index.ts +14 -162
- package/core/storage/queue-storage.ts +13 -11
- package/core/storage/shipped-storage.ts +4 -17
- package/core/storage/state-storage.ts +35 -43
- package/core/storage/storage-manager.ts +42 -52
- package/core/storage/storage.ts +160 -0
- package/core/sync/auth-config.ts +1 -8
- package/core/sync/index.ts +17 -10
- package/core/sync/oauth-handler.ts +1 -6
- package/core/sync/sync-client.ts +6 -34
- package/core/sync/sync-manager.ts +11 -40
- package/core/types/agentic.ts +577 -0
- package/core/types/agents.ts +145 -0
- package/core/types/bus.ts +82 -0
- package/core/types/commands.ts +366 -0
- package/core/types/config.ts +66 -0
- package/core/types/core.ts +96 -0
- package/core/types/domain.ts +71 -0
- package/core/types/events.ts +42 -0
- package/core/types/fs.ts +56 -0
- package/core/types/index.ts +387 -500
- package/core/types/infrastructure.ts +196 -0
- package/core/{agentic/memory-system/types.ts → types/memory.ts} +33 -8
- package/core/{outcomes/types.ts → types/outcomes.ts} +53 -8
- package/core/types/plugin.ts +25 -0
- package/core/types/server.ts +54 -0
- package/core/types/services.ts +65 -0
- package/core/types/session.ts +135 -0
- package/core/types/storage.ts +148 -0
- package/core/types/sync.ts +121 -0
- package/core/types/task.ts +72 -0
- package/core/types/template.ts +24 -0
- package/core/types/utils.ts +90 -0
- package/core/utils/cache.ts +195 -0
- package/core/utils/collection-filters.ts +245 -0
- package/core/utils/date-helper.ts +1 -5
- package/core/utils/file-helper.ts +20 -10
- package/core/utils/jsonl-helper.ts +5 -8
- package/core/utils/markdown-builder.ts +277 -0
- package/core/utils/project-commands.ts +132 -0
- package/core/utils/runtime.ts +119 -0
- package/dist/bin/prjct.mjs +12568 -0
- package/package.json +13 -8
- package/scripts/build.js +106 -0
- package/scripts/postinstall.js +50 -8
- package/templates/agentic/agents/uxui.md +210 -0
- package/templates/agentic/subagent-generation.md +1 -1
- package/templates/commands/bug.md +219 -41
- package/templates/commands/feature.md +368 -80
- package/templates/commands/serve.md +118 -0
- package/templates/commands/ship.md +152 -14
- package/templates/commands/skill.md +110 -0
- package/templates/commands/sync.md +63 -4
- package/templates/commands/test.md +40 -188
- package/templates/mcp-config.json +0 -36
- package/templates/permissions/default.jsonc +60 -0
- package/templates/permissions/permissive.jsonc +49 -0
- package/templates/permissions/strict.jsonc +62 -0
- package/templates/skills/code-review.md +47 -0
- package/templates/skills/debug.md +61 -0
- package/templates/skills/refactor.md +47 -0
- package/templates/subagents/domain/devops.md +1 -1
- package/templates/subagents/domain/testing.md +6 -10
- package/templates/subagents/workflow/prjct-shipper.md +16 -7
- package/templates/tools/bash.txt +22 -0
- package/templates/tools/edit.txt +18 -0
- package/templates/tools/glob.txt +19 -0
- package/templates/tools/grep.txt +21 -0
- package/templates/tools/read.txt +14 -0
- package/templates/tools/task.txt +20 -0
- package/templates/tools/webfetch.txt +16 -0
- package/templates/tools/websearch.txt +18 -0
- package/templates/tools/write.txt +17 -0
- package/core/agentic/command-executor/command-executor.ts +0 -312
- package/core/agentic/command-executor/index.ts +0 -16
- package/core/agentic/command-executor/status-signal.ts +0 -38
- package/core/agentic/command-executor/types.ts +0 -79
- package/core/agentic/ground-truth/index.ts +0 -76
- package/core/agentic/ground-truth/types.ts +0 -33
- package/core/agentic/ground-truth/utils.ts +0 -48
- package/core/agentic/ground-truth/verifiers/analyze.ts +0 -54
- package/core/agentic/ground-truth/verifiers/done.ts +0 -75
- package/core/agentic/ground-truth/verifiers/feature.ts +0 -70
- package/core/agentic/ground-truth/verifiers/index.ts +0 -37
- package/core/agentic/ground-truth/verifiers/init.ts +0 -52
- package/core/agentic/ground-truth/verifiers/now.ts +0 -57
- package/core/agentic/ground-truth/verifiers/ship.ts +0 -85
- package/core/agentic/ground-truth/verifiers/spec.ts +0 -45
- package/core/agentic/ground-truth/verifiers/sync.ts +0 -47
- package/core/agentic/ground-truth/verifiers.ts +0 -6
- package/core/agentic/loop-detector/error-analysis.ts +0 -97
- package/core/agentic/loop-detector/hallucination.ts +0 -71
- package/core/agentic/loop-detector/index.ts +0 -41
- package/core/agentic/loop-detector/loop-detector.ts +0 -222
- package/core/agentic/loop-detector/types.ts +0 -66
- package/core/agentic/memory-system/history.ts +0 -53
- package/core/agentic/memory-system/index.ts +0 -192
- package/core/agentic/memory-system/patterns.ts +0 -156
- package/core/agentic/memory-system/semantic-memories.ts +0 -278
- package/core/agentic/memory-system/session.ts +0 -21
- package/core/agentic/plan-mode/approval.ts +0 -57
- package/core/agentic/plan-mode/constants.ts +0 -44
- package/core/agentic/plan-mode/index.ts +0 -28
- package/core/agentic/plan-mode/plan-mode.ts +0 -407
- package/core/agentic/plan-mode/types.ts +0 -193
- package/core/agents/types.ts +0 -126
- package/core/command-registry/categories.ts +0 -23
- package/core/command-registry/commands.ts +0 -15
- package/core/command-registry/core-commands.ts +0 -344
- package/core/command-registry/index.ts +0 -158
- package/core/command-registry/optional-commands.ts +0 -163
- package/core/command-registry/setup-commands.ts +0 -83
- package/core/command-registry/types.ts +0 -59
- package/core/command-registry.ts +0 -9
- package/core/commands/types.ts +0 -185
- package/core/commands.ts +0 -11
- package/core/constants/formats.ts +0 -187
- package/core/context-sync.ts +0 -18
- package/core/data/index.ts +0 -27
- package/core/data/md-base-manager.ts +0 -203
- package/core/data/md-ideas-manager.ts +0 -155
- package/core/data/md-queue-manager.ts +0 -180
- package/core/data/md-shipped-manager.ts +0 -90
- package/core/data/md-state-manager.ts +0 -137
- package/core/domain/task-stack/index.ts +0 -19
- package/core/domain/task-stack/parser.ts +0 -86
- package/core/domain/task-stack/storage.ts +0 -123
- package/core/domain/task-stack/task-stack.ts +0 -340
- package/core/domain/task-stack/types.ts +0 -51
- package/core/infrastructure/command-installer/command-installer.ts +0 -327
- package/core/infrastructure/command-installer/global-config.ts +0 -136
- package/core/infrastructure/command-installer/index.ts +0 -25
- package/core/infrastructure/command-installer/types.ts +0 -41
- package/core/infrastructure/session-manager/index.ts +0 -23
- package/core/infrastructure/session-manager/types.ts +0 -45
- package/core/infrastructure/session-manager.ts +0 -8
- package/core/serializers/ideas-serializer.ts +0 -187
- package/core/serializers/index.ts +0 -36
- package/core/serializers/queue-serializer.ts +0 -210
- package/core/serializers/shipped-serializer.ts +0 -108
- package/core/serializers/state-serializer.ts +0 -136
- package/core/session/types.ts +0 -29
- /package/core/infrastructure/{agents/claude-agent.ts → claude-agent.ts} +0 -0
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Optional Commands
|
|
3
|
-
* Advanced features for specialized workflows.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { Command } from './types'
|
|
7
|
-
|
|
8
|
-
export const OPTIONAL_COMMANDS: Command[] = [
|
|
9
|
-
{
|
|
10
|
-
name: 'design',
|
|
11
|
-
category: 'optional',
|
|
12
|
-
description: 'Design system architecture, APIs, and components',
|
|
13
|
-
usage: {
|
|
14
|
-
claude: '/p:design authentication --type architecture',
|
|
15
|
-
terminal: 'prjct design authentication --type architecture',
|
|
16
|
-
},
|
|
17
|
-
params: '[target] --type architecture|api|component|database|flow',
|
|
18
|
-
implemented: true,
|
|
19
|
-
hasTemplate: true,
|
|
20
|
-
requiresInit: true,
|
|
21
|
-
blockingRules: null,
|
|
22
|
-
isOptional: true,
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
name: 'cleanup',
|
|
27
|
-
category: 'optional',
|
|
28
|
-
description: 'Clean up temp files and old entries',
|
|
29
|
-
usage: {
|
|
30
|
-
claude: '/p:cleanup',
|
|
31
|
-
terminal: 'prjct cleanup',
|
|
32
|
-
},
|
|
33
|
-
params: null,
|
|
34
|
-
implemented: true,
|
|
35
|
-
hasTemplate: true,
|
|
36
|
-
requiresInit: true,
|
|
37
|
-
blockingRules: null,
|
|
38
|
-
isOptional: true,
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
name: 'analyze',
|
|
43
|
-
category: 'optional',
|
|
44
|
-
description: 'Analyze repository and sync tasks',
|
|
45
|
-
usage: {
|
|
46
|
-
claude: '/p:analyze',
|
|
47
|
-
terminal: 'prjct analyze',
|
|
48
|
-
},
|
|
49
|
-
params: null,
|
|
50
|
-
implemented: true,
|
|
51
|
-
hasTemplate: true,
|
|
52
|
-
requiresInit: true,
|
|
53
|
-
blockingRules: null,
|
|
54
|
-
isOptional: true,
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
name: 'undo',
|
|
59
|
-
category: 'optional',
|
|
60
|
-
description: 'Revert to previous snapshot',
|
|
61
|
-
usage: {
|
|
62
|
-
claude: '/p:undo',
|
|
63
|
-
terminal: 'prjct undo',
|
|
64
|
-
},
|
|
65
|
-
params: null,
|
|
66
|
-
implemented: true,
|
|
67
|
-
hasTemplate: true,
|
|
68
|
-
requiresInit: true,
|
|
69
|
-
blockingRules: null,
|
|
70
|
-
isOptional: true,
|
|
71
|
-
features: [
|
|
72
|
-
'Git-based snapshots',
|
|
73
|
-
'Preserves redo history',
|
|
74
|
-
'Non-destructive',
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
{
|
|
79
|
-
name: 'redo',
|
|
80
|
-
category: 'optional',
|
|
81
|
-
description: 'Redo previously undone changes',
|
|
82
|
-
usage: {
|
|
83
|
-
claude: '/p:redo',
|
|
84
|
-
terminal: 'prjct redo',
|
|
85
|
-
},
|
|
86
|
-
params: null,
|
|
87
|
-
implemented: true,
|
|
88
|
-
hasTemplate: true,
|
|
89
|
-
requiresInit: true,
|
|
90
|
-
blockingRules: null,
|
|
91
|
-
isOptional: true,
|
|
92
|
-
features: [
|
|
93
|
-
'Only available after undo',
|
|
94
|
-
'Restores undone state',
|
|
95
|
-
'Clears on new snapshot',
|
|
96
|
-
],
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
{
|
|
100
|
-
name: 'history',
|
|
101
|
-
category: 'optional',
|
|
102
|
-
description: 'View snapshot history',
|
|
103
|
-
usage: {
|
|
104
|
-
claude: '/p:history',
|
|
105
|
-
terminal: 'prjct history',
|
|
106
|
-
},
|
|
107
|
-
params: null,
|
|
108
|
-
implemented: true,
|
|
109
|
-
hasTemplate: true,
|
|
110
|
-
requiresInit: true,
|
|
111
|
-
blockingRules: null,
|
|
112
|
-
isOptional: true,
|
|
113
|
-
features: [
|
|
114
|
-
'Shows all snapshots',
|
|
115
|
-
'Current position indicator',
|
|
116
|
-
'Redo availability count',
|
|
117
|
-
],
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
{
|
|
121
|
-
name: 'git',
|
|
122
|
-
category: 'optional',
|
|
123
|
-
description: 'Smart git operations with context',
|
|
124
|
-
usage: {
|
|
125
|
-
claude: '/p:git [operation]',
|
|
126
|
-
terminal: 'prjct git [operation]',
|
|
127
|
-
},
|
|
128
|
-
params: '[operation]',
|
|
129
|
-
implemented: true,
|
|
130
|
-
hasTemplate: true,
|
|
131
|
-
requiresInit: true,
|
|
132
|
-
blockingRules: null,
|
|
133
|
-
isOptional: true,
|
|
134
|
-
features: [
|
|
135
|
-
'Context-aware commits',
|
|
136
|
-
'Smart branch naming',
|
|
137
|
-
'Task-linked commits',
|
|
138
|
-
'Memory trail logging',
|
|
139
|
-
],
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
name: 'test',
|
|
144
|
-
category: 'optional',
|
|
145
|
-
description: 'Run tests with auto-fix',
|
|
146
|
-
usage: {
|
|
147
|
-
claude: '/p:test',
|
|
148
|
-
terminal: 'prjct test',
|
|
149
|
-
},
|
|
150
|
-
params: null,
|
|
151
|
-
implemented: true,
|
|
152
|
-
hasTemplate: true,
|
|
153
|
-
requiresInit: true,
|
|
154
|
-
blockingRules: null,
|
|
155
|
-
isOptional: true,
|
|
156
|
-
features: [
|
|
157
|
-
'Run project tests',
|
|
158
|
-
'Auto-fix suggestions',
|
|
159
|
-
'Coverage reporting',
|
|
160
|
-
],
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
]
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Setup Commands
|
|
3
|
-
* Installation and configuration (not for daily use).
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { Command } from './types'
|
|
7
|
-
|
|
8
|
-
export const SETUP_COMMANDS: Command[] = [
|
|
9
|
-
{
|
|
10
|
-
name: 'start',
|
|
11
|
-
category: 'setup',
|
|
12
|
-
description: 'First-time setup (install commands to editors)',
|
|
13
|
-
usage: {
|
|
14
|
-
claude: null,
|
|
15
|
-
terminal: 'prjct start',
|
|
16
|
-
},
|
|
17
|
-
params: null,
|
|
18
|
-
implemented: true,
|
|
19
|
-
hasTemplate: false,
|
|
20
|
-
requiresInit: false,
|
|
21
|
-
blockingRules: null,
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
name: 'setup',
|
|
26
|
-
category: 'setup',
|
|
27
|
-
description: 'Reconfigure editor installations',
|
|
28
|
-
usage: {
|
|
29
|
-
claude: '/p:setup',
|
|
30
|
-
terminal: 'prjct setup [--force] [--editor <name>]',
|
|
31
|
-
},
|
|
32
|
-
params: '[--force] [--editor <name>]',
|
|
33
|
-
implemented: true,
|
|
34
|
-
hasTemplate: true,
|
|
35
|
-
requiresInit: false,
|
|
36
|
-
blockingRules: null,
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
{
|
|
40
|
-
name: 'migrate',
|
|
41
|
-
category: 'setup',
|
|
42
|
-
description: 'Migrate project to UUID format + sync',
|
|
43
|
-
usage: {
|
|
44
|
-
claude: '/p:migrate',
|
|
45
|
-
terminal: null, // Claude-only
|
|
46
|
-
},
|
|
47
|
-
params: null,
|
|
48
|
-
implemented: true,
|
|
49
|
-
hasTemplate: true,
|
|
50
|
-
requiresInit: true,
|
|
51
|
-
blockingRules: null,
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
{
|
|
55
|
-
name: 'migrate-all',
|
|
56
|
-
category: 'setup',
|
|
57
|
-
description: 'Migrate all legacy projects to UUID format',
|
|
58
|
-
usage: {
|
|
59
|
-
claude: '/p:migrate-all',
|
|
60
|
-
terminal: 'prjct migrate-all [--deep-scan] [--dry-run]',
|
|
61
|
-
},
|
|
62
|
-
params: '[--deep-scan] [--dry-run]',
|
|
63
|
-
implemented: true,
|
|
64
|
-
hasTemplate: true,
|
|
65
|
-
requiresInit: false,
|
|
66
|
-
blockingRules: null,
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
{
|
|
70
|
-
name: 'auth',
|
|
71
|
-
category: 'setup',
|
|
72
|
-
description: 'Manage cloud authentication',
|
|
73
|
-
usage: {
|
|
74
|
-
claude: '/p:auth [login|logout|status]',
|
|
75
|
-
terminal: 'prjct auth [login|logout|status]',
|
|
76
|
-
},
|
|
77
|
-
params: '[login|logout|status]',
|
|
78
|
-
implemented: true,
|
|
79
|
-
hasTemplate: true,
|
|
80
|
-
requiresInit: false,
|
|
81
|
-
blockingRules: null,
|
|
82
|
-
},
|
|
83
|
-
]
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Command Registry Types
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export interface CommandUsage {
|
|
6
|
-
claude: string | null
|
|
7
|
-
terminal: string | null
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface BlockingRules {
|
|
11
|
-
check: string
|
|
12
|
-
message: string
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface Command {
|
|
16
|
-
name: string
|
|
17
|
-
category: string
|
|
18
|
-
description: string
|
|
19
|
-
usage: CommandUsage
|
|
20
|
-
params: string | null
|
|
21
|
-
implemented: boolean
|
|
22
|
-
hasTemplate: boolean
|
|
23
|
-
requiresInit: boolean
|
|
24
|
-
blockingRules: BlockingRules | null
|
|
25
|
-
features?: string[]
|
|
26
|
-
isOptional?: boolean
|
|
27
|
-
deprecated?: boolean
|
|
28
|
-
replacedBy?: string
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface CategoryInfo {
|
|
32
|
-
title: string
|
|
33
|
-
description: string
|
|
34
|
-
order: number
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface Categories {
|
|
38
|
-
[key: string]: CategoryInfo
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface RegistryStats {
|
|
42
|
-
total: number
|
|
43
|
-
core: number
|
|
44
|
-
optional: number
|
|
45
|
-
setup: number
|
|
46
|
-
implemented: number
|
|
47
|
-
withTemplates: number
|
|
48
|
-
claudeOnly: number
|
|
49
|
-
terminalOnly: number
|
|
50
|
-
both: number
|
|
51
|
-
requiresInit: number
|
|
52
|
-
withBlockingRules: number
|
|
53
|
-
byCategory: Record<string, number>
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export interface ValidationResult {
|
|
57
|
-
valid: boolean
|
|
58
|
-
issues: string[]
|
|
59
|
-
}
|
package/core/command-registry.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Command Registry
|
|
3
|
-
* Re-exports from command-registry/index.ts for backwards compatibility.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import registry from './command-registry/index'
|
|
7
|
-
export default registry
|
|
8
|
-
export type { Command, CategoryInfo, Categories, RegistryStats, ValidationResult } from './command-registry/index'
|
|
9
|
-
export { COMMANDS, CATEGORIES } from './command-registry/index'
|
package/core/commands/types.ts
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definitions for Commands module
|
|
3
|
-
*
|
|
4
|
-
* Re-exports common types from core/types and defines command-specific types.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Re-export commonly used types from core/types
|
|
8
|
-
export type {
|
|
9
|
-
ContextPaths as Paths,
|
|
10
|
-
ProjectContext as Context,
|
|
11
|
-
CommandParams,
|
|
12
|
-
CommandResult as BaseCommandResult,
|
|
13
|
-
} from '../types'
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Command execution result with optional extra data.
|
|
17
|
-
* Extends BaseCommandResult with command-specific fields.
|
|
18
|
-
*/
|
|
19
|
-
export interface CommandResult {
|
|
20
|
-
success: boolean
|
|
21
|
-
message?: string
|
|
22
|
-
error?: string
|
|
23
|
-
/** Duration of command execution */
|
|
24
|
-
duration?: string
|
|
25
|
-
/** Task that was affected */
|
|
26
|
-
task?: string
|
|
27
|
-
/** Feature that was affected */
|
|
28
|
-
feature?: string
|
|
29
|
-
/** Files that were modified */
|
|
30
|
-
filesModified?: string[]
|
|
31
|
-
/** Allow any additional properties for command-specific data */
|
|
32
|
-
[key: string]: unknown
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Agent types
|
|
36
|
-
export interface AgentInfo {
|
|
37
|
-
isSupported: boolean
|
|
38
|
-
type: string
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface Author {
|
|
42
|
-
name: string | null
|
|
43
|
-
email: string | null
|
|
44
|
-
github?: string | null
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface AgentAssignmentResult {
|
|
48
|
-
agent: { name: string; domain?: string } | null
|
|
49
|
-
routing: {
|
|
50
|
-
confidence: number
|
|
51
|
-
reason: string
|
|
52
|
-
availableAgents?: string[]
|
|
53
|
-
}
|
|
54
|
-
_agenticNote?: string
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Analysis types
|
|
58
|
-
export interface ComplexityResult {
|
|
59
|
-
level: 'low' | 'medium' | 'high'
|
|
60
|
-
hours: number
|
|
61
|
-
type: string
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface HealthResult {
|
|
65
|
-
score: number
|
|
66
|
-
message: string
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Options for the design command.
|
|
71
|
-
*/
|
|
72
|
-
export interface DesignOptions {
|
|
73
|
-
/** Type of design */
|
|
74
|
-
type?: 'architecture' | 'api' | 'component' | 'database' | 'flow'
|
|
75
|
-
/** Output format */
|
|
76
|
-
format?: 'markdown' | 'mermaid'
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Options for the cleanup command.
|
|
81
|
-
*/
|
|
82
|
-
export interface CleanupOptions {
|
|
83
|
-
/** Clean up memory/history */
|
|
84
|
-
memory?: boolean
|
|
85
|
-
/** Type of cleanup */
|
|
86
|
-
type?: 'all' | 'memory' | 'sessions' | 'cache'
|
|
87
|
-
/** Dry run without making changes */
|
|
88
|
-
dryRun?: boolean
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Options for the setup command.
|
|
93
|
-
*/
|
|
94
|
-
export interface SetupOptions {
|
|
95
|
-
/** Force re-setup even if already configured */
|
|
96
|
-
force?: boolean
|
|
97
|
-
/** Skip interactive prompts */
|
|
98
|
-
nonInteractive?: boolean
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Options for the migrate-all command.
|
|
103
|
-
*/
|
|
104
|
-
export interface MigrateOptions {
|
|
105
|
-
/** Perform deep scan for legacy installations */
|
|
106
|
-
deepScan?: boolean
|
|
107
|
-
/** Remove legacy installations after migration */
|
|
108
|
-
removeLegacy?: boolean
|
|
109
|
-
/** Dry run without making changes */
|
|
110
|
-
dryRun?: boolean
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Options for the analyze command.
|
|
115
|
-
*/
|
|
116
|
-
export interface AnalyzeOptions {
|
|
117
|
-
/** Force re-analysis even if cached */
|
|
118
|
-
force?: boolean
|
|
119
|
-
/** Analysis depth */
|
|
120
|
-
depth?: 'quick' | 'normal' | 'deep'
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Result from project migration.
|
|
125
|
-
*/
|
|
126
|
-
export interface MigrationResult {
|
|
127
|
-
success: boolean
|
|
128
|
-
projectId: string | null
|
|
129
|
-
filesCopied?: number
|
|
130
|
-
layerCounts: LayerCounts
|
|
131
|
-
config: MigrationConfig | null
|
|
132
|
-
author: Author | null
|
|
133
|
-
issues: string[]
|
|
134
|
-
dryRun: boolean
|
|
135
|
-
legacyRemoved?: boolean
|
|
136
|
-
legacyCleaned?: boolean
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export interface LayerCounts {
|
|
140
|
-
core: number
|
|
141
|
-
progress: number
|
|
142
|
-
planning: number
|
|
143
|
-
analysis: number
|
|
144
|
-
memory: number
|
|
145
|
-
other: number
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export interface MigrationConfig {
|
|
149
|
-
projectId: string
|
|
150
|
-
version: string
|
|
151
|
-
migratedAt: string
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// Type-safe command method names (for dynamic invocation)
|
|
155
|
-
export type CommandMethodName =
|
|
156
|
-
| 'work' | 'now' | 'done' | 'next' | 'pause' | 'resume'
|
|
157
|
-
| 'init' | 'feature' | 'bug' | 'idea' | 'spec'
|
|
158
|
-
| 'ship'
|
|
159
|
-
| 'dash' | 'help'
|
|
160
|
-
| 'cleanup' | 'design' | 'recover' | 'undo' | 'redo' | 'history'
|
|
161
|
-
| 'analyze' | 'sync'
|
|
162
|
-
| 'start' | 'setup' | 'migrateAll'
|
|
163
|
-
|
|
164
|
-
// Function signature for standard command methods
|
|
165
|
-
export type StandardCommandFn = (param: string | null, projectPath?: string) => Promise<CommandResult>
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Global configuration for prjct.
|
|
169
|
-
*/
|
|
170
|
-
export interface GlobalConfig {
|
|
171
|
-
projectId: string
|
|
172
|
-
projectPath?: string
|
|
173
|
-
authors: AuthorEntry[]
|
|
174
|
-
version: string
|
|
175
|
-
created?: string
|
|
176
|
-
lastSync: string
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export interface AuthorEntry {
|
|
180
|
-
name: string
|
|
181
|
-
email: string
|
|
182
|
-
github: string
|
|
183
|
-
firstContribution?: string
|
|
184
|
-
lastActivity?: string
|
|
185
|
-
}
|
package/core/commands.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agentic Commands Handler for prjct CLI
|
|
3
|
-
*
|
|
4
|
-
* Re-exports from modular commands/ directory.
|
|
5
|
-
* See commands/index.ts for implementation.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import instance, { PrjctCommands } from './commands/index'
|
|
9
|
-
|
|
10
|
-
export default instance
|
|
11
|
-
export { PrjctCommands }
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* File Format Constants
|
|
3
|
-
*
|
|
4
|
-
* Single source of truth for all file patterns and formats used in prjct.
|
|
5
|
-
* Use these constants instead of hardcoded strings.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```typescript
|
|
9
|
-
* import { FORMATS, STATUS } from '../constants/formats'
|
|
10
|
-
*
|
|
11
|
-
* // Instead of:
|
|
12
|
-
* const nowContent = `# NOW\n\n**${task}**`
|
|
13
|
-
*
|
|
14
|
-
* // Use:
|
|
15
|
-
* const nowContent = FORMATS.NOW.header(task)
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* NOW file format patterns.
|
|
21
|
-
*/
|
|
22
|
-
export const NOW = {
|
|
23
|
-
/** Header marker for NOW file */
|
|
24
|
-
HEADER: '# NOW',
|
|
25
|
-
|
|
26
|
-
/** Pattern to extract task from NOW content */
|
|
27
|
-
TASK_PATTERN: /\*\*(.+?)\*\*/,
|
|
28
|
-
|
|
29
|
-
/** Generate NOW file content */
|
|
30
|
-
content: (task: string, startedAt: string, agent?: string, confidence?: number): string => {
|
|
31
|
-
const lines = [
|
|
32
|
-
'# NOW',
|
|
33
|
-
'',
|
|
34
|
-
`**${task}**`,
|
|
35
|
-
'',
|
|
36
|
-
`Started: ${startedAt}`,
|
|
37
|
-
]
|
|
38
|
-
if (agent) {
|
|
39
|
-
lines.push(`Agent: ${agent}${confidence ? ` (${Math.round(confidence * 100)}% confidence)` : ''}`)
|
|
40
|
-
}
|
|
41
|
-
return lines.join('\n') + '\n'
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
/** Extract task from NOW content */
|
|
45
|
-
extractTask: (content: string): string | null => {
|
|
46
|
-
const match = content.match(NOW.TASK_PATTERN)
|
|
47
|
-
return match ? match[1] : null
|
|
48
|
-
},
|
|
49
|
-
} as const
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* SHIPPED file format patterns.
|
|
53
|
-
*/
|
|
54
|
-
export const SHIPPED = {
|
|
55
|
-
/** Header marker for SHIPPED file */
|
|
56
|
-
HEADER: '# SHIPPED 🚀',
|
|
57
|
-
|
|
58
|
-
/** Generate ship entry */
|
|
59
|
-
entry: (feature: string, date: string, duration?: string): string => {
|
|
60
|
-
const lines = [
|
|
61
|
-
`## ${feature}`,
|
|
62
|
-
'',
|
|
63
|
-
`Shipped: ${date}`,
|
|
64
|
-
]
|
|
65
|
-
if (duration) {
|
|
66
|
-
lines.push(`Duration: ${duration}`)
|
|
67
|
-
}
|
|
68
|
-
return lines.join('\n') + '\n\n'
|
|
69
|
-
},
|
|
70
|
-
} as const
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* NEXT file format patterns.
|
|
74
|
-
*/
|
|
75
|
-
export const NEXT = {
|
|
76
|
-
/** Header marker for NEXT file */
|
|
77
|
-
HEADER: '# NEXT',
|
|
78
|
-
|
|
79
|
-
/** Pattern for task entries */
|
|
80
|
-
TASK_PATTERN: /^[-*]\s+\[([x ])\]\s+(.+)$/gm,
|
|
81
|
-
|
|
82
|
-
/** Generate task entry */
|
|
83
|
-
entry: (task: string, completed: boolean = false): string => {
|
|
84
|
-
return `- [${completed ? 'x' : ' '}] ${task}\n`
|
|
85
|
-
},
|
|
86
|
-
} as const
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* IDEAS file format patterns.
|
|
90
|
-
*/
|
|
91
|
-
export const IDEAS = {
|
|
92
|
-
/** Header marker for IDEAS file */
|
|
93
|
-
HEADER: '# IDEAS 💡',
|
|
94
|
-
|
|
95
|
-
/** Generate idea entry */
|
|
96
|
-
entry: (idea: string, date: string): string => {
|
|
97
|
-
return `- ${idea} _(${date})_\n`
|
|
98
|
-
},
|
|
99
|
-
} as const
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* ROADMAP file format patterns.
|
|
103
|
-
*/
|
|
104
|
-
export const ROADMAP = {
|
|
105
|
-
/** Header marker for ROADMAP file */
|
|
106
|
-
HEADER: '# ROADMAP 🗺️',
|
|
107
|
-
|
|
108
|
-
/** Status markers */
|
|
109
|
-
STATUS: {
|
|
110
|
-
PLANNED: '📋 Planned',
|
|
111
|
-
IN_PROGRESS: '🚧 In Progress',
|
|
112
|
-
COMPLETED: '✅ Completed',
|
|
113
|
-
BLOCKED: '🚫 Blocked',
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
/** Generate feature entry */
|
|
117
|
-
entry: (feature: string, status: keyof typeof ROADMAP.STATUS, tasks?: string[]): string => {
|
|
118
|
-
const lines = [
|
|
119
|
-
`## ${feature}`,
|
|
120
|
-
'',
|
|
121
|
-
`Status: ${ROADMAP.STATUS[status]}`,
|
|
122
|
-
]
|
|
123
|
-
if (tasks && tasks.length > 0) {
|
|
124
|
-
lines.push('', '### Tasks', '')
|
|
125
|
-
tasks.forEach(task => lines.push(`- [ ] ${task}`))
|
|
126
|
-
}
|
|
127
|
-
return lines.join('\n') + '\n\n'
|
|
128
|
-
},
|
|
129
|
-
} as const
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Session file paths.
|
|
133
|
-
*/
|
|
134
|
-
export const SESSION = {
|
|
135
|
-
/** Date format for session directories */
|
|
136
|
-
DATE_FORMAT: 'YYYY-MM-DD',
|
|
137
|
-
|
|
138
|
-
/** Generate session path */
|
|
139
|
-
path: (year: string, month: string, day: string): string => {
|
|
140
|
-
return `sessions/${year}-${month}/${year}-${month}-${day}`
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
/** Session metadata filename */
|
|
144
|
-
METADATA_FILE: 'session-meta.json',
|
|
145
|
-
|
|
146
|
-
/** Context log filename */
|
|
147
|
-
CONTEXT_FILE: 'context.jsonl',
|
|
148
|
-
} as const
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Status values used throughout prjct.
|
|
152
|
-
*/
|
|
153
|
-
export const STATUS = {
|
|
154
|
-
PENDING: 'pending',
|
|
155
|
-
IN_PROGRESS: 'in_progress',
|
|
156
|
-
COMPLETED: 'completed',
|
|
157
|
-
BLOCKED: 'blocked',
|
|
158
|
-
PAUSED: 'paused',
|
|
159
|
-
} as const
|
|
160
|
-
|
|
161
|
-
export type Status = typeof STATUS[keyof typeof STATUS]
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Priority levels.
|
|
165
|
-
*/
|
|
166
|
-
export const PRIORITY = {
|
|
167
|
-
LOW: 'low',
|
|
168
|
-
MEDIUM: 'medium',
|
|
169
|
-
HIGH: 'high',
|
|
170
|
-
CRITICAL: 'critical',
|
|
171
|
-
} as const
|
|
172
|
-
|
|
173
|
-
export type Priority = typeof PRIORITY[keyof typeof PRIORITY]
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Combined exports for easy import.
|
|
177
|
-
*/
|
|
178
|
-
export const FORMATS = {
|
|
179
|
-
NOW,
|
|
180
|
-
SHIPPED,
|
|
181
|
-
NEXT,
|
|
182
|
-
IDEAS,
|
|
183
|
-
ROADMAP,
|
|
184
|
-
SESSION,
|
|
185
|
-
STATUS,
|
|
186
|
-
PRIORITY,
|
|
187
|
-
} as const
|
package/core/context-sync.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Context Sync
|
|
3
|
-
*
|
|
4
|
-
* Wrapper that generates context MD files from JSON data.
|
|
5
|
-
* Uses the context generator to create CLAUDE.md, now.md, queue.md, summary.md
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { generateContext } from './context/generator'
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Generate local context files for Claude
|
|
12
|
-
*/
|
|
13
|
-
async function generateLocalContext(projectPath: string, projectId: string): Promise<void> {
|
|
14
|
-
await generateContext(projectId, projectPath)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { generateLocalContext }
|
|
18
|
-
export default { generateLocalContext }
|