* feat(handoffs): include project identity in all Next Up blocks Adds project_code and project_title to withProjectRoot() and updates all 30 Next Up headings across 18 workflow files to include [PROJECT_CODE] PROJECT_TITLE suffix for multi-project clarity. Closes #1948 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(review): add withProjectRoot tests and fix placeholder syntax (#1951) Address code review feedback: - Add 4 tests for project_code/project_title injection in withProjectRoot() - Fix inconsistent placeholder syntax in continuation-format.md canonical template (bare-brace → shell-dollar to match variant examples) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(phase): preserve zero-padded prefix in renameDecimalPhases Captures the zero-padded prefix (e.g. "06" from "06.3-slug") with (0*${baseInt}) so renamed directories keep their original format (06.2-slug) instead of stripping padding (6.2-slug). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Brandon Higgins <brandonscotthiggins@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,22 @@ function withProjectRoot(cwd, result) {
|
||||
if (config.response_language) {
|
||||
result.response_language = config.response_language;
|
||||
}
|
||||
// Inject project identity into all init outputs so handoff blocks
|
||||
// can include project context for cross-session continuity.
|
||||
if (config.project_code) {
|
||||
result.project_code = config.project_code;
|
||||
}
|
||||
// Extract project title from PROJECT.md first H1 heading.
|
||||
const projectMdPath = path.join(planningDir(cwd), 'PROJECT.md');
|
||||
try {
|
||||
if (fs.existsSync(projectMdPath)) {
|
||||
const content = fs.readFileSync(projectMdPath, 'utf8');
|
||||
const h1Match = content.match(/^#\s+(.+)$/m);
|
||||
if (h1Match) {
|
||||
result.project_title = h1Match[1].trim();
|
||||
}
|
||||
}
|
||||
} catch { /* intentionally empty */ }
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user