@goodtek/vibeops 0.4.0 → 1.0.0

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 (106) hide show
  1. package/CHANGELOG.md +198 -1
  2. package/README.md +62 -402
  3. package/dist/bootstrap/installer.js +4 -16
  4. package/dist/cli.js +52 -244
  5. package/dist/commands/init.js +3 -3
  6. package/dist/commands/status.js +145 -8
  7. package/dist/commands/task-add.js +100 -0
  8. package/dist/commands/task-done.js +117 -74
  9. package/dist/lib/config.js +2 -118
  10. package/dist/lib/git.js +190 -8
  11. package/dist/lib/llm-complete.js +62 -0
  12. package/dist/lib/paths.js +7 -3
  13. package/dist/lib/plan-llm-openai.js +0 -63
  14. package/dist/lib/resolve-task.js +34 -0
  15. package/dist/lib/slug.js +11 -0
  16. package/dist/lib/task-add-llm.js +81 -0
  17. package/dist/lib/task-context.js +68 -0
  18. package/dist/lib/task-done-llm.js +148 -0
  19. package/dist/lib/task-merge.js +115 -0
  20. package/dist/lib/task-scaffold.js +70 -92
  21. package/dist/lib/task-start.js +72 -0
  22. package/dist/lib/task-summary.js +12 -239
  23. package/dist/lib/task.js +80 -37
  24. package/dist/types/config.js +0 -16
  25. package/package.json +3 -4
  26. package/templates/.cursor/rules/01-task-source-of-truth.mdc +12 -0
  27. package/templates/.cursor/rules/02-git-safety.mdc +11 -0
  28. package/templates/.cursor/rules/03-docs-on-done.mdc +13 -0
  29. package/templates/.cursor/skills/implement-task/SKILL.md +22 -0
  30. package/templates/.cursor/skills/plan-task/SKILL.md +19 -0
  31. package/templates/AGENTS.md +26 -87
  32. package/templates/docs/logs/README.md +4 -35
  33. package/templates/docs/project/03-architecture.md +10 -29
  34. package/templates/docs/project/05-current-state.md +7 -27
  35. package/templates/docs/project/06-decisions.md +6 -17
  36. package/templates/docs/tasks/TASK-000-template.md +9 -44
  37. package/dist/agent/loader.js +0 -71
  38. package/dist/agent/prompt.js +0 -66
  39. package/dist/commands/agent-list.js +0 -32
  40. package/dist/commands/agent-prompt.js +0 -59
  41. package/dist/commands/agent-show.js +0 -26
  42. package/dist/commands/github-init.js +0 -554
  43. package/dist/commands/github-status.js +0 -164
  44. package/dist/commands/notion-init.js +0 -764
  45. package/dist/commands/notion-sync.js +0 -405
  46. package/dist/commands/notion-test.js +0 -595
  47. package/dist/commands/plan.js +0 -343
  48. package/dist/commands/task-check.js +0 -155
  49. package/dist/commands/task-generate.js +0 -206
  50. package/dist/commands/task-pull.js +0 -277
  51. package/dist/commands/task-rollback.js +0 -174
  52. package/dist/commands/task-start.js +0 -102
  53. package/dist/lib/brief.js +0 -356
  54. package/dist/lib/github-cli.js +0 -247
  55. package/dist/lib/notion-client.js +0 -459
  56. package/dist/lib/notion-discovery.js +0 -671
  57. package/dist/lib/notion-env.js +0 -140
  58. package/dist/lib/notion-mappers.js +0 -148
  59. package/dist/lib/notion-schema.js +0 -272
  60. package/dist/lib/notion-sync.js +0 -337
  61. package/dist/lib/notion-target.js +0 -247
  62. package/dist/lib/package-json.js +0 -133
  63. package/dist/lib/plan-apply-planner.js +0 -131
  64. package/dist/lib/plan-codex-pkce.js +0 -234
  65. package/dist/lib/plan-llm-models.js +0 -237
  66. package/dist/lib/plan-llm-normalize.js +0 -146
  67. package/dist/lib/plan-llm-session.js +0 -682
  68. package/dist/lib/plan-post-apply-setup.js +0 -116
  69. package/dist/lib/project-docs.js +0 -95
  70. package/dist/lib/prompt-builder.js +0 -135
  71. package/dist/lib/task-generator.js +0 -183
  72. package/dist/lib/task-prompt.js +0 -23
  73. package/dist/lib/task-pull.js +0 -354
  74. package/dist/status/collector.js +0 -103
  75. package/dist/status/format.js +0 -177
  76. package/dist/types/brief.js +0 -126
  77. package/templates/.cursor/rules/00-project-governance.mdc +0 -28
  78. package/templates/.cursor/rules/01-agent-orchestration.mdc +0 -48
  79. package/templates/.cursor/rules/02-task-workflow.mdc +0 -38
  80. package/templates/.cursor/rules/03-git-safety.mdc +0 -30
  81. package/templates/.cursor/rules/04-docs-update.mdc +0 -22
  82. package/templates/.vibeops/agents/architect.md +0 -47
  83. package/templates/.vibeops/agents/builder.md +0 -38
  84. package/templates/.vibeops/agents/docs.md +0 -54
  85. package/templates/.vibeops/agents/orchestrator.md +0 -40
  86. package/templates/.vibeops/agents/planner.md +0 -60
  87. package/templates/.vibeops/agents/recovery.md +0 -49
  88. package/templates/.vibeops/agents/reviewer.md +0 -47
  89. package/templates/.vibeops/agents/tester.md +0 -43
  90. package/templates/.vibeops/prompts/create-plan.md +0 -33
  91. package/templates/.vibeops/prompts/generate-tasks.md +0 -41
  92. package/templates/.vibeops/prompts/implement-task.md +0 -39
  93. package/templates/.vibeops/prompts/review-task.md +0 -34
  94. package/templates/.vibeops/prompts/rollback.md +0 -32
  95. package/templates/.vibeops/prompts/start-project.md +0 -39
  96. package/templates/.vibeops/workflows/notion-sync.md +0 -53
  97. package/templates/.vibeops/workflows/project-start.md +0 -73
  98. package/templates/.vibeops/workflows/rollback.md +0 -45
  99. package/templates/.vibeops/workflows/task-lifecycle.md +0 -71
  100. package/templates/docs/project/00-overview.md +0 -27
  101. package/templates/docs/project/01-requirements.md +0 -30
  102. package/templates/docs/project/02-mvp-scope.md +0 -36
  103. package/templates/docs/project/04-tech-stack.md +0 -29
  104. package/templates/docs/project/07-backlog.md +0 -23
  105. package/templates/docs/project/08-env.md +0 -29
  106. package/templates/docs/project/09-deployment.md +0 -28
