cc-ship 0.0.6 → 0.0.8
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/agents/ship-architect.md +23 -20
- package/agents/ship-brainstormer-prd.md +24 -21
- package/agents/ship-brainstormer.md +256 -250
- package/agents/ship-executor.md +17 -4
- package/agents/ship-shaper.md +159 -146
- package/agents/ship-specifier.md +23 -20
- package/agents/ship-splitter.md +24 -21
- package/agents/ship-verifier.md +15 -2
- package/bin/install.js +29 -3
- package/commands/ship/architect.md +17 -8
- package/commands/ship/brainstorm.md +84 -75
- package/commands/ship/execute.md +16 -13
- package/commands/ship/help.md +111 -105
- package/commands/ship/init.md +73 -0
- package/commands/ship/next.md +35 -14
- package/commands/ship/prd.md +16 -7
- package/commands/ship/shape.md +112 -103
- package/commands/ship/specify.md +16 -7
- package/commands/ship/split.md +20 -11
- package/commands/ship/status.md +136 -129
- package/commands/ship/verify.md +13 -10
- package/hooks/check-agent-completion.js +64 -0
- package/hooks/lib/config.js +34 -0
- package/hooks/lib/find-packages.js +37 -0
- package/hooks/lib/parse-frontmatter.js +135 -0
- package/hooks/validate-frontmatter.js +109 -0
- package/hooks/validate-transition.js +136 -0
- package/hooks-settings.json +26 -0
- package/package.json +33 -31
- package/skills/ship-shaping/SKILL.md +151 -151
- package/skills/ship-writing/SKILL.md +152 -152
|
@@ -1,75 +1,84 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ship:brainstorm
|
|
3
|
-
description: "Lance une session de brainstorming interactive"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Commande brainstorm
|
|
7
|
-
|
|
8
|
-
Lance l'agent ship-brainstormer pour transformer une idée vague en brief structuré.
|
|
9
|
-
|
|
10
|
-
## Instructions
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Tu
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
|
|
1
|
+
---
|
|
2
|
+
name: ship:brainstorm
|
|
3
|
+
description: "Lance une session de brainstorming interactive"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Commande brainstorm
|
|
7
|
+
|
|
8
|
+
Lance l'agent ship-brainstormer pour transformer une idée vague en brief structuré.
|
|
9
|
+
|
|
10
|
+
## Instructions
|
|
11
|
+
|
|
12
|
+
### Résolution du projet (PREMIÈRE ÉTAPE)
|
|
13
|
+
|
|
14
|
+
1. Lire `cc-ship.json` à la racine du repo
|
|
15
|
+
2. Résoudre le chemin : `{projectsDir}/{currentProject}/`
|
|
16
|
+
3. Si `cc-ship.json` n'existe pas OU `currentProject` est null → ERREUR : "Lance `/ship:init` ou `/ship:next` d'abord pour initialiser un projet."
|
|
17
|
+
4. Utiliser ce chemin partout au lieu de `.ship/`
|
|
18
|
+
|
|
19
|
+
### Lancement de l'agent
|
|
20
|
+
|
|
21
|
+
Tu dois lancer l'agent `ship-brainstormer` en utilisant le tool Task avec les paramètres suivants:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
subagent_type: ship-brainstormer
|
|
25
|
+
prompt: "Le chemin du projet est {projectPath}. [Le contexte de l'utilisateur ou 'Démarre une nouvelle session de brainstorming']"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## ⚠️ Comportement de relais (IMPORTANT)
|
|
29
|
+
|
|
30
|
+
Tu es un **relais transparent** entre l'agent et l'utilisateur.
|
|
31
|
+
|
|
32
|
+
Quand l'agent te retourne une question pour l'utilisateur :
|
|
33
|
+
1. **Utilise `AskUserQuestion`** pour la poser exactement comme l'agent l'a formulée
|
|
34
|
+
2. Récupère la réponse de l'utilisateur
|
|
35
|
+
3. Relance l'agent avec cette réponse
|
|
36
|
+
|
|
37
|
+
**Ce que tu ne fais JAMAIS** :
|
|
38
|
+
- ❌ Résumer les questions de l'agent
|
|
39
|
+
- ❌ Reformuler ce que l'agent demande
|
|
40
|
+
- ❌ Répondre à la place de l'utilisateur
|
|
41
|
+
- ❌ Dire "l'agent te demande si..." au lieu d'utiliser AskUserQuestion
|
|
42
|
+
|
|
43
|
+
**Ce que tu fais TOUJOURS** :
|
|
44
|
+
- ✅ Utiliser AskUserQuestion avec la question exacte de l'agent
|
|
45
|
+
- ✅ Passer la réponse de l'utilisateur à l'agent
|
|
46
|
+
- ✅ Continuer jusqu'à ce que l'agent ait terminé
|
|
47
|
+
|
|
48
|
+
## Comportement attendu
|
|
49
|
+
|
|
50
|
+
1. Si l'utilisateur a fourni une idée avec la commande, passe-la à l'agent
|
|
51
|
+
2. Si aucune idée n'est fournie, l'agent demandera à l'utilisateur de décrire son idée
|
|
52
|
+
3. L'agent va:
|
|
53
|
+
- Proposer une recherche sur le domaine (optionnel)
|
|
54
|
+
- Recommander une technique de brainstorming
|
|
55
|
+
- Mener une session interactive
|
|
56
|
+
- Produire un brief structuré dans `{projectPath}/brief.md`
|
|
57
|
+
|
|
58
|
+
## Exemple d'utilisation
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
/ship:brainstorm J'ai une idée d'app pour aider les gens à mieux dormir
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
ou simplement:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
/ship:brainstorm
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Output
|
|
71
|
+
|
|
72
|
+
**Fichiers générés** (dans le dossier projet) :
|
|
73
|
+
- `brief.md` : Le brief structuré
|
|
74
|
+
- `research.md` : Research domaine métier (optionnel, si demandé)
|
|
75
|
+
|
|
76
|
+
**Structure du brief** :
|
|
77
|
+
- L'idée en une phrase
|
|
78
|
+
- Contexte
|
|
79
|
+
- Objectifs
|
|
80
|
+
- Utilisateurs cibles
|
|
81
|
+
- Contraintes connues
|
|
82
|
+
- Premières idées / Directions
|
|
83
|
+
- Questions ouvertes
|
|
84
|
+
- Research (référence vers `research.md` si effectuée)
|
package/commands/ship/execute.md
CHANGED
|
@@ -9,11 +9,20 @@ Lance l'agent ship-executor pour implementer UN scope d'un package en respectant
|
|
|
9
9
|
|
|
10
10
|
## Instructions
|
|
11
11
|
|
|
12
|
+
### Resolution du projet (PREMIERE ETAPE)
|
|
13
|
+
|
|
14
|
+
1. Lire `cc-ship.json` a la racine du repo
|
|
15
|
+
2. Resoudre le chemin : `{projectsDir}/{currentProject}/`
|
|
16
|
+
3. Si `cc-ship.json` n'existe pas OU `currentProject` est null → ERREUR : "Lance `/ship:init` ou `/ship:next` d'abord pour initialiser un projet."
|
|
17
|
+
4. Utiliser ce chemin partout au lieu de `.ship/`
|
|
18
|
+
|
|
19
|
+
### Lancement de l'agent
|
|
20
|
+
|
|
12
21
|
Tu dois lancer l'agent `ship-executor` en utilisant le tool Task avec les parametres suivants:
|
|
13
22
|
|
|
14
23
|
```
|
|
15
24
|
subagent_type: ship-executor
|
|
16
|
-
prompt: [Le package et/ou scope a executer]
|
|
25
|
+
prompt: "Le chemin du projet est {projectPath}. [Le package et/ou scope a executer]"
|
|
17
26
|
```
|
|
18
27
|
|
|
19
28
|
## Prerequis
|
|
@@ -22,10 +31,10 @@ Avant de lancer l'agent, verifie que ces fichiers existent :
|
|
|
22
31
|
|
|
23
32
|
| Fichier | Obligatoire | Cree par |
|
|
24
33
|
|---------|-------------|----------|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
34
|
+
| `{projectPath}/packages/<nom>/package.md` | Oui | shaper |
|
|
35
|
+
| `{projectPath}/packages/<nom>/verification.md` | Oui | shaper |
|
|
36
|
+
| `{projectPath}/architecture.md` | Oui | architect |
|
|
37
|
+
| `{projectPath}/requirements.md` | Oui | specifier |
|
|
29
38
|
|
|
30
39
|
### Verification du status
|
|
31
40
|
|
|
@@ -91,16 +100,10 @@ Quand l'agent te retourne une question pour l'utilisateur :
|
|
|
91
100
|
Execute le scope courant du package actif (detecte automatiquement).
|
|
92
101
|
|
|
93
102
|
```
|
|
94
|
-
/ship:execute
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Execute le scope courant du package specifie.
|
|
98
|
-
|
|
99
|
-
```
|
|
100
|
-
/ship:execute .ship/packages/auth/package.md scope-2
|
|
103
|
+
/ship:execute auth
|
|
101
104
|
```
|
|
102
105
|
|
|
103
|
-
Execute
|
|
106
|
+
Execute le scope courant du package "auth".
|
|
104
107
|
|
|
105
108
|
```
|
|
106
109
|
/ship:execute auth
|
package/commands/ship/help.md
CHANGED
|
@@ -1,105 +1,111 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ship:help
|
|
3
|
-
description: "Affiche la liste des commandes ship disponibles"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Ship v2 - Aide
|
|
7
|
-
|
|
8
|
-
Un toolkit pour augmenter Claude Code avec un workflow pragmatique centré sur
|
|
9
|
-
l'interaction avec l'humain.
|
|
10
|
-
|
|
11
|
-
## Philosophie
|
|
12
|
-
|
|
13
|
-
- **Pragmatisme** : Get shit done, sans bullshit
|
|
14
|
-
- **Contrôle humain** : L'utilisateur valide, intervient, décide
|
|
15
|
-
- **Shaping avant coding** : On creuse la fonctionnalité à fond, ensuite
|
|
16
|
-
l'implémentation suit
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Commandes par phase
|
|
21
|
-
|
|
22
|
-
### Phase 1 - Idéation
|
|
23
|
-
|
|
24
|
-
| Commande | Description |
|
|
25
|
-
| ------------------ | ------------------------------------------------ |
|
|
26
|
-
| `/ship:brainstorm` | Transforme une idée vague en brief structuré |
|
|
27
|
-
| `/ship:prd` | Creuse le brief en Product Requirements Document |
|
|
28
|
-
|
|
29
|
-
### Phase 2 - Spécification
|
|
30
|
-
|
|
31
|
-
| Commande | Description |
|
|
32
|
-
| ----------------- | ------------------------------------------ |
|
|
33
|
-
| `/ship:specify` | Transforme le PRD en exigences (SRS) |
|
|
34
|
-
| `/ship:architect` | Propose ou valide l'architecture technique |
|
|
35
|
-
| `/ship:split` | Découpe en packages livrables |
|
|
36
|
-
|
|
37
|
-
### Phase 3 - Exécution
|
|
38
|
-
|
|
39
|
-
| Commande | Description |
|
|
40
|
-
| --------------- | ----------------------------- |
|
|
41
|
-
| `/ship:shape` | Planifie UN package en scopes |
|
|
42
|
-
| `/ship:execute` | Implémente le scope courant |
|
|
43
|
-
| `/ship:verify` | Vérifie l'implémentation |
|
|
44
|
-
|
|
45
|
-
### Orchestration
|
|
46
|
-
|
|
47
|
-
| Commande | Description |
|
|
48
|
-
| -------------- | ------------------------------------------------------- |
|
|
49
|
-
| `/ship:
|
|
50
|
-
| `/ship:
|
|
51
|
-
| `/ship:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
├──
|
|
76
|
-
├──
|
|
77
|
-
|
|
78
|
-
├──
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
| ship-
|
|
96
|
-
| ship-
|
|
97
|
-
| ship-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
1
|
+
---
|
|
2
|
+
name: ship:help
|
|
3
|
+
description: "Affiche la liste des commandes ship disponibles"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Ship v2 - Aide
|
|
7
|
+
|
|
8
|
+
Un toolkit pour augmenter Claude Code avec un workflow pragmatique centré sur
|
|
9
|
+
l'interaction avec l'humain.
|
|
10
|
+
|
|
11
|
+
## Philosophie
|
|
12
|
+
|
|
13
|
+
- **Pragmatisme** : Get shit done, sans bullshit
|
|
14
|
+
- **Contrôle humain** : L'utilisateur valide, intervient, décide
|
|
15
|
+
- **Shaping avant coding** : On creuse la fonctionnalité à fond, ensuite
|
|
16
|
+
l'implémentation suit
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Commandes par phase
|
|
21
|
+
|
|
22
|
+
### Phase 1 - Idéation
|
|
23
|
+
|
|
24
|
+
| Commande | Description |
|
|
25
|
+
| ------------------ | ------------------------------------------------ |
|
|
26
|
+
| `/ship:brainstorm` | Transforme une idée vague en brief structuré |
|
|
27
|
+
| `/ship:prd` | Creuse le brief en Product Requirements Document |
|
|
28
|
+
|
|
29
|
+
### Phase 2 - Spécification
|
|
30
|
+
|
|
31
|
+
| Commande | Description |
|
|
32
|
+
| ----------------- | ------------------------------------------ |
|
|
33
|
+
| `/ship:specify` | Transforme le PRD en exigences (SRS) |
|
|
34
|
+
| `/ship:architect` | Propose ou valide l'architecture technique |
|
|
35
|
+
| `/ship:split` | Découpe en packages livrables |
|
|
36
|
+
|
|
37
|
+
### Phase 3 - Exécution
|
|
38
|
+
|
|
39
|
+
| Commande | Description |
|
|
40
|
+
| --------------- | ----------------------------- |
|
|
41
|
+
| `/ship:shape` | Planifie UN package en scopes |
|
|
42
|
+
| `/ship:execute` | Implémente le scope courant |
|
|
43
|
+
| `/ship:verify` | Vérifie l'implémentation |
|
|
44
|
+
|
|
45
|
+
### Orchestration
|
|
46
|
+
|
|
47
|
+
| Commande | Description |
|
|
48
|
+
| -------------- | ------------------------------------------------------- |
|
|
49
|
+
| `/ship:init` | Initialise un nouveau projet ship |
|
|
50
|
+
| `/ship:next` | Détecte l'état et propose l'étape suivante (interactif) |
|
|
51
|
+
| `/ship:status` | Affiche l'état du projet |
|
|
52
|
+
| `/ship:help` | Affiche cette aide |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Flow
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
BRAINSTORM → PRD → SPECIFY → ARCHITECT → SPLIT
|
|
60
|
+
↓
|
|
61
|
+
┌─────────────────────┘
|
|
62
|
+
↓
|
|
63
|
+
Pour CHAQUE package:
|
|
64
|
+
SHAPE → EXECUTE ←→ VERIFY
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Structure des fichiers
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
cc-ship.json # Configuration multi-projet
|
|
73
|
+
{projectsDir}/
|
|
74
|
+
└── {currentProject}/ # Dossier projet actif
|
|
75
|
+
├── brief.md # Output brainstormer
|
|
76
|
+
├── research.md # Output brainstormer (optionnel)
|
|
77
|
+
├── prd.md # Output brainstormer-prd
|
|
78
|
+
├── requirements.md # Output specifier (SRS)
|
|
79
|
+
├── architecture.md # Output architect
|
|
80
|
+
└── packages/
|
|
81
|
+
├── mapping.md # Output splitter
|
|
82
|
+
└── <nom>/
|
|
83
|
+
├── package.md # Output shaper
|
|
84
|
+
└── verification.md # Output shaper
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Par défaut, `projectsDir` = `.ship`. Configurable via `cc-ship.json`.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Agents
|
|
92
|
+
|
|
93
|
+
| Agent | Rôle |
|
|
94
|
+
| --------------------- | ---------------------------------------------------------- |
|
|
95
|
+
| ship-brainstormer | Transforme une idée vague en brief structuré |
|
|
96
|
+
| ship-brainstormer-prd | Creuse le brief en PRD détaillé |
|
|
97
|
+
| ship-specifier | Définit les exigences fonctionnelles et non-fonctionnelles |
|
|
98
|
+
| ship-architect | Propose ou valide l'architecture technique |
|
|
99
|
+
| ship-splitter | Découpe en packages livrables |
|
|
100
|
+
| ship-shaper | Planifie un package en scopes |
|
|
101
|
+
| ship-executor | Implémente le scope courant |
|
|
102
|
+
| ship-verifier | Vérifie l'implémentation |
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Pour commencer
|
|
107
|
+
|
|
108
|
+
- `/ship:init mon-projet` pour initialiser un nouveau projet
|
|
109
|
+
- `/ship:next` pour démarrer ou reprendre le workflow
|
|
110
|
+
- `/ship:brainstorm` pour démarrer le brainstorming
|
|
111
|
+
- `/ship:status` pour voir où tu en es
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ship:init
|
|
3
|
+
description: "Initialise un nouveau projet ship"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Commande init
|
|
7
|
+
|
|
8
|
+
Initialise un nouveau projet ship avec son dossier dédié.
|
|
9
|
+
|
|
10
|
+
## Syntaxe
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/ship:init [nom-projet]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Instructions
|
|
17
|
+
|
|
18
|
+
### Étape 1 : Résoudre la configuration
|
|
19
|
+
|
|
20
|
+
1. Lire `cc-ship.json` à la racine du repo
|
|
21
|
+
2. **Si `cc-ship.json` n'existe pas** :
|
|
22
|
+
- Demander `projectsDir` via `AskUserQuestion` (proposer `.ship` par défaut)
|
|
23
|
+
- Créer `cc-ship.json` avec le `projectsDir` choisi et `currentProject: null`
|
|
24
|
+
|
|
25
|
+
3. **Si `cc-ship.json` existe** :
|
|
26
|
+
- Lire `projectsDir` depuis le fichier
|
|
27
|
+
|
|
28
|
+
### Étape 2 : Résoudre le nom du projet
|
|
29
|
+
|
|
30
|
+
1. **Si un nom est fourni en argument** (ex: `/ship:init mon-jeu`) → utiliser ce nom
|
|
31
|
+
2. **Si pas de nom** → demander le nom du projet via `AskUserQuestion`
|
|
32
|
+
|
|
33
|
+
Le nom du projet doit être un slug valide (lettres minuscules, chiffres, tirets). Si l'utilisateur donne un nom invalide, le slugifier automatiquement et confirmer.
|
|
34
|
+
|
|
35
|
+
### Étape 3 : Créer le projet
|
|
36
|
+
|
|
37
|
+
1. Créer le dossier `{projectsDir}/{nom-projet}/`
|
|
38
|
+
2. Mettre à jour `cc-ship.json` avec `currentProject: "{nom-projet}"`
|
|
39
|
+
3. Confirmer :
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Projet "{nom-projet}" initialisé dans {projectsDir}/{nom-projet}/.
|
|
43
|
+
Lance /ship:brainstorm pour commencer, ou /ship:next pour le workflow guidé.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Gestion des erreurs
|
|
47
|
+
|
|
48
|
+
### Projet déjà existant
|
|
49
|
+
|
|
50
|
+
Si le dossier `{projectsDir}/{nom-projet}/` existe déjà :
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Le projet "{nom-projet}" existe déjà dans {projectsDir}/{nom-projet}/.
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Options via `AskUserQuestion` :
|
|
57
|
+
1. **Reprendre ce projet** - Setter `currentProject` et continuer
|
|
58
|
+
2. **Choisir un autre nom** - Demander un nouveau nom
|
|
59
|
+
3. **Annuler** - Ne rien faire
|
|
60
|
+
|
|
61
|
+
## Exemples
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
/ship:init mon-jeu
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Crée `.ship/mon-jeu/` et configure `cc-ship.json`.
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
/ship:init
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Demande le nom du projet puis le crée.
|
package/commands/ship/next.md
CHANGED
|
@@ -9,18 +9,33 @@ Orchestre le workflow ship complet avec validation humaine entre chaque étape.
|
|
|
9
9
|
|
|
10
10
|
## Instructions
|
|
11
11
|
|
|
12
|
+
### Étape 0 : Résolution du projet (PREMIÈRE ÉTAPE)
|
|
13
|
+
|
|
14
|
+
1. Lire `cc-ship.json` à la racine du repo
|
|
15
|
+
- **Si n'existe pas** → demander `projectsDir` via `AskUserQuestion` (proposer `.ship` par défaut) → créer `cc-ship.json`
|
|
16
|
+
|
|
17
|
+
2. Résoudre le projet :
|
|
18
|
+
- **Si argument fourni** (ex: `/ship:next mon-jeu`) → setter `currentProject` dans `cc-ship.json`, continuer
|
|
19
|
+
- **Si pas d'argument ET `currentProject` existe** → l'utiliser SILENCIEUSEMENT (pas de confirmation)
|
|
20
|
+
- **Si pas d'argument ET `currentProject` est null** → scanner `projectsDir`, lister les projets disponibles, demander lequel via `AskUserQuestion`. Si aucun projet → proposer `/ship:init`
|
|
21
|
+
|
|
22
|
+
3. Le chemin projet résolu = `{projectsDir}/{currentProject}/`
|
|
23
|
+
**Utiliser CE chemin partout à la place de `.ship/`**
|
|
24
|
+
|
|
12
25
|
### Étape 1 : Détecter l'état actuel
|
|
13
26
|
|
|
14
27
|
Utilise le même algorithme que `/ship:status` pour détecter l'état du projet.
|
|
15
28
|
|
|
16
29
|
#### Fichiers à vérifier (dans l'ordre)
|
|
17
30
|
|
|
18
|
-
1.
|
|
19
|
-
2.
|
|
20
|
-
3.
|
|
21
|
-
4.
|
|
22
|
-
5.
|
|
23
|
-
6.
|
|
31
|
+
1. `{projectPath}/` - Dossier projet
|
|
32
|
+
2. `{projectPath}/brief.md` - Brief (output brainstorm)
|
|
33
|
+
3. `{projectPath}/prd.md` - PRD (output prd)
|
|
34
|
+
4. `{projectPath}/requirements.md` - Spécifications (output specify)
|
|
35
|
+
5. `{projectPath}/architecture.md` - Architecture (output architect)
|
|
36
|
+
6. `{projectPath}/packages/mapping.md` - Mapping (output split)
|
|
37
|
+
|
|
38
|
+
Où `{projectPath}` = `{projectsDir}/{currentProject}`
|
|
24
39
|
|
|
25
40
|
#### Pour les packages
|
|
26
41
|
|
|
@@ -37,15 +52,15 @@ current_scope: <nom-du-scope>
|
|
|
37
52
|
|
|
38
53
|
```
|
|
39
54
|
function getNextStep(state):
|
|
40
|
-
if not exists(
|
|
55
|
+
if not exists({projectPath}/brief.md):
|
|
41
56
|
return 'brainstorm'
|
|
42
|
-
if not exists(
|
|
57
|
+
if not exists({projectPath}/prd.md):
|
|
43
58
|
return 'prd'
|
|
44
|
-
if not exists(
|
|
59
|
+
if not exists({projectPath}/requirements.md):
|
|
45
60
|
return 'specify'
|
|
46
|
-
if not exists(
|
|
61
|
+
if not exists({projectPath}/architecture.md):
|
|
47
62
|
return 'architect'
|
|
48
|
-
if not exists(
|
|
63
|
+
if not exists({projectPath}/packages/mapping.md):
|
|
49
64
|
return 'split'
|
|
50
65
|
|
|
51
66
|
# Phase packages : boucle shape → execute → verify
|
|
@@ -96,7 +111,12 @@ Reposer la question de continuation.
|
|
|
96
111
|
|
|
97
112
|
### Étape 4 : Exécuter l'étape
|
|
98
113
|
|
|
99
|
-
Lance l'agent approprié via le tool `Task
|
|
114
|
+
Lance l'agent approprié via le tool `Task`.
|
|
115
|
+
|
|
116
|
+
**IMPORTANT** : Quand tu lances un agent, fournis-lui le chemin du projet résolu dans le prompt. Exemple :
|
|
117
|
+
```
|
|
118
|
+
"Le chemin du projet est {projectPath}. Transforme le brief en PRD."
|
|
119
|
+
```
|
|
100
120
|
|
|
101
121
|
| Étape | Agent | Output |
|
|
102
122
|
|-------|-------|--------|
|
|
@@ -183,7 +203,7 @@ Lequel voulez-vous traiter en premier?
|
|
|
183
203
|
|
|
184
204
|
### Reprise après interruption
|
|
185
205
|
|
|
186
|
-
Les fichiers
|
|
206
|
+
Les fichiers du projet persistent. Au relancement:
|
|
187
207
|
1. Détecter l'état via les fichiers et front-matter
|
|
188
208
|
2. Proposer de reprendre depuis l'étape en cours
|
|
189
209
|
3. L'utilisateur peut choisir de recommencer une étape
|
|
@@ -208,6 +228,7 @@ Le projet ship est complet. Bravo!
|
|
|
208
228
|
Utilisateur: /ship:next
|
|
209
229
|
|
|
210
230
|
Next: "Je détecte:
|
|
231
|
+
- Projet actif: mon-jeu (.ship/mon-jeu/)
|
|
211
232
|
- brief.md existe (brainstorm fait)
|
|
212
233
|
- prd.md existe (prd fait)
|
|
213
234
|
- requirements.md n'existe pas
|
|
@@ -217,7 +238,7 @@ Continuer?"
|
|
|
217
238
|
|
|
218
239
|
Utilisateur: "Oui"
|
|
219
240
|
|
|
220
|
-
Next: [Lance ship-specifier via Task]
|
|
241
|
+
Next: [Lance ship-specifier via Task avec le chemin du projet]
|
|
221
242
|
...
|
|
222
243
|
"Specify terminé. requirements.md créé.
|
|
223
244
|
|
package/commands/ship/prd.md
CHANGED
|
@@ -9,19 +9,28 @@ Transforme un brief existant en Product Requirements Document (PRD) structuré.
|
|
|
9
9
|
|
|
10
10
|
## Instructions
|
|
11
11
|
|
|
12
|
+
### Résolution du projet (PREMIÈRE ÉTAPE)
|
|
13
|
+
|
|
14
|
+
1. Lire `cc-ship.json` à la racine du repo
|
|
15
|
+
2. Résoudre le chemin : `{projectsDir}/{currentProject}/`
|
|
16
|
+
3. Si `cc-ship.json` n'existe pas OU `currentProject` est null → ERREUR : "Lance `/ship:init` ou `/ship:next` d'abord pour initialiser un projet."
|
|
17
|
+
4. Utiliser ce chemin partout au lieu de `.ship/`
|
|
18
|
+
|
|
19
|
+
### Lancement de l'agent
|
|
20
|
+
|
|
12
21
|
Tu dois lancer l'agent `ship-brainstormer-prd` en utilisant le tool Task avec les paramètres suivants:
|
|
13
22
|
|
|
14
23
|
```
|
|
15
24
|
subagent_type: ship-brainstormer-prd
|
|
16
|
-
prompt: [Le contexte de l'utilisateur ou
|
|
25
|
+
prompt: "Le chemin du projet est {projectPath}. [Le contexte de l'utilisateur ou 'Transforme le brief en PRD']"
|
|
17
26
|
```
|
|
18
27
|
|
|
19
28
|
## ⚠️ Prérequis
|
|
20
29
|
|
|
21
|
-
Un brief doit exister dans
|
|
30
|
+
Un brief doit exister dans `{projectPath}/brief.md`.
|
|
22
31
|
|
|
23
32
|
**Si aucun brief n'existe** :
|
|
24
|
-
> "Je ne trouve pas de brief dans
|
|
33
|
+
> "Je ne trouve pas de brief dans `{projectPath}/brief.md`. Lance d'abord `/ship:brainstorm` pour créer un brief, puis reviens ici."
|
|
25
34
|
|
|
26
35
|
## ⚠️ Comportement de relais (IMPORTANT)
|
|
27
36
|
|
|
@@ -45,12 +54,12 @@ Quand l'agent te retourne une question pour l'utilisateur :
|
|
|
45
54
|
|
|
46
55
|
## Comportement attendu
|
|
47
56
|
|
|
48
|
-
1. Vérifier que
|
|
57
|
+
1. Vérifier que `{projectPath}/brief.md` existe
|
|
49
58
|
2. L'agent va:
|
|
50
59
|
- Lire le brief et la research (si présente)
|
|
51
60
|
- Poser des questions pour clarifier les features
|
|
52
61
|
- Creuser chaque fonctionnalité identifiée
|
|
53
|
-
- Produire un PRD structuré dans
|
|
62
|
+
- Produire un PRD structuré dans `{projectPath}/prd.md`
|
|
54
63
|
|
|
55
64
|
## Exemple d'utilisation
|
|
56
65
|
|
|
@@ -60,8 +69,8 @@ Quand l'agent te retourne une question pour l'utilisateur :
|
|
|
60
69
|
|
|
61
70
|
## Output
|
|
62
71
|
|
|
63
|
-
**Fichier généré** :
|
|
64
|
-
-
|
|
72
|
+
**Fichier généré** (dans le dossier projet) :
|
|
73
|
+
- `prd.md` : Le PRD structuré
|
|
65
74
|
|
|
66
75
|
**Structure du PRD** :
|
|
67
76
|
- Vue d'ensemble (problème, solution, objectifs, personas)
|