@goodtek/vibeops 0.7.22 → 1.1.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.
Files changed (144) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +51 -380
  3. package/dist/bootstrap/installer.js +42 -20
  4. package/dist/bootstrap/manifest.js +23 -3
  5. package/dist/cli.js +69 -154
  6. package/dist/commands/init.js +279 -114
  7. package/dist/commands/llm.js +177 -0
  8. package/dist/commands/status.js +181 -8
  9. package/dist/commands/task-add.js +89 -162
  10. package/dist/commands/task-done.js +112 -73
  11. package/dist/lib/config.js +77 -113
  12. package/dist/lib/env.js +32 -0
  13. package/dist/lib/git-config.js +21 -0
  14. package/dist/lib/git-host.js +12 -0
  15. package/dist/lib/git-policy.js +67 -0
  16. package/dist/lib/git-remote.js +108 -0
  17. package/dist/lib/git.js +44 -1
  18. package/dist/lib/init-clients.js +55 -0
  19. package/dist/lib/llm-complete.js +18 -19
  20. package/dist/lib/llm-connect.js +150 -0
  21. package/dist/lib/llm-preference.js +102 -0
  22. package/dist/lib/llm-status.js +19 -0
  23. package/dist/lib/paths.js +7 -3
  24. package/dist/lib/plan-llm-openai.js +0 -63
  25. package/dist/lib/pr-create.js +66 -0
  26. package/dist/lib/resolve-task.js +34 -0
  27. package/dist/lib/task-add-llm.js +53 -233
  28. package/dist/lib/task-context.js +68 -0
  29. package/dist/lib/task-done-llm.js +155 -0
  30. package/dist/lib/task-pr-llm.js +50 -0
  31. package/dist/lib/task-push-pr.js +131 -0
  32. package/dist/lib/task-scaffold.js +39 -43
  33. package/dist/lib/task-start.js +100 -0
  34. package/dist/lib/task-summary.js +12 -239
  35. package/dist/lib/task.js +30 -24
  36. package/dist/types/config.js +0 -16
  37. package/package.json +14 -14
  38. package/templates/.cursor/rules/02-git-safety.mdc +12 -0
  39. package/templates/AGENTS.md +27 -87
  40. package/templates/clients/claude/CLAUDE.md +28 -0
  41. package/templates/clients/cursor/.cursor/rules/01-task-source-of-truth.mdc +12 -0
  42. package/templates/clients/cursor/.cursor/rules/02-git-safety.mdc +11 -0
  43. package/templates/clients/cursor/.cursor/rules/03-docs-on-done.mdc +13 -0
  44. package/templates/core/AGENTS.md +44 -0
  45. package/templates/core/docs/logs/README.md +7 -0
  46. package/templates/core/docs/project/03-architecture.md +15 -0
  47. package/templates/core/docs/project/05-current-state.md +15 -0
  48. package/templates/core/docs/project/06-decisions.md +9 -0
  49. package/templates/core/docs/tasks/TASK-000-template.md +37 -0
  50. package/templates/skills-shared/implement-task/SKILL.md +22 -0
  51. package/templates/skills-shared/plan-task/SKILL.md +19 -0
  52. package/dist/agent/loader.js +0 -71
  53. package/dist/agent/prompt.js +0 -66
  54. package/dist/commands/agent-list.js +0 -32
  55. package/dist/commands/agent-prompt.js +0 -59
  56. package/dist/commands/agent-show.js +0 -26
  57. package/dist/commands/done.js +0 -160
  58. package/dist/commands/github-init.js +0 -554
  59. package/dist/commands/github-status.js +0 -164
  60. package/dist/commands/next.js +0 -283
  61. package/dist/commands/notion-init.js +0 -764
  62. package/dist/commands/notion-sync.js +0 -405
  63. package/dist/commands/notion-test.js +0 -595
  64. package/dist/commands/plan.js +0 -146
  65. package/dist/commands/rollback.js +0 -126
  66. package/dist/commands/start.js +0 -129
  67. package/dist/commands/task-check.js +0 -155
  68. package/dist/commands/task-generate.js +0 -206
  69. package/dist/commands/task-pull.js +0 -277
  70. package/dist/commands/task-rollback.js +0 -174
  71. package/dist/commands/task-start.js +0 -102
  72. package/dist/commands/task-status.js +0 -122
  73. package/dist/lib/brief.js +0 -356
  74. package/dist/lib/cursor-task-prompt.js +0 -60
  75. package/dist/lib/done-follow-up.js +0 -308
  76. package/dist/lib/github-cli.js +0 -247
  77. package/dist/lib/guide-state.js +0 -69
  78. package/dist/lib/mvp-artifacts.js +0 -204
  79. package/dist/lib/mvp-constants.js +0 -15
  80. package/dist/lib/mvp-diff-summary.js +0 -43
  81. package/dist/lib/mvp-done-summary.js +0 -335
  82. package/dist/lib/notion-client.js +0 -459
  83. package/dist/lib/notion-discovery.js +0 -671
  84. package/dist/lib/notion-env.js +0 -140
  85. package/dist/lib/notion-mappers.js +0 -148
  86. package/dist/lib/notion-schema.js +0 -272
  87. package/dist/lib/notion-sync.js +0 -337
  88. package/dist/lib/notion-target.js +0 -247
  89. package/dist/lib/package-json.js +0 -133
  90. package/dist/lib/plan-apply-planner.js +0 -131
  91. package/dist/lib/plan-codex-pkce.js +0 -234
  92. package/dist/lib/plan-llm-models.js +0 -237
  93. package/dist/lib/plan-llm-normalize.js +0 -146
  94. package/dist/lib/plan-llm-session.js +0 -682
  95. package/dist/lib/plan-post-apply-setup.js +0 -116
  96. package/dist/lib/project-docs.js +0 -95
  97. package/dist/lib/prompt-builder.js +0 -135
  98. package/dist/lib/resolve-command-task.js +0 -40
  99. package/dist/lib/task-add-build-prompt.js +0 -39
  100. package/dist/lib/task-add-cursor.js +0 -81
  101. package/dist/lib/task-generator.js +0 -183
  102. package/dist/lib/task-merge.js +0 -220
  103. package/dist/lib/task-prompt.js +0 -23
  104. package/dist/lib/task-pull.js +0 -354
  105. package/dist/lib/task-status-brief.js +0 -132
  106. package/dist/lib/workflow-guide.js +0 -485
  107. package/dist/status/collector.js +0 -103
  108. package/dist/status/format.js +0 -181
  109. package/dist/types/brief.js +0 -126
  110. package/templates/.cursor/rules/00-project-governance.mdc +0 -28
  111. package/templates/.cursor/rules/01-agent-orchestration.mdc +0 -48
  112. package/templates/.cursor/rules/02-task-workflow.mdc +0 -38
  113. package/templates/.cursor/rules/03-git-safety.mdc +0 -30
  114. package/templates/.cursor/rules/04-docs-update.mdc +0 -22
  115. package/templates/.vibeops/agents/architect.md +0 -47
  116. package/templates/.vibeops/agents/builder.md +0 -38
  117. package/templates/.vibeops/agents/docs.md +0 -54
  118. package/templates/.vibeops/agents/orchestrator.md +0 -40
  119. package/templates/.vibeops/agents/planner.md +0 -60
  120. package/templates/.vibeops/agents/recovery.md +0 -49
  121. package/templates/.vibeops/agents/reviewer.md +0 -47
  122. package/templates/.vibeops/agents/tester.md +0 -43
  123. package/templates/.vibeops/prompts/create-plan.md +0 -33
  124. package/templates/.vibeops/prompts/generate-tasks.md +0 -41
  125. package/templates/.vibeops/prompts/implement-task.md +0 -39
  126. package/templates/.vibeops/prompts/review-task.md +0 -34
  127. package/templates/.vibeops/prompts/rollback.md +0 -32
  128. package/templates/.vibeops/prompts/start-project.md +0 -39
  129. package/templates/.vibeops/workflows/notion-sync.md +0 -53
  130. package/templates/.vibeops/workflows/project-start.md +0 -73
  131. package/templates/.vibeops/workflows/rollback.md +0 -45
  132. package/templates/.vibeops/workflows/task-lifecycle.md +0 -71
  133. package/templates/docs/logs/README.md +0 -38
  134. package/templates/docs/project/00-overview.md +0 -27
  135. package/templates/docs/project/01-requirements.md +0 -30
  136. package/templates/docs/project/02-mvp-scope.md +0 -36
  137. package/templates/docs/project/03-architecture.md +0 -34
  138. package/templates/docs/project/04-tech-stack.md +0 -29
  139. package/templates/docs/project/05-current-state.md +0 -35
  140. package/templates/docs/project/06-decisions.md +0 -20
  141. package/templates/docs/project/07-backlog.md +0 -23
  142. package/templates/docs/project/08-env.md +0 -29
  143. package/templates/docs/project/09-deployment.md +0 -28
  144. package/templates/docs/tasks/TASK-000-template.md +0 -72
