agent-bober 0.7.0 → 0.8.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 (60) hide show
  1. package/README.md +64 -2
  2. package/dist/cli/commands/init.d.ts.map +1 -1
  3. package/dist/cli/commands/init.js +176 -1
  4. package/dist/cli/commands/init.js.map +1 -1
  5. package/dist/discovery/config-generator.d.ts +28 -0
  6. package/dist/discovery/config-generator.d.ts.map +1 -0
  7. package/dist/discovery/config-generator.js +225 -0
  8. package/dist/discovery/config-generator.js.map +1 -0
  9. package/dist/discovery/index.d.ts +20 -0
  10. package/dist/discovery/index.d.ts.map +1 -0
  11. package/dist/discovery/index.js +19 -0
  12. package/dist/discovery/index.js.map +1 -0
  13. package/dist/discovery/scanner.d.ts +17 -0
  14. package/dist/discovery/scanner.d.ts.map +1 -0
  15. package/dist/discovery/scanner.js +120 -0
  16. package/dist/discovery/scanner.js.map +1 -0
  17. package/dist/discovery/scanners/ci-checks.d.ts +10 -0
  18. package/dist/discovery/scanners/ci-checks.d.ts.map +1 -0
  19. package/dist/discovery/scanners/ci-checks.js +169 -0
  20. package/dist/discovery/scanners/ci-checks.js.map +1 -0
  21. package/dist/discovery/scanners/code-conventions.d.ts +12 -0
  22. package/dist/discovery/scanners/code-conventions.d.ts.map +1 -0
  23. package/dist/discovery/scanners/code-conventions.js +216 -0
  24. package/dist/discovery/scanners/code-conventions.js.map +1 -0
  25. package/dist/discovery/scanners/documentation.d.ts +17 -0
  26. package/dist/discovery/scanners/documentation.d.ts.map +1 -0
  27. package/dist/discovery/scanners/documentation.js +92 -0
  28. package/dist/discovery/scanners/documentation.js.map +1 -0
  29. package/dist/discovery/scanners/git-conventions.d.ts +11 -0
  30. package/dist/discovery/scanners/git-conventions.d.ts.map +1 -0
  31. package/dist/discovery/scanners/git-conventions.js +128 -0
  32. package/dist/discovery/scanners/git-conventions.js.map +1 -0
  33. package/dist/discovery/scanners/package-scripts.d.ts +9 -0
  34. package/dist/discovery/scanners/package-scripts.d.ts.map +1 -0
  35. package/dist/discovery/scanners/package-scripts.js +112 -0
  36. package/dist/discovery/scanners/package-scripts.js.map +1 -0
  37. package/dist/discovery/scanners/test-conventions.d.ts +9 -0
  38. package/dist/discovery/scanners/test-conventions.d.ts.map +1 -0
  39. package/dist/discovery/scanners/test-conventions.js +231 -0
  40. package/dist/discovery/scanners/test-conventions.js.map +1 -0
  41. package/dist/discovery/synthesizer.d.ts +30 -0
  42. package/dist/discovery/synthesizer.d.ts.map +1 -0
  43. package/dist/discovery/synthesizer.js +348 -0
  44. package/dist/discovery/synthesizer.js.map +1 -0
  45. package/dist/discovery/types.d.ts +160 -0
  46. package/dist/discovery/types.d.ts.map +1 -0
  47. package/dist/discovery/types.js +9 -0
  48. package/dist/discovery/types.js.map +1 -0
  49. package/dist/index.d.ts +4 -0
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +4 -0
  52. package/dist/index.js.map +1 -1
  53. package/dist/mcp/tools/init.d.ts.map +1 -1
  54. package/dist/mcp/tools/init.js +102 -1
  55. package/dist/mcp/tools/init.js.map +1 -1
  56. package/package.json +2 -2
  57. package/skills/bober.eval/SKILL.md +4 -0
  58. package/skills/bober.principles/SKILL.md +36 -3
  59. package/skills/bober.run/SKILL.md +12 -0
  60. package/skills/bober.sprint/SKILL.md +8 -0
