prjct-cli 0.35.3 → 0.36.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 +43 -0
- package/README.md +63 -618
- package/bin/prjct.ts +116 -17
- package/core/cli/start.ts +387 -0
- package/core/commands/analysis.ts +58 -32
- package/core/commands/command-data.ts +11 -50
- package/core/commands/commands.ts +18 -21
- package/core/commands/context.ts +238 -0
- package/core/commands/register.ts +7 -5
- package/core/commands/setup.ts +1 -17
- package/core/index.ts +103 -39
- package/core/infrastructure/ai-provider.ts +312 -0
- package/core/infrastructure/command-installer.ts +49 -5
- package/core/infrastructure/editors-config.ts +20 -6
- package/core/infrastructure/setup.ts +227 -62
- package/core/services/index.ts +2 -0
- package/core/services/skill-service.ts +52 -16
- package/core/services/sync-service.ts +1080 -0
- package/core/types/commands.ts +0 -12
- package/core/types/index.ts +12 -1
- package/core/types/provider.ts +110 -0
- package/core/utils/branding.ts +20 -3
- package/dist/bin/prjct.mjs +1053 -1426
- package/dist/core/infrastructure/command-installer.js +33 -2
- package/dist/core/infrastructure/editors-config.js +13 -3
- package/dist/core/infrastructure/setup.js +293 -73
- package/package.json +10 -16
- package/scripts/postinstall.js +17 -119
- package/templates/agentic/agent-routing.md +22 -88
- package/templates/agentic/agents/uxui.md +42 -197
- package/templates/agentic/context-filtering.md +14 -56
- package/templates/agentic/orchestrator.md +26 -302
- package/templates/agentic/skill-integration.md +37 -289
- package/templates/agentic/subagent-generation.md +31 -104
- package/templates/agentic/task-fragmentation.md +39 -273
- package/templates/agents/AGENTS.md +33 -181
- package/templates/commands/bug.md +22 -520
- package/templates/commands/dash.md +26 -161
- package/templates/commands/done.md +19 -250
- package/templates/commands/enrich.md +21 -732
- package/templates/commands/idea.md +18 -160
- package/templates/commands/init.md +20 -209
- package/templates/commands/merge.md +21 -185
- package/templates/commands/next.md +21 -103
- package/templates/commands/p.md +1 -1
- package/templates/commands/p.toml +37 -0
- package/templates/commands/pause.md +21 -272
- package/templates/commands/resume.md +18 -411
- package/templates/commands/setup.md +0 -1
- package/templates/commands/ship.md +30 -627
- package/templates/commands/sync.md +11 -1448
- package/templates/commands/task.md +17 -439
- package/templates/commands/test.md +30 -259
- package/templates/global/CLAUDE.md +33 -1
- package/templates/global/GEMINI.md +265 -0
- package/templates/global/STORAGE-SPEC.md +256 -0
- package/templates/global/docs/agents.md +88 -0
- package/templates/global/docs/architecture.md +103 -0
- package/templates/global/docs/commands.md +96 -0
- package/templates/global/docs/validation.md +95 -0
- package/CLAUDE.md +0 -211
- package/packages/shared/package.json +0 -29
- package/packages/shared/src/index.ts +0 -10
- package/packages/shared/src/schemas.ts +0 -124
- package/packages/shared/src/types.ts +0 -187
- package/packages/shared/src/unified.ts +0 -174
- package/packages/shared/src/utils.ts +0 -148
- package/packages/shared/tsconfig.json +0 -18
package/core/types/commands.ts
CHANGED
|
@@ -131,18 +131,6 @@ export interface SetupOptions {
|
|
|
131
131
|
nonInteractive?: boolean
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
/**
|
|
135
|
-
* Options for the migrate-all command.
|
|
136
|
-
*/
|
|
137
|
-
export interface MigrateOptions {
|
|
138
|
-
/** Perform deep scan for legacy installations */
|
|
139
|
-
deepScan?: boolean
|
|
140
|
-
/** Remove legacy installations after migration */
|
|
141
|
-
removeLegacy?: boolean
|
|
142
|
-
/** Dry run without making changes */
|
|
143
|
-
dryRun?: boolean
|
|
144
|
-
}
|
|
145
|
-
|
|
146
134
|
/**
|
|
147
135
|
* Options for the analyze command.
|
|
148
136
|
*/
|
package/core/types/index.ts
CHANGED
|
@@ -36,7 +36,6 @@ export type {
|
|
|
36
36
|
DesignOptions,
|
|
37
37
|
CleanupOptions,
|
|
38
38
|
SetupOptions,
|
|
39
|
-
MigrateOptions,
|
|
40
39
|
AnalyzeOptions,
|
|
41
40
|
// Migration types
|
|
42
41
|
MigrationResult,
|
|
@@ -406,3 +405,15 @@ export type {
|
|
|
406
405
|
SSEManager,
|
|
407
406
|
SSEEventType,
|
|
408
407
|
} from './server'
|
|
408
|
+
|
|
409
|
+
// =============================================================================
|
|
410
|
+
// Provider Types (AI CLI abstraction)
|
|
411
|
+
// =============================================================================
|
|
412
|
+
export type {
|
|
413
|
+
AIProviderName,
|
|
414
|
+
CommandFormat,
|
|
415
|
+
AIProviderConfig,
|
|
416
|
+
ProviderDetectionResult,
|
|
417
|
+
ProviderSelectionResult,
|
|
418
|
+
ProviderBranding,
|
|
419
|
+
} from './provider'
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Provider Types
|
|
3
|
+
*
|
|
4
|
+
* Abstractions for supporting multiple AI CLI agents (Claude Code, Gemini CLI).
|
|
5
|
+
* Both agents share similar architectures, making compatibility achievable.
|
|
6
|
+
*
|
|
7
|
+
* Key discovery: Skills use identical SKILL.md format for both providers.
|
|
8
|
+
*
|
|
9
|
+
* @see https://geminicli.com/docs/cli/gemini-md/
|
|
10
|
+
* @see https://geminicli.com/docs/cli/skills/
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Supported AI provider names
|
|
15
|
+
*/
|
|
16
|
+
export type AIProviderName = 'claude' | 'gemini'
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Command format for each provider
|
|
20
|
+
* - Claude: Markdown files (.md)
|
|
21
|
+
* - Gemini: TOML files (.toml)
|
|
22
|
+
*/
|
|
23
|
+
export type CommandFormat = 'md' | 'toml'
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* AI Provider configuration
|
|
27
|
+
* Defines paths and formats for each AI CLI agent
|
|
28
|
+
*/
|
|
29
|
+
export interface AIProviderConfig {
|
|
30
|
+
/** Provider identifier */
|
|
31
|
+
name: AIProviderName
|
|
32
|
+
|
|
33
|
+
/** Display name for UI/logs */
|
|
34
|
+
displayName: string
|
|
35
|
+
|
|
36
|
+
/** CLI command name (e.g., 'claude', 'gemini') */
|
|
37
|
+
cliCommand: string
|
|
38
|
+
|
|
39
|
+
/** Global config directory (e.g., ~/.claude, ~/.gemini) */
|
|
40
|
+
configDir: string
|
|
41
|
+
|
|
42
|
+
/** Context file name (CLAUDE.md or GEMINI.md) */
|
|
43
|
+
contextFile: string
|
|
44
|
+
|
|
45
|
+
/** Skills directory (e.g., ~/.claude/skills, ~/.gemini/skills) */
|
|
46
|
+
skillsDir: string
|
|
47
|
+
|
|
48
|
+
/** Commands directory relative to project (e.g., .claude/commands, .gemini/commands) */
|
|
49
|
+
commandsDir: string
|
|
50
|
+
|
|
51
|
+
/** Command file format */
|
|
52
|
+
commandFormat: CommandFormat
|
|
53
|
+
|
|
54
|
+
/** Settings file name (settings.json for both) */
|
|
55
|
+
settingsFile: string
|
|
56
|
+
|
|
57
|
+
/** Project settings file (e.g., settings.local.json, settings.json) */
|
|
58
|
+
projectSettingsFile: string
|
|
59
|
+
|
|
60
|
+
/** Ignore file name (.claudeignore, .geminiignore) */
|
|
61
|
+
ignoreFile: string
|
|
62
|
+
|
|
63
|
+
/** URL for provider website */
|
|
64
|
+
websiteUrl: string
|
|
65
|
+
|
|
66
|
+
/** URL for provider documentation */
|
|
67
|
+
docsUrl: string
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Provider detection result
|
|
72
|
+
*/
|
|
73
|
+
export interface ProviderDetectionResult {
|
|
74
|
+
/** Whether the provider CLI is installed */
|
|
75
|
+
installed: boolean
|
|
76
|
+
|
|
77
|
+
/** Provider version if installed */
|
|
78
|
+
version?: string
|
|
79
|
+
|
|
80
|
+
/** Path to the CLI executable */
|
|
81
|
+
path?: string
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Result of provider selection during setup
|
|
86
|
+
*/
|
|
87
|
+
export interface ProviderSelectionResult {
|
|
88
|
+
/** Selected provider */
|
|
89
|
+
provider: AIProviderName
|
|
90
|
+
|
|
91
|
+
/** Whether user was prompted to choose (both installed) */
|
|
92
|
+
userSelected: boolean
|
|
93
|
+
|
|
94
|
+
/** Detection details */
|
|
95
|
+
detection: {
|
|
96
|
+
claude: ProviderDetectionResult
|
|
97
|
+
gemini: ProviderDetectionResult
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Provider-aware branding configuration
|
|
103
|
+
*/
|
|
104
|
+
export interface ProviderBranding {
|
|
105
|
+
/** Commit footer text */
|
|
106
|
+
commitFooter: string
|
|
107
|
+
|
|
108
|
+
/** Short signature */
|
|
109
|
+
signature: string
|
|
110
|
+
}
|
package/core/utils/branding.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Branding Configuration for prjct-cli
|
|
3
|
-
* Single source of truth for all branding across CLI and
|
|
3
|
+
* Single source of truth for all branding across CLI and AI agents
|
|
4
|
+
*
|
|
5
|
+
* Supports multiple AI providers (Claude Code, Gemini CLI)
|
|
4
6
|
*/
|
|
5
7
|
|
|
6
8
|
import chalk from 'chalk'
|
|
9
|
+
import type { AIProviderName } from '../types/provider'
|
|
10
|
+
import { getProviderBranding, Providers } from '../infrastructure/ai-provider'
|
|
7
11
|
|
|
8
12
|
const SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
|
|
9
13
|
const SPINNER_SPEED = 80
|
|
@@ -30,6 +34,9 @@ interface Branding {
|
|
|
30
34
|
website: string
|
|
31
35
|
docs: string
|
|
32
36
|
}
|
|
37
|
+
// Provider-aware methods
|
|
38
|
+
getCommitFooter: (provider?: AIProviderName) => string
|
|
39
|
+
getSignature: (provider?: AIProviderName) => string
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
const branding: Branding = {
|
|
@@ -52,13 +59,13 @@ const branding: Branding = {
|
|
|
52
59
|
chalk.cyan('⚡') + ' ' + chalk.cyan('prjct') + ' ' + chalk.cyan(SPINNER_FRAMES[frame % 10]) + ' ' + chalk.dim(msg || '')
|
|
53
60
|
},
|
|
54
61
|
|
|
55
|
-
// Template
|
|
62
|
+
// Template (plain text)
|
|
56
63
|
template: {
|
|
57
64
|
header: '⚡ prjct',
|
|
58
65
|
footer: '⚡ prjct'
|
|
59
66
|
},
|
|
60
67
|
|
|
61
|
-
// Git commit footer
|
|
68
|
+
// Default Git commit footer (Claude - for backward compatibility)
|
|
62
69
|
commitFooter: `🤖 Generated with [p/](https://www.prjct.app/)
|
|
63
70
|
Designed for [Claude](https://www.anthropic.com/claude)`,
|
|
64
71
|
|
|
@@ -66,6 +73,16 @@ Designed for [Claude](https://www.anthropic.com/claude)`,
|
|
|
66
73
|
urls: {
|
|
67
74
|
website: 'https://prjct.app',
|
|
68
75
|
docs: 'https://prjct.app/docs'
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
// Provider-aware commit footer
|
|
79
|
+
getCommitFooter: (provider: AIProviderName = 'claude') => {
|
|
80
|
+
return getProviderBranding(provider).commitFooter
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
// Provider-aware signature
|
|
84
|
+
getSignature: (provider: AIProviderName = 'claude') => {
|
|
85
|
+
return getProviderBranding(provider).signature
|
|
69
86
|
}
|
|
70
87
|
}
|
|
71
88
|
|