package/dist/cli.js CHANGED
@@ -1,116 +1,65 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from "commander";
3
- import { doneCommand } from "./commands/done.js";
4
- import { githubInitCommand } from "./commands/github-init.js";
5
- import { githubStatusCommand } from "./commands/github-status.js";
6
3
  import { initCommand } from "./commands/init.js";
7
- import { nextCommand } from "./commands/next.js";
8
- import { notionInitCommand } from "./commands/notion-init.js";
9
- import { notionSyncCommand } from "./commands/notion-sync.js";
10
- import { notionTestCommand } from "./commands/notion-test.js";
11
- import { planCommand } from "./commands/plan.js";
12
- import { rollbackCommand } from "./commands/rollback.js";
13
- import { startCommand } from "./commands/start.js";
4
+ import { llmConnectCommand, llmStatusCommand, llmUseCommand } from "./commands/llm.js";
14
5
  import { statusCommand } from "./commands/status.js";
15
6
  import { taskAddCommand } from "./commands/task-add.js";
16
- import { taskStatusCommand } from "./commands/task-status.js";
7
+ import { taskDoneCommand } from "./commands/task-done.js";
8
+ import { loadVibeopsEnv } from "./lib/env.js";
17
9
  import { VERSION } from "./version.js";
18
10
  const program = new Command();
