Skip to content

Commit ee817d4

Browse files
committed
refactor: remove deprecated exports and update docs
Remove deprecated wrappers (mergeClaudeMd, hasExistingBmadDir, CHECK_REGISTRY, validateArtifacts, RalphStatus type alias) and update tests to use their replacements. Update CONTRIBUTING.md tree structure and fix stale npm script references. Add package.json keywords.
1 parent 9383827 commit ee817d4

15 files changed

Lines changed: 143 additions & 393 deletions

File tree

CONTRIBUTING.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ bmalph/
3434
│ │ ├── upgrade.ts # bmalph upgrade
3535
│ │ ├── doctor.ts # bmalph doctor
3636
│ │ ├── check-updates.ts # bmalph check-updates
37-
│ │ └── status.ts # bmalph status
37+
│ │ ├── status.ts # bmalph status
38+
│ │ ├── implement.ts # bmalph implement
39+
│ │ ├── reset.ts # bmalph reset
40+
│ │ └── watch.ts # bmalph watch
3841
│ ├── platform/ # Platform abstraction layer
3942
│ │ ├── types.ts # PlatformId, PlatformTier, CommandDelivery types
4043
│ │ ├── registry.ts # Platform registry (get, list, validate)
@@ -52,11 +55,20 @@ bmalph/
5255
│ │ ├── story-parsing.ts # Parse BMAD stories
5356
│ │ ├── fix-plan.ts # Generate @fix_plan.md
5457
│ │ ├── artifacts.ts # Locate BMAD artifacts
58+
│ │ ├── artifact-scan.ts # Artifact scanning
5559
│ │ ├── context.ts # Generate PROJECT_CONTEXT.md
60+
│ │ ├── preflight.ts # Pre-flight validation checks
5661
│ │ ├── tech-stack.ts # Detect tech stack
5762
│ │ ├── specs-*.ts # Spec generation modules
5863
│ │ ├── types.ts # Shared transition types
5964
│ │ └── index.ts # Module barrel export
65+
│ ├── watch/ # Live dashboard module
66+
│ │ ├── dashboard.ts # Dashboard orchestrator
67+
│ │ ├── file-watcher.ts # File system polling
68+
│ │ ├── renderer.ts # Terminal UI rendering
69+
│ │ ├── state-reader.ts # Ralph state parsing
70+
│ │ └── types.ts # Watch types
71+
│ ├── reset.ts # Reset plan-build + execute logic
6072
│ └── utils/ # Shared utilities
6173
│ ├── config.ts # Config file operations
6274
│ ├── state.ts # State management
@@ -149,9 +161,9 @@ npm test
149161

150162
### What Gets Bundled
151163

152-
| Source | Destination | Contents |
153-
| ----------------------- | ----------- | ----------------------------------- |
154-
| BMAD-METHOD/bmad-agent/ | bmad/ | Agents, workflows, personas, config |
164+
| Source | Destination | Contents |
165+
| ---------------- | ----------- | ----------------------------------- |
166+
| BMAD-METHOD/src/ | bmad/ | Agents, workflows, personas, config |
155167

156168
## Commit Guidelines
157169

@@ -196,15 +208,15 @@ npm run lint
196208
npm run format
197209

