Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/__tests__/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function makeBaseConfig(
claudeCode: false,
speckit: false,
workflowMode: "none",
gitStrategy: "pr-required",
speckitPreset: null,
gitInit: false,
...overrides,
Expand Down
1 change: 1 addition & 0 deletions src/commands/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ Exemples:
claudeCode: false,
speckit: false,
workflowMode: "none",
gitStrategy: "pr-required",
speckitPreset: null,
gitInit: false,
};
Expand Down
6 changes: 5 additions & 1 deletion src/generators/claude-code/__tests__/claude-code.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,11 @@ describe("ClaudeCodeGenerator", () => {
});

it("vibe mode → settings.json git.strategy=no-pr and CLAUDE.md uses commit skill", async () => {
const config = { ...baseConfig, workflowMode: "vibe" as const };
const config = {
...baseConfig,
workflowMode: "vibe" as const,
gitStrategy: "no-pr" as const,
};
await generateClaudeCode(tmpDir, config, baseVersions);
const settings = await fs.readJson(
path.join(tmpDir, ".claude", "settings.json"),
Expand Down
5 changes: 2 additions & 3 deletions src/generators/claude-code/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,8 @@ class ClaudeCodeGenerator extends BaseGenerator {
claudeDir: ".claude",
workflowSpeckit: this.config.workflowMode === "speckit",
workflowVibe: this.config.workflowMode === "vibe",
gitStrategy:
this.config.workflowMode === "vibe" ? "no-pr" : "pr-required",
gitStrategyNoPr: this.config.workflowMode === "vibe",
gitStrategy: this.config.gitStrategy,
gitStrategyNoPr: this.config.gitStrategy === "no-pr",
hasParentSessionStart: parentHooks.has("SessionStart"),
hasParentPreCompact: parentHooks.has("PreCompact"),
...this.resolveSpeckitData(),
Expand Down
20 changes: 20 additions & 0 deletions src/prompts/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type {
BackendType,
FrontendType,
WorkflowMode,
GitStrategy,
SpeckitPreset,
} from "../types.js";

Expand Down Expand Up @@ -347,6 +348,24 @@ export async function promptProjectConfig(
});
}

let gitStrategy: GitStrategy = defaults.gitStrategy ?? "pr-required";
if (workflowMode === "vibe" && defaults.gitStrategy === undefined) {
gitStrategy = await select<GitStrategy>({
message: "Stratégie git",
choices: [
{
name: "PR obligatoire (plus sûr)",
value: "pr-required",
},
{
name: "Push direct sur master (plus rapide)",
value: "no-pr",
},
],
default: "pr-required",
});
}

return {
name,
groupId,
Expand All @@ -364,6 +383,7 @@ export async function promptProjectConfig(
docker,
speckit,
workflowMode,
gitStrategy,
speckitPreset,
ci,
claudeCode,
Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export type UIFramework = "primeng" | "tailwind" | "none";
export type PrimeNGPreset = "Aura" | "Lara" | "Nora";
export type WorkflowMode = "speckit" | "vibe" | "none";
export type GitStrategy = "pr-required" | "no-pr";
export type SpeckitPreset = "rigorous" | "balanced" | "fast" | "bare-metal";
export type BackendType =
| "spring-boot"
Expand Down Expand Up @@ -36,6 +37,7 @@ export interface ProjectConfig {
claudeCode: boolean;
speckit: boolean;
workflowMode: WorkflowMode;
gitStrategy: GitStrategy;
speckitPreset: SpeckitPreset | null;
gitInit: boolean;
}
Expand Down
1 change: 1 addition & 0 deletions src/utils/detect-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ function defaultConfig(projectDir: string): ProjectConfig {
claudeCode: false,
speckit: false,
workflowMode: "none",
gitStrategy: "pr-required",
speckitPreset: null,
gitInit: false,
};
Expand Down
Loading