19
11
  program
20
12
  .name("vibeops")
21
- .description("VibeOps — plan an MVP, build in Cursor (drag mvp-build.md), finish with Git rails.\n" +
22
- " Commands: init · plan · start · done · next · status · task add · task status (+ optional notion · github · rollback)")
13
+ .description("VibeOps v3 — Cursor-friendly TASK workflow (init · task · status · llm)")
23
14
  .version(VERSION, "-v, --version", "Print the VibeOps version");
15
+ program.hook("preAction", async (_thisCommand, actionCommand) => {
16
+ const opts = actionCommand.opts();
17
+ const cwd = typeof opts.cwd === "string" ? opts.cwd : process.cwd();
18
+ await loadVibeopsEnv(cwd);
19
+ });
24
20
  program
25
21
  .command("init")
26
- .description("Install the VibeOps workflow into the current directory")
27
- .option("--dry-run", "Show what would be created without writing files")
28
- .option("--force", "Overwrite existing files")
22
+ .description("Install core + agent client packs (cursor, claude, codex)")
23
+ .option("--dry-run", "Show what would be created")
24
+ .option("--force", "Overwrite existing template files (also implied when re-initializing with --yes)")
25
+ .option("--yes", "Re-init an existing project without prompting")
29
26
  .option("--cwd <path>", "Target directory")
30
27
  .option("--name <projectName>", "Project name in .vibeops.json")
31
- .option("--git", "Initialize Git without prompting")
32
- .option("--no-git", "Skip Git")
28
+ .option("--clients <list>", "Agent packs: comma-separated cursor, claude, codex (required in non-interactive mode)")
29
+ .option("--git", "Initialize Git (always on; flag kept for scripts)")
33
30
  .option("--initial-commit", "Create initial commit")
34
31
  .option("--no-initial-commit", "Skip initial commit")
35
- .option("--default-branch <name>", "Default branch (default main)")
36
32
  .option("--commit-message <message>", "Initial commit message")