@@ -0,0 +1,160 @@
1
+ /**
2
+ * Type definitions for the deep programmatic codebase scanner.
3
+ *
4
+ * DiscoveryReport is the top-level output of scanProject().
5
+ * All sections are optional -- a graceful failure in a sub-scanner
6
+ * produces a null/empty section, not a thrown error.
7
+ */
8
+ /** Bober command categories mapped from package.json scripts. */
9
+ export interface CommandMapping {
10
+ /** Script name in package.json (e.g. "build", "test:watch"). */
11
+ scriptName: string;
12
+ /** Actual command string (e.g. "tsc", "vitest run"). */
13
+ command: string;
14
+ /** Full run command including package manager prefix (e.g. "npm run build"). */
15
+ runCommand: string;
16
+ }
17
+ export type BoberCommandCategory = "build" | "test" | "lint" | "typecheck" | "dev" | "install";
18
+ export interface PackageScriptsReport {
19
+ /** Detected package manager. */
20
+ packageManager: "npm" | "yarn" | "pnpm" | "bun" | null;
21
+ /** All scripts from package.json. */
22
+ allScripts: Record<string, string>;
23
+ /** Scripts mapped to bober categories. */
24
+ categorized: Partial<Record<BoberCommandCategory, CommandMapping>>;
25
+ }
26
+ export type CICategory = "test" | "lint" | "build" | "deploy" | "other";
27
+ export interface CIStep {
28
+ /** Name of the CI step if present. */
29
+ name: string | null;
30
+ /** The run command extracted from the step. */
31
+ runCommand: string;
32
+ /** Inferred category. */
33
+ category: CICategory;
34
+ }
35
+ export interface CIWorkflow {
36
+ /** Relative path to the workflow file (e.g. ".github/workflows/ci.yml"). */
37
+ file: string;
38
+ steps: CIStep[];
39
+ }
40
+ export interface CIChecksReport {
41
+ workflows: CIWorkflow[];
42
+ /** Flat list of all unique run commands across all workflows. */
43
+ allRunCommands: string[];
44
+ }
45
+ export interface GitConventionsReport {
46
+ /** Whether conventional commits (feat:, fix:, etc.) are detected. */
47
+ usesConventionalCommits: boolean;
48
+ /** Most common commit prefix pattern (e.g. "bober(", "feat:", "TICKET-"). */
49
+ mostCommonPrefix: string | null;
50
+ /** Raw sample of recent commit messages (last 50). */
51
+ recentMessages: string[];
52
+ /** Detected branch naming patterns (e.g. "feature/*", "bober/*"). */
53
+ branchPatterns: string[];
54
+ /** All branch names from git branch -a. */
55
+ branches: string[];
56
+ /** Whether the repo has a linear history (no merge commits). */
57
+ hasLinearHistory: boolean;
58
+ /** Ratio of merge commits among sampled commits (0-1). */
59
+ mergeCommitRatio: number;
60
+ }
61
+ export type FileNamingStyle = "camelCase" | "kebab-case" | "PascalCase" | "snake_case" | "mixed";
62
+ export interface FileNamingReport {
63
+ dominant: FileNamingStyle;
64
+ counts: Record<FileNamingStyle, number>;
65
+ }
66
+ export interface ImportStyleReport {
67
+ /** Count of relative imports (e.g. ./foo, ../bar). */
68
+ relativeCount: number;
69
+ /** Count of absolute/alias imports (e.g. @/components, src/utils). */
70
+ absoluteCount: number;
71
+ /** Whether imports use .js extensions (common in ESM TypeScript). */
72
+ usesJsExtensions: boolean;
73
+ /** Example import lines (up to 5). */
74
+ examples: string[];
75
+ }
76
+ export interface ExportStyleReport {
77
+ namedExportCount: number;
78
+ defaultExportCount: number;
79
+ /** Dominant style. */
80
+ dominant: "named" | "default" | "mixed";
81
+ }
82
+ export interface TypeScriptPatternsReport {
83
+ /** Number of `any` usages across sampled files. */
84
+ anyCount: number;
85
+ /** Number of `@ts-ignore` / `@ts-expect-error` usages. */
86
+ tsIgnoreCount: number;
87
+ /** Number of `enum` declarations. */
88
+ enumCount: number;
89
+ /** Number of `interface` declarations. */
90
+ interfaceCount: number;
91
+ /** Number of `type` alias declarations. */
92
+ typeAliasCount: number;
93
+ }
94
+ export interface CodeConventionsReport {
95
+ /** Total source files sampled. */
96
+ filesSampled: number;
97
+ fileNaming: FileNamingReport;
98
+ importStyle: ImportStyleReport;
99
+ exportStyle: ExportStyleReport;
100
+ typescriptPatterns: TypeScriptPatternsReport | null;
101
+ }
102
+ export type TestFramework = "vitest" | "jest" | "mocha" | "jasmine" | "pytest" | "unknown";
103
+ export type MockingLibrary = "vitest" | "jest" | "sinon" | "testdouble" | "none" | "unknown";
104
+ export interface TestConventionsReport {
105
+ framework: TestFramework;
106
+ /** Dominant test file naming pattern (e.g. "*.test.ts", "*.spec.ts"). */
107
+ filePattern: "*.test.ts" | "*.spec.ts" | "*.test.js" | "*.spec.js" | "mixed" | "unknown";
108
+ /** Whether test files are colocated with source (true) or in a separate dir (false). */
109
+ colocated: boolean;
110
+ /** Test directories found (e.g. ["__tests__", "test", "tests"]). */
111
+ testDirs: string[];
112
+ mockingLibrary: MockingLibrary;
113
+ /** Whether a coverage config was detected. */
114
+ hasCoverageConfig: boolean;
115
+ /** Total test files found. */
116
+ testFileCount: number;
117
+ }
118
+ export interface DocFile {
119
+ /** Relative path from project root. */
120
+ path: string;
121
+ /** Content truncated to 2000 chars. */
122
+ content: string;
123
+ /** Whether the content was truncated. */
124
+ truncated: boolean;
125
+ }
126
+ export interface DocumentationReport {
127
+ files: DocFile[];
128
+ }
129
+ export interface DetectedStackReport {
130
+ hasTypescript: boolean;
131
+ hasReact: boolean;
132
+ hasNext: boolean;
133
+ hasVite: boolean;
134
+ hasPlaywright: boolean;
135
+ hasEslint: boolean;
136
+ hasVitest: boolean;
137
+ hasJest: boolean;
138
+ hasPython: boolean;
139
+ hasRust: boolean;
140
+ hasNestjs: boolean;
141
+ hasFastify: boolean;
142
+ hasExpress: boolean;
143
+ /** Primary language detected. */
144
+ primaryLanguage: "typescript" | "javascript" | "python" | "rust" | "unknown";
145
+ }
146
+ export interface DiscoveryReport {
147
+ /** Absolute path to the scanned project root. */
148
+ projectRoot: string;
149
+ /** ISO timestamp of the scan. */
150
+ scannedAt: string;
151
+ packageScripts: PackageScriptsReport | null;
152
+ packageManager: "npm" | "yarn" | "pnpm" | "bun" | null;
153
+ ciChecks: CIChecksReport;
154
+ gitConventions: GitConventionsReport | null;
155
+ codeConventions: CodeConventionsReport | null;
156
+ testConventions: TestConventionsReport | null;
157
+ documentation: DocumentationReport;
158
+ detectedStack: DetectedStackReport | null;
159
+ }
160
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/discovery/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,oBAAoB,GAC5B,OAAO,GACP,MAAM,GACN,MAAM,GACN,WAAW,GACX,KAAK,GACL,SAAS,CAAC;AAEd,MAAM,WAAW,oBAAoB;IACnC,gCAAgC;IAChC,cAAc,EAAE,KAAK,GAA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,CAAC;IAC5C,cAAc,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,CAAC;IACvD,QAAQ,EAAE,cAAc,CAAC;IACzB,cAAc,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC5C,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC9C,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC9C,aAAa,EAAE,mBAAmB,CAAC;IACnC,aAAa,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAC3C"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Type definitions for the deep programmatic codebase scanner.
3
+ *
4
+ * DiscoveryReport is the top-level output of scanProject().
5
+ * All sections are optional -- a graceful failure in a sub-scanner
6
+ * produces a null/empty section, not a thrown error.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/discovery/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
package/dist/index.d.ts CHANGED
@@ -26,4 +26,8 @@ export { logger, Logger } from "./utils/logger.js";
26
26
  export { findProjectRoot } from "./utils/fs.js";