198210
# Full check (lint + build + test)
199-
npm run check
211+
npm run ci
200212
```
201213

202214
## Pull Request Process
203215

204216
1. Create feature branch from `main`
205217
2. Write tests first (TDD)
206218
3. Implement feature
207-
4. Ensure all tests pass: `npm run check`
219+
4. Ensure all tests pass: `npm run ci`
208220
5. Create PR with clear description (version bumps are automated)
209221

210222
## Questions?

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bmalph",
33
"version": "2.4.0",
4-
"description": "Unified AI Development Framework - BMAD phases with Ralph execution loop for Claude Code",
4+
"description": "Unified AI Development Framework - BMAD phases with Ralph execution loop",
55
"type": "module",
66
"bin": {
77
"bmalph": "./bin/bmalph.js"
@@ -32,7 +32,11 @@
3232
"ai",
3333
"development",
3434
"framework",
35-
"agents"
35+
"agents",
36+
"bmad",
37+
"ralph",
38+
"autonomous",
39+
"coding-assistant"
3640
],
3741
"author": "Lars Cowe",
3842
"license": "MIT",

src/commands/doctor.ts

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import chalk from "chalk";
22
import { readFile, stat } from "fs/promises";
3-
import { exists } from "../utils/file-system.js";
43
import { join } from "path";
54
import { readJsonFile } from "../utils/json.js";
65
import { readConfig } from "../utils/config.js";
@@ -540,53 +539,3 @@ export function buildCheckRegistry(platform: Platform): CheckDefinition[] {
540539

541540
return [...CORE_CHECKS, ...platformChecks, ...TRAILING_CHECKS];
542541
}
543-
544-
/**
545-
* Static registry for backward compatibility with existing tests.
546-
* Uses claude-code platform checks (slash-command + claude-md).
547-
*
548-
* Note: The check ids here ("slash-command", "claude-md") intentionally differ
549-
* from the live buildCheckRegistry path which uses platform-provided ids
550-
* ("instructions-file"). This is for test backward compatibility only.
551-
*
552-
* @deprecated Use `buildCheckRegistry(platform)` for platform-aware checks.
553-
*/
554-
export const CHECK_REGISTRY: CheckDefinition[] = (() => {
555-
// Inline claude-code platform checks to avoid async import at module level
556-
const slashCommandCheck: CheckDefinition = {
557-
id: "slash-command",
558-
run: async (projectDir: string) => {
559-
if (await exists(join(projectDir, ".claude/commands/bmalph.md"))) {
560-
return { label: ".claude/commands/bmalph.md present", passed: true };
561-
}
562-
return {
563-
label: ".claude/commands/bmalph.md present",
564-
passed: false,
565-
detail: "not found",
566-
hint: "Run: bmalph init",
567-
};
568-
},
569-
};
570-
571-
const claudeMdCheck: CheckDefinition = {
572-
id: "claude-md",
573-
run: async (projectDir: string) => {
574-
const label = "CLAUDE.md contains BMAD snippet";
575-
const hint = "Run: bmalph init";
576-
try {
577-
const content = await readFile(join(projectDir, "CLAUDE.md"), "utf-8");
578-
if (content.includes("BMAD-METHOD Integration")) {
579-
return { label, passed: true };
580-
}
581-
return { label, passed: false, detail: "missing BMAD-METHOD Integration section", hint };
582-
} catch (err) {
583-
if (isEnoent(err)) {
584-
return { label, passed: false, detail: "CLAUDE.md not found", hint };
585-
}
586-
return { label, passed: false, detail: `error: ${formatError(err)}`, hint };
587-
}
588-
},
589-
};
590-
591-
return [...CORE_CHECKS, slashCommandCheck, claudeMdCheck, ...TRAILING_CHECKS];
592-
})();

src/commands/init.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ import {
55
installProject,
66
mergeInstructionsFile,
77
isInitialized,
8-
hasExistingBmadDir,
98
previewInstall,
109
getBundledVersions,
1110
} from "../installer.js";
1211
import { formatDryRunSummary, type DryRunAction } from "../utils/dryrun.js";
1312
import { validateProjectName } from "../utils/validate.js";
1413
import { withErrorHandling } from "../utils/errors.js";
14+
import { exists } from "../utils/file-system.js";
15+
import { join } from "path";
1516
import { isPlatformId, getPlatform } from "../platform/registry.js";
1617
import { detectPlatform } from "../platform/detect.js";
1718
import type { Platform, PlatformId } from "../platform/types.js";
@@ -90,7 +91,7 @@ async function runInit(options: InitOptions): Promise<void> {
9091
return;
9192
}
9293

93-
if (await hasExistingBmadDir(projectDir)) {
94+
if (await exists(join(projectDir, "_bmad"))) {
9495
console.log(chalk.cyan("Existing BMAD installation detected."));
9596
console.log("Framework files in _bmad/ will be replaced with the managed version.");
9697
console.log("Planning artifacts in _bmad-output/ will not be modified.\n");

src/installer.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -528,22 +528,10 @@ export async function mergeInstructionsFile(
528528
await atomicWriteFile(instructionsPath, existing + snippet);
529529
}
530530

531-
/**
532-
* @deprecated Use `mergeInstructionsFile(projectDir)` instead.
533-
* Kept for backward compatibility during migration.
534-
*/
535-
export async function mergeClaudeMd(projectDir: string): Promise<void> {
536-
return mergeInstructionsFile(projectDir);
537-
}
538-
539531
export async function isInitialized(projectDir: string): Promise<boolean> {
540532
return exists(join(projectDir, CONFIG_FILE));
541533
}
542534

543-
export async function hasExistingBmadDir(projectDir: string): Promise<boolean> {
544-
return exists(join(projectDir, "_bmad"));
545-
}
546-
547535
export async function previewInstall(
548536
projectDir: string,
549537
platform?: Platform

src/transition/artifacts.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { readFile } from "fs/promises";
21
import { join } from "path";
32
import { debug } from "../utils/logger.js";
43
import { exists } from "../utils/file-system.js";
@@ -21,33 +20,3 @@ export async function findArtifactsDir(projectDir: string): Promise<string | nul
2120
debug(`No artifacts found. Checked: ${candidates.join(", ")}`);
2221
return null;
2322
}
24-
25-
/** @deprecated Use `runPreflight` from `./preflight.js` instead. Kept for backward compatibility. */
26-
export async function validateArtifacts(files: string[], artifactsDir: string): Promise<string[]> {
27-
const warnings: string[] = [];
28-
29-
const hasPrd = files.some((f) => /prd/i.test(f));
30-
if (!hasPrd) {
31-
warnings.push("No PRD document found in planning artifacts");
32-
}
33-
34-
const hasArchitecture = files.some((f) => /architect/i.test(f));
35-
if (!hasArchitecture) {
36-
warnings.push("No architecture document found in planning artifacts");
37-
}
38-
39-
// Check readiness report for NO-GO
40-
const readinessFile = files.find((f) => /readiness/i.test(f));
41-
if (readinessFile) {
42-
try {
43-
const content = await readFile(join(artifactsDir, readinessFile), "utf-8");
44-
if (/NO[-\s]?GO/i.test(content)) {
45-
warnings.push("Readiness report indicates NO-GO status");
46-
}
47-
} catch {
48-
warnings.push("Could not read readiness report — NO-GO status unverified");
49-
}
50-
}
51-
52-
return warnings;
53-
}

src/transition/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export {
2727
export { detectTechStack, customizeAgentMd } from "./tech-stack.js";
2828

2929
// Artifacts
30-
export { findArtifactsDir, validateArtifacts } from "./artifacts.js";
30+
export { findArtifactsDir } from "./artifacts.js";
3131

3232
// Context
3333
export {

src/utils/state.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,6 @@ export function getPhaseInfo(phase: number): PhaseInfo {
197197
return info[phase] ?? { name: "Unknown", agent: "Unknown", commands: [] };
198198
}
199199

200-
/** @deprecated Use RalphLoopStatus from validate.ts instead */
201-
export type RalphStatus = RalphLoopStatus;
202-
203200
const DEFAULT_RALPH_STATUS: RalphLoopStatus = {
204201
loopCount: 0,
205202
status: "not_started",

0 commit comments

Comments
 (0)