@@ -1,164 +0,0 @@
1
- import { resolve } from "node:path";
2
- import { readConfig } from "../lib/config.js";
3
- import { ghAuthStatus, gitRemoteList, isGhInstalled, parseGitHubRemote, } from "../lib/github-cli.js";
4
- import { readBugsUrl, readHomepage, readPackageJson, readRepositoryUrl, } from "../lib/package-json.js";
5
- import { bold, cyan, dim, green, log, yellow } from "../lib/logger.js";
6
- async function collect(cwd) {
7
- const [installed, auth, remotes, vibeopsConfig, pkg] = await Promise.all([
8
- isGhInstalled(),
9
- ghAuthStatus(),
10
- gitRemoteList(cwd),
11
- readConfig(cwd),
12
- readPackageJson(cwd),
13
- ]);
14
- const origin = remotes.find((r) => r.name === "origin") ?? null;
15
- const otherGithub = remotes.find((r) => r.name !== "origin" && parseGitHubRemote(r.url).isGithub);
16
- const chosen = origin ?? otherGithub ?? null;
17
- const remote = chosen
18
- ? {
19
- name: chosen.name,
20
- url: chosen.url,
21
- info: parseGitHubRemote(chosen.url),
22
- }
23
- : null;
24
- return {
25
- cwd,
26
- gh: {
27
- installed,
28
- authenticated: auth.authenticated,
29
- username: auth.username,
30
- hosts: auth.hosts,
31
- },
32
- remote,
33
- config: vibeopsConfig?.github
34
- ? {
35
- enabled: vibeopsConfig.github.enabled,
36
- mode: vibeopsConfig.github.mode,
37
- owner: vibeopsConfig.github.owner,
38
- repo: vibeopsConfig.github.repo,
39
- remote: vibeopsConfig.github.remote,
40
- visibility: vibeopsConfig.github.visibility,
41
- url: vibeopsConfig.github.url,
42
- }
43
- : null,
44
- package: pkg
45
- ? {
46
- present: true,
47
- repositoryUrl: readRepositoryUrl(pkg.data),
48
- homepage: readHomepage(pkg.data),
49
- bugsUrl: readBugsUrl(pkg.data),
50
- }
51
- : { present: false, repositoryUrl: "", homepage: "", bugsUrl: "" },
52
- };
53
- }
54
- function fmtRow(label, value, accent = "info") {
55
- const padded = label.padEnd(20, " ");
56
- const decorated = accent === "ok"
57
- ? green(value)
58
- : accent === "warn"
59
- ? yellow(value)
60
- : accent === "off"
61
- ? dim(value)
62
- : value;
63
- log.info(` ${padded} ${decorated}`);
64
- }
65
- function describeRemote(report) {
66
- if (report.remote === null)
67
- return { text: "none", accent: "off" };
68
- const { info } = report.remote;
69
- if (info.isGithub && info.owner !== null && info.repo !== null) {
70
- return {
71
- text: `${report.remote.name} ${info.owner}/${info.repo} ${dim(info.url)}`,
72
- accent: "ok",
73
- };
74
- }
75
- return {
76
- text: `${report.remote.name} ${report.remote.url} ${yellow("(not a GitHub URL)")}`,
77
- accent: "warn",
78
- };
79
- }
80
- function describePackage(report) {
81
- if (!report.package.present)
82
- return { text: "none", accent: "off" };
83
- const url = report.package.repositoryUrl;
84
- if (url.length === 0)
85
- return { text: "none", accent: "off" };
86
- const info = parseGitHubRemote(url);
87
- if (info.isGithub && info.owner !== null && info.repo !== null) {
88
- return {
89
- text: `${info.owner}/${info.repo} ${dim(url)}`,
90
- accent: "ok",
91
- };
92
- }
93
- return { text: `${url} ${yellow("(not a GitHub URL)")}`, accent: "warn" };
94
- }
95
- function describeConfig(report) {
96
- if (report.config === null)
97
- return { text: "no (no github section)", accent: "off" };
98
- if (!report.config.enabled)
99
- return {
100
- text: `no (config present, enabled=false)`,
101
- accent: "off",
102
- };
103
- const slug = report.config.owner.length > 0 && report.config.repo.length > 0
104
- ? `${report.config.owner}/${report.config.repo}`
105
- : "(owner/repo missing)";
106
- const visibility = report.config.visibility.length > 0 ? report.config.visibility : "?";
107
- return {
108
- text: `yes ${slug} visibility=${visibility} remote=${report.config.remote}`,
109
- accent: report.config.owner.length > 0 && report.config.repo.length > 0 ? "ok" : "warn",
110
- };
111
- }
112
- function printHuman(report) {
113
- log.info(bold("GitHub"));
114
- fmtRow("gh installed", report.gh.installed ? "yes" : "no", report.gh.installed ? "ok" : "off");
115
- if (report.gh.installed) {
116
- fmtRow("gh authenticated", report.gh.authenticated
117
- ? `yes${report.gh.username !== null ? ` ${dim(`as ${report.gh.username}`)}` : ""}`
118
- : "no", report.gh.authenticated ? "ok" : "off");
119
- }
120
- else {
121
- fmtRow("gh authenticated", "n/a", "off");
122
- }
123
- const remote = describeRemote(report);
124
- fmtRow("git remote origin", remote.text, remote.accent);
125
- const cfg = describeConfig(report);
126
- fmtRow("config enabled", cfg.text, cfg.accent);
127
- const pkg = describePackage(report);
128
- fmtRow("package repo", pkg.text, pkg.accent);
129
- log.blank();
130
- if (!report.gh.installed) {
131
- log.info(`${yellow("!")} gh CLI not found. Install via ${cyan("brew install gh")} (macOS) and re-run.`);
132
- }
133
- else if (!report.gh.authenticated) {
134
- log.info(`${yellow("!")} gh installed but not authenticated. Run ${cyan("gh auth login")} first.`);
135
- }
136
- else if (report.remote === null) {
137
- log.info(`${dim("·")} No git remote yet. Run ${cyan("vibeops github init")} to create or connect one.`);
138
- }
139
- else if (!report.remote.info.isGithub) {
140
- log.info(`${yellow("!")} ${report.remote.name} is not a GitHub URL. Reconnect with ${cyan("vibeops github init --connect <owner/repo>")}.`);
141
- }
142
- else if (report.config === null || !report.config.enabled) {
143
- log.info(`${dim("·")} Remote OK, but .vibeops.json has no github section. Run ${cyan("vibeops github init")} to record it.`);
144
- }
145
- else if (report.package.present &&
146
- parseGitHubRemote(report.package.repositoryUrl).isGithub === false) {
147
- log.info(`${dim("·")} package.json repository fields are not GitHub URLs. Re-run ${cyan("vibeops github init")} to update them.`);
148
- }
149
- else {
150
- log.ok("GitHub setup looks consistent.");
151
- }
152
- }
153
- export async function githubStatusCommand(options = {}) {
154
- const cwd = resolve(options.cwd ?? process.cwd());
155
- const report = await collect(cwd);
156
- if (options.json === true) {
157
- log.raw(`${JSON.stringify(report, null, 2)}\n`);
158
- return;
159
- }
160
- printHuman(report);
161
- // Non-blocking: github status never sets a non-zero exit code by itself.
162
- // The user is informed; nothing about gh missing / unauthenticated should
163
- // break CI scripts that only call `vibeops github status` to probe state.
164
- }