27
27
  export { createBoberMCPServer } from "./mcp/index.js";
28
28
  export { RunManager } from "./mcp/run-manager.js";
29
+ export { scanProject } from "./discovery/scanner.js";
30
+ export { synthesizePrinciples } from "./discovery/synthesizer.js";
31
+ export { generateEvalConfig } from "./discovery/config-generator.js";
32
+ export type { DiscoveryReport } from "./discovery/types.js";
29
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,oB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AAe,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -31,4 +31,8 @@ export { findProjectRoot } from "./utils/fs.js";
31
31
  // ── MCP Server ──────────────────────────────────────────────────────
32
32
  export { createBoberMCPServer } from "./mcp/index.js";
33
33
  export { RunManager } from "./mcp/run-manager.js";
34
+ // ── Discovery ────────────────────────────────────────────────────────
35
+ export { scanProject } from "./discovery/scanner.js";
36
+ export { synthesizePrinciples } from "./discovery/synthesizer.js";
37
+ export { generateEvalConfig } from "./discovery/config-generator.js";
34
38
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAOL,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEnE,sEAAsE;AAEtE,OAAO,EAIL,cAAc,EACd,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAGL,UAAU,GACX,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAOL,gBAAgB,EAChB,cAAc,GACf,MAAM,4BAA4B,CAAC;AAEpC,sEAAsE;AAEtE,OAAO,EAIL,aAAa,EACb,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EACL,YAAY,GAEb,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EACL,WAAW,GAEZ,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEh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AY,EAAE,cAAc,EAAqB,MAAM,wBAAwB,CAAC;AAEzF,sEAAsE;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,uEAAuE;AAEvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,wEAAwE;AAExE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/init.ts"],"names":[],"mappings":"AAmBA,wBAAgB,gBAAgB,IAAI,IAAI,CAsIvC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/init.ts"],"names":[],"mappings":"AAsBA,wBAAgB,gBAAgB,IAAI,IAAI,CA0OvC"}
@@ -11,6 +11,9 @@ import { createDefaultConfig } from "../../config/schema.js";
11
11
  import { getPresetNames } from "../../config/defaults.js";
