@ai-sdlc/mcp-advisor 0.3.0 → 0.4.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.
@@ -12,6 +12,8 @@ import { extractIssueNumber } from '@ai-sdlc/orchestrator';
12
12
  const execFileAsync = promisify(execFile);
13
13
  /** Loose pattern for branch names like `issue-42`, `issue_42`, `issue#42`. */
14
14
  const LOOSE_BRANCH_PATTERN = /issue[- _]?#?(\d+)/i;
15
+ /** Pattern for Backlog.md task IDs like `proj-42` in branch names. */
16
+ const BACKLOG_TASK_PATTERN = /(?:^|[/_-])([a-z]+-(\d+))(?:$|[/_-])/i;
15
17
  /** Pattern for `#N` or `fixes #N` in commit messages. */
16
18
  const COMMIT_ISSUE_PATTERN = /(?:fix(?:es|ed)?|close[sd]?|resolve[sd]?)\s+#(\d+)|#(\d+)/gi;
17
19
  /**
@@ -77,6 +79,10 @@ export async function resolveIssue(repoPath, explicitIssue) {
77
79
  if (loose) {
78
80
  return { issueNumber: parseInt(loose[1], 10), method: 'branch', confidence: 0.8 };
79
81
  }
82
+ const backlogMatch = branch.match(BACKLOG_TASK_PATTERN);
83
+ if (backlogMatch) {
84
+ return { issueNumber: parseInt(backlogMatch[2], 10), method: 'branch', confidence: 0.8 };
85
+ }
80
86
  }
81
87
  // Tier 2: Explicit declaration
82
88
  if (explicitIssue != null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdlc/mcp-advisor",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "MCP server bridging human-directed AI sessions with the AI-SDLC orchestrator",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -33,7 +33,7 @@
33
33
  "@modelcontextprotocol/sdk": "^1.26.0",
34
34
  "better-sqlite3": "^11.0.0",
35
35
  "zod": "^3.23.0",
36
- "@ai-sdlc/orchestrator": "0.3.0"
36
+ "@ai-sdlc/orchestrator": "0.4.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/better-sqlite3": "^7.6.0",