33
+ .option("--git-policy <preset>", "Branch policy: gitflow (develop+main) or trunk (main only)")
34
+ .option("--integration-branch <name>", "Integration branch (with --production-branch)")
35
+ .option("--production-branch <name>", "Production branch")
36
+ .option("--git-host <host>", "github or gitlab (default: detect from remote)")
37
+ .option("--allow-no-remote", "Smoke/CI: skip origin requirement")
37
38
  .action(async (opts) => {
38
- await initCommand(opts);
39
- });
40
- program
41
- .command("plan")
42
- .description("LLM planning → brief + TASK-mvp + .vibeops/generated/mvp-build.md")
43
- .option("--idea <text>", "One-line idea (optional Name: idea prefix)")
44
- .option("--from <path>", "Regenerate MVP artifacts from an existing brief")
45
- .option("--non-interactive", "Placeholders only (CI); no LLM")
46
- .option("--provider <id>", "openai | codex-oauth | cursor-agent")
47
- .option("--model <id>", "LLM model id")
48
- .option("--cwd <path>", "Target directory")
49
- .action(async (opts) => {
50
- const provider = opts.provider === "openai" ||
51
- opts.provider === "codex-oauth" ||
52
- opts.provider === "cursor-agent"
53
- ? opts.provider
54
- : undefined;
55
- await planCommand({
56
- idea: opts.idea,
57
- from: opts.from,
58
- nonInteractive: opts.nonInteractive,
59
- provider,
60
- llmModel: opts.model,
39
+ await initCommand({
40
+ dryRun: Boolean(opts.dryRun),
41
+ force: Boolean(opts.force),
42
+ yes: Boolean(opts.yes),
61
43
  cwd: opts.cwd,
44
+ name: opts.name,
45
+ clients: opts.clients,
46
+ git: opts.git,
47
+ initialCommit: opts.initialCommit,
48
+ commitMessage: opts.commitMessage,
49
+ allowNoRemote: Boolean(opts.allowNoRemote),
50
+ gitPolicy: opts.gitPolicy,
51
+ integrationBranch: opts.integrationBranch,
52
+ productionBranch: opts.productionBranch,
53
+ gitHost: opts.gitHost,
62
54
  });
63
55
  });
64
- program
65
- .command("start [taskRef]")
66
- .description("Create task branch (default: TASK-mvp, or active backlog TASK if no MVP file)")
67
- .option("--dry-run", "Show plan only")
68
- .option("--allow-dirty", "Allow dirty working tree")
69
- .option("--cwd <path>", "Target directory")
70
- .action(async (taskRef, opts) => {
71
- await startCommand(taskRef, opts);
72
- });
73
- program
74
- .command("done [taskRef]")
75
- .description("Finish TASK: auto-fill Result/Test Result + summary md, merge to main, Notion sync (default: TASK-mvp or active backlog)")
76
- .option("--dry-run", "Show plan only")
77
- .option("--no-merge", "Skip push / merge / branch delete")
78
- .option("--skip-summary", "Skip last-done-summary.md and TASK auto-fill")
79
- .option("--refresh-task-sections", "Overwrite existing Result / Test Result")
80
- .option("--merge-via-pr", "Merge via gh PR")
81
- .option("--allow-dirty", "Allow dirty tree during merge")
82
- .option("--no-notion-sync", "Skip automatic Notion sync after done")
83
- .option("--cwd <path>", "Target directory")
84
- .action(async (taskRef, opts) => {
85
- await doneCommand(taskRef, opts);
86
- });
87
- program
88
- .command("next")
89
- .description("Interactive guide for the MVP workflow (↑/↓ · Yes/No)")
90
- .option("--dry-run", "On runnable steps, print only")
91
- .option("--non-interactive", "Print panel once")
92
- .option("--execute", "With --non-interactive, run the runnable step once")
93
- .option("--merge-via-pr", "On finish: merge via GitHub PR")
94
- .option("--allow-dirty", "Allow dirty tree on merge")
95
- .option("--cwd <path>", "Target directory")
96
- .action(async (opts) => {
97
- await nextCommand(opts);
98
- });
99
- program
100
- .command("status")
101
- .description("Installation, TASK-mvp state, Git, Notion, GitHub")
102
- .option("--json", "JSON output")
103
- .option("--cwd <path>", "Target directory")
104
- .action(async (opts) => {
105
- await statusCommand(opts);
106
- });
107
- const task = program.command("task").description("Backlog TASK files");
56
+ const task = program.command("task").description("TASK lifecycle");
108
57
  task
109
58
  .command("add")
110
- .description("Interactive: close open TASK (optional), create next TASK-NNN, branch checkout, In Progress")
111
- .option("--dry-run", "Show plan only (no writes, no LLM planning session)")
112
- .option("--non-interactive", "CI: minimal scaffold without prompts (optional --idea)")
113
- .option("--idea <text>", "Short description (CI / smoke only)")
59
+ .description("Create next TASK-NNN, task branch, In Progress (guide-only if one is open)")
60
+ .option("--dry-run", "Plan only")
61
+ .option("--non-interactive", "CI: minimal scaffold (optional --idea)")
62
+ .option("--idea <text>", "Short description (CI)")
114
63
  .option("--cwd <path>", "Target directory")
115
64
  .action(async (opts) => {
116
65
  await taskAddCommand({
@@ -121,88 +70,54 @@ task
121
70
  });
122
71
  });
123
72
  task
124
- .command("status")
125
- .description("Briefing on current TASK progress and recommended next step")
126
- .option("--json", "JSON output")
73
+ .command("done [taskRef]")
74
+ .description("Close TASK: LLM summary, push branch, open MR/PR (no local merge)")
75
+ .option("--dry-run", "Plan only")
76
+ .option("--no-pr", "Push only; skip creating MR/PR")
127
77
  .option("--cwd <path>", "Target directory")
128
- .action(async (opts) => {
129
- await taskStatusCommand({
130
- json: Boolean(opts.json),
78
+ .action(async (taskRef, opts) => {
79
+ await taskDoneCommand(taskRef, {
80
+ dryRun: Boolean(opts.dryRun),
81
+ noPr: Boolean(opts.noPr),
131
82
  cwd: opts.cwd,
132
83
  });
133
84
  });
134
85
  program
135
- .command("rollback [taskRef]")
136
- .description("Advisory rollback for TASK-mvp (--confirm / --confirm-destructive to execute)")
137
- .option("--confirm", "Run non-destructive rollback")
138
- .option("--confirm-destructive", "Allow destructive rollback (reset --hard)")
139
- .option("--strategy <name>", "branch-delete | reset-base | revert-merge")
140
- .option("--keep-branch", "Keep task branch when deleting")
141
- .option("--dry-run", "Print plan only")
142
- .option("--cwd <path>", "Target directory")
143
- .action(async (taskRef, opts) => {
144
- await rollbackCommand(taskRef, opts);
145
- });
146
- const notion = program.command("notion").description("Optional Notion dashboard sync");
147
- notion
148
- .command("init")
149
- .description("Configure Notion in .vibeops.json and .vibeops.env")
150
- .option("--dry-run", "Plan only")
151
- .option("--enable", "Enable Notion")
152
- .option("--projects-db <id>", "Projects database id")
153
- .option("--tasks-db <id>", "Tasks database id")
154
- .option("--non-interactive", "No prompts")
155
- .option("--cwd <path>", "Target directory")
156
- .action(async (opts) => {
157
- await notionInitCommand(opts);
158
- });
159
- notion
160
- .command("test")
161
- .description("Verify Notion token and database schema")
86
+ .command("status")
87
+ .description("Briefing: active TASK, Git, LLM, next hint")
162
88
  .option("--json", "JSON output")
163
- .option("--debug-shape", "Print API shape diagnostics")
164
89
  .option("--cwd <path>", "Target directory")
165
90
  .action(async (opts) => {
166
- await notionTestCommand(opts);
91
+ await statusCommand({
92
+ json: Boolean(opts.json),
93
+ cwd: opts.cwd,
94
+ });
167
95
  });
168
- notion
169
- .command("sync")
170
- .description("Push docs/project + TASK metadata to Notion")
171
- .option("--dry-run", "Query only")
172
- .option("--json", "JSON output")
173
- .option("--only-tasks", "Tasks DB only")
174
- .option("--only-project", "Project DB only")
96
+ const llm = program.command("llm").description("LLM providers for task add / task done");
97
+ llm
98
+ .command("connect")
99
+ .description("Interactive menu: connect providers and choose default")
175
100
  .option("--cwd <path>", "Target directory")
176
101
  .action(async (opts) => {
177
- await notionSyncCommand(opts);
102
+ await llmConnectCommand({ cwd: opts.cwd });
178
103
  });
179
- const github = program.command("github").description("Optional GitHub remote setup");
180
- github
104
+ llm
181
105
  .command("status")
182
- .description("gh auth, remotes, .vibeops.json github section")
106
+ .description("Show connected providers and project preference")
183
107
  .option("--json", "JSON output")
184
108
  .option("--cwd <path>", "Target directory")
185
109
  .action(async (opts) => {
186
- await githubStatusCommand(opts);
110
+ await llmStatusCommand({
111
+ json: Boolean(opts.json),
112
+ cwd: opts.cwd,
113
+ });
187
114
  });
188
- github
189
- .command("init")
190
- .description("Connect or create a GitHub repo and update config")
191
- .option("--dry-run", "Plan only")
192
- .option("--yes", "Non-interactive defaults")
193
- .option("--owner <owner>", "GitHub owner")
194
- .option("--repo <repo>", "Repo name")
195
- .option("--public", "Public repo")
196
- .option("--private", "Private repo")
197
- .option("--remote <name>", "Remote name (default origin)")
198
- .option("--connect <ownerOrUrl>", "Existing repo")
199
- .option("--no-package-update", "Skip package.json repo fields")
115
+ llm
116
+ .command("use [provider]")
117
+ .description("Set default provider: auto | codex-oauth | cursor-agent | openai")
200
118
  .option("--cwd <path>", "Target directory")
201
- .action(async (opts) => {
202
- await githubInitCommand({
203
- ...opts,
204
- noPackageUpdate: opts.packageUpdate === false,
205
- });
119
+ .action(async (provider, opts) => {
120
+ await llmUseCommand(provider, { cwd: opts.cwd });
206
121
  });
207
122
  program.parseAsync(process.argv).catch((err) => {
208
123
  console.error("[vibeops] error:", err);