12
12
  import { ensureBoberDir } from "../../state/index.js";
13
13
  import { registerTool } from "./registry.js";
14
+ import { scanProject } from "../../discovery/scanner.js";
15
+ import { generateEvalConfig } from "../../discovery/config-generator.js";
16
+ import { synthesizePrinciples } from "../../discovery/synthesizer.js";
14
17
  // ── Registration ─────────────────────────────────────────────────────
15
18
  export function registerInitTool() {
16
19
  registerTool({
@@ -75,7 +78,105 @@ export function registerInitTool() {
75
78
  if (alreadyExists) {
76
79
  process.stderr.write(`[bober_init] Overwriting existing bober.config.json in ${projectRoot}\n`);
77
80
  }
78
- // Build config
81
+ // ── Brownfield: run auto-discovery pipeline ────────────────────
82
+ if (mode === "brownfield") {
83
+ process.stderr.write(`[bober_init] Running brownfield auto-discovery for ${projectRoot}\n`);
84
+ const report = await scanProject(projectRoot);
85
+ const evalConfig = generateEvalConfig(report);
86
+ const config = createDefaultConfig(projectName, mode, undefined, {
87
+ planner: {
88
+ maxClarifications: 5,
89
+ model: "opus",
90
+ provider,
91
+ },
92
+ generator: {
93
+ model: "sonnet",
94
+ maxTurnsPerSprint: 50,
95
+ autoCommit: true,
96
+ branchPattern: "bober/{feature-name}",
97
+ provider,
98
+ },
99
+ evaluator: {
100
+ model: "sonnet",
101
+ strategies: evalConfig.strategies,
102
+ maxIterations: 3,
103
+ provider,
104
+ },
105
+ commands: evalConfig.commands,
106
+ });
107
+ // Write bober.config.json
108
+ const configPath = join(projectRoot, "bober.config.json");
109
+ await writeFile(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
110
+ // Create .bober/ directory structure
111
+ await ensureBoberDir(projectRoot);
112
+ // Synthesize principles
113
+ let principles = null;
114
+ let principlesError = null;
115
+ try {
116
+ principles = await synthesizePrinciples(report, projectRoot, config);
117
+ const principlesPath = join(projectRoot, ".bober", "principles.md");
118
+ await writeFile(principlesPath, principles, "utf-8");
119
+ }
120
+ catch (err) {
121
+ principlesError = err instanceof Error ? err.message : String(err);
122
+ process.stderr.write(`[bober_init] Could not synthesize principles: ${principlesError}\n`);
123
+ }
124
+ // Build discovery summary for response
125
+ const stack = report.detectedStack;
126
+ const detectedTech = [];
127
+ if (stack) {
128
+ if (stack.hasTypescript)
129
+ detectedTech.push("TypeScript");
130
+ if (stack.hasReact)
131
+ detectedTech.push("React");
132
+ if (stack.hasNext)
133
+ detectedTech.push("Next.js");
134
+ if (stack.hasVite)
135
+ detectedTech.push("Vite");
136
+ if (stack.hasEslint)
137
+ detectedTech.push("ESLint");
138
+ if (stack.hasVitest)
139
+ detectedTech.push("Vitest");
140
+ if (stack.hasJest)
141
+ detectedTech.push("Jest");
142
+ if (stack.hasPlaywright)
143
+ detectedTech.push("Playwright");
144
+ if (stack.hasNestjs)
145
+ detectedTech.push("NestJS");
146
+ if (stack.hasFastify)
147
+ detectedTech.push("Fastify");
148
+ if (stack.hasExpress)
149
+ detectedTech.push("Express");
150
+ if (stack.hasPython)
151
+ detectedTech.push("Python");
152
+ if (stack.hasRust)
153
+ detectedTech.push("Rust");
154
+ }
155
+ process.stderr.write(`[bober_init] Initialised brownfield project "${projectName}" in ${projectRoot}\n`);
156
+ return JSON.stringify({
157
+ status: "initialised",
158
+ projectName,
159
+ mode,
160
+ provider,
161
+ configPath,
162
+ boberDir: join(projectRoot, ".bober"),
163
+ discovery: {
164
+ detectedTech,
165
+ packageManager: report.packageManager,
166
+ strategies: evalConfig.strategies.map((s) => s.type),
167
+ commands: evalConfig.commands,
168
+ },
169
+ principles: principles ?? null,
170
+ principlesError,
171
+ message: alreadyExists
172
+ ? "Existing configuration was overwritten using auto-discovery."
173
+ : "Brownfield project initialised with auto-discovered configuration.",
174
+ nextStep: principles
175
+ ? "Run bober_plan with a task description to generate a sprint plan."
176
+ : "Run /bober-principles to generate project principles, then bober_plan.",
177
+ }, null, 2);
178
+ }
179
+ // ── Greenfield: use preset/default config ──────────────────────
79
180
  const config = createDefaultConfig(projectName, mode, rawPreset, {
80
181
  planner: {
81
182
  maxClarifications: 5,
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/mcp/tools/init.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,EAAE;AACF,mEAAmE;AACnE,qEAAqE;AACrE,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0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1
1
  {
2
2
  "name": "agent-bober",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "Generator-Evaluator multi-agent harness for building applications autonomously with any LLM. Supports Claude, GPT, Gemini, Ollama. Includes MCP server for Cursor/Windsurf.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,7 +33,7 @@
33
33
  ],
34
34
  "author": "BOBER3r",
35
35
  "license": "MIT",
36
- "homepage": "https://github.com/BOBER3r/agent-bober#readme",
36
+ "homepage": "https://agentbober.com",
37
37
  "repository": {
38
38
  "type": "git",
39
39
  "url": "git+https://github.com/BOBER3r/agent-bober.git"
@@ -66,9 +66,13 @@ Use the **Agent tool** to spawn an evaluator subagent.
66
66
  ```
67
67
  Agent tool call:
68
68
  description: "Evaluate: <sprint title>"
69
+ subagent_type: bober-evaluator
70
+ mode: auto
69
71
  prompt: <the full prompt below>
70
72
  ```
71
73
 
74
+ IMPORTANT: Use `mode: auto` — the evaluator needs bash access to run tests, builds, and verification commands.
75
+
72
76
  **Build the evaluator prompt with ALL of these sections:**
73
77
 
74
78
  ```
@@ -37,7 +37,40 @@ If the user wants to update, proceed to Step 3 with the existing content as a st
37
37
 
38
38
  Proceed to Step 2.
39
39
 
40
- ## Step 2: Interview the User
40
+ ## Step 2: Auto-Discovery (Brownfield mode)
41
+
42
+ **Check this FIRST before interviewing the user.**
43
+
44
+ If `bober.config.json` exists with `"mode": "brownfield"` AND no arguments were provided to this command:
45
+
46
+ 1. **Run the auto-discovery pipeline** — analyze the codebase to discover conventions:
47
+ - Read and parse `package.json` to detect scripts, dependencies, and package manager
48
+ - Scan `.github/workflows/` or `.gitlab-ci.yml` to identify CI checks
49
+ - Read recent git log to detect commit style (conventional commits, prefix patterns)
50
+ - Sample source files to detect naming conventions, import style, export style, TypeScript patterns
51
+ - Find test files to identify the testing framework and file patterns
52
+
53
+ 2. **Generate principles from discovered patterns** — synthesize the discovered conventions into a structured `principles.md` document using the same format as Step 3. Ground every rule in actual evidence from the codebase scan.
54
+
55
+ 3. **Show the generated principles** to the user:
56
+ ```
57
+ I analyzed your codebase and discovered these conventions:
58
+
59
+ <generated principles content>
60
+ ```
61
+
62
+ 4. **Ask for additions or confirmation:**
63
+ ```
64
+ Want to add or modify anything? You can provide additional notes or say "looks good".
65
+ ```
66
+
67
+ 5. **If the user provides additions**, merge them into the generated principles document. Expand any short notes into full principle statements following the quality rules in Step 3.
68
+
69
+ 6. **Save to `.bober/principles.md`** and proceed to Step 4 (Confirm and Report).
70
+
71
+ The existing interview flow (below) applies only to greenfield projects or when arguments are provided.
72
+
73
+ ## Step 2a: Interview the User (Greenfield or with args)
41
74
 
42
75
  Ask the user 3-5 targeted questions to understand their project principles. Adapt the questions based on whether `bober.config.json` exists and what it reveals about the project type.
43
76
 
@@ -80,7 +113,7 @@ E) Not applicable (no UI in this project)
80
113
  F) Other (please describe)
81
114
  ```
82
115
 
83
- ## Step 2a: Expand Raw Input (if user provides a prompt/argument)
116
+ ## Step 2b: Expand Raw Input (if user provides a prompt/argument)
84
117
 
85
118
  If the user provides text with this command — whether a short note like `"performance-first, minimal dependencies"` or a long paste of requirements, a PRD, or rough notes — your job is to **intelligently expand and elevate** that input into a polished principles document:
86
119
 
@@ -92,7 +125,7 @@ If the user provides text with this command — whether a short note like `"perf
92
125
 
93
126
  The goal: the user pastes rough notes, you produce a comprehensive, opinionated principles document that makes them say "yes, exactly — and I didn't even think of those."
94
127
 
95
- Skip the interview (Step 2) entirely when the user provides substantive input. Go straight to generating the document.
128
+ Skip the interview (Step 2a) entirely when the user provides substantive input. Go straight to generating the document.
96
129
 
97
130
  ## Step 3: Generate Principles Document
98
131
 
@@ -113,9 +113,13 @@ Use the **Agent tool** to spawn a planner subagent.
113
113
  ```
114
114
  Agent tool call:
115
115
  description: "Plan feature: <title from task description>"
116
+ subagent_type: bober-planner
117
+ mode: auto
116
118
  prompt: <the full prompt below>
117
119
  ```
118
120
 
121
+ IMPORTANT: The planner MUST have write access (`mode: auto` or `mode: bypassPermissions`) so it can save specs and contracts directly to `.bober/`. Do NOT use `mode: plan` — that makes the agent read-only and forces a wasteful second pass to write files.
122
+
119
123
  **Build the planner prompt with ALL of these sections:**
120
124
 
121
125
  ```
@@ -256,9 +260,13 @@ Use the **Agent tool** to spawn a generator subagent.
256
260
  ```
257
261
  Agent tool call:
258
262
  description: "Sprint <N>: <sprint title>"
263
+ subagent_type: bober-generator
264
+ mode: auto
259
265
  prompt: <the full prompt below>
260
266
  ```
261
267
 
268
+ IMPORTANT: The generator MUST have full write access (`mode: auto` or `mode: bypassPermissions`) — it writes code, runs commands, and commits.
269
+
262
270
  **Build the generator prompt:**
263
271
 
264
272
  ```
@@ -332,9 +340,13 @@ Use the **Agent tool** to spawn an evaluator subagent.
332
340
  ```
333
341
  Agent tool call:
334
342
  description: "Evaluate sprint <N>: <sprint title>"
343
+ subagent_type: bober-evaluator
344
+ mode: auto
335
345
  prompt: <the full prompt below>
336
346
  ```
337
347
 
348
+ NOTE: The evaluator has read + bash access but NO write/edit tools (enforced by the agent definition, not by mode). Use `mode: auto` so it can run bash commands (tests, builds, dev server).
349
+
338
350
  **Build the evaluator prompt:**
339
351
 
340
352
  ```
@@ -148,9 +148,13 @@ Save the handoff to `.bober/handoffs/<handoffId>.json`.
148
148
  ```
149
149
  Agent tool call:
150
150
  description: "Sprint <N>: <sprint title>"
151
+ subagent_type: bober-generator
152
+ mode: auto
151
153
  prompt: <the full prompt below>
152
154
  ```
153
155
 
156
+ IMPORTANT: Use `mode: auto` or `mode: bypassPermissions` — the generator needs full write access to create/edit files, run bash commands, and commit.
157
+
154
158
  **Generator prompt:**
155
159
 
156
160
  ```
@@ -209,9 +213,13 @@ When done, respond with EXACTLY this JSON structure (no other text):
209
213
  ```
210
214
  Agent tool call:
211
215
  description: "Evaluate sprint <N>: <sprint title>"
216
+ subagent_type: bober-evaluator
217
+ mode: auto
212
218
  prompt: <the full prompt below>
213
219
  ```
214
220
 
221
+ NOTE: The evaluator needs `mode: auto` for bash access (running tests, builds). It has no write/edit tools by agent definition.
222
+
215
223
  **Evaluator prompt:**
216
224
 
217
225
  ```