* fix(#2376): emit absolute subagent-facing init/state paths Make init.* and state.* path fields absolute rather than cwd-relative so subagent prompts resolve correctly regardless of working directory. Adds intel_dir/conflicts_path/requirements_path/roadmap_path/state_path to cmdInitIngestDocs, an absolute debug_dir to cmdStateLoad, and replaces bare .planning/... literals in 12 workflow Agent() prompt blocks with the absolute init-JSON path fields. Includes decoy-cwd regression tests and realpath'd tmpdir fixtures for macOS. Squashed rebase of the #2376 commit series onto a fresh origin/next (previous merge ee25543a1 was against a now-stale next). * chore(#2376): add changeset * chore(#2376): regenerate golden fixtures + workflow size baseline Regenerated after rebasing the absolute-path fix onto current next (picks up #2351's run-with-timeout content in execute-phase.md too). * fix(#2376): trim execute-phase.md redundancy to stay under the size margin * chore(#2376): regenerate golden/size baseline after rebase onto next
This commit is contained in:
@@ -20,7 +20,7 @@ const { escapeRegex, normalizePhaseName, extractPhaseToken, parsePhaseFromProse,
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
import roadmapParserMod = require('./roadmap-parser.cjs');
|
||||
const { getMilestoneInfo, getMilestonePhaseFilter, extractCurrentMilestone } = roadmapParserMod;
|
||||
import { platformWriteSync, platformReadSync, platformEnsureDir, retryRenameSync } from './shell-command-projection.cjs';
|
||||
import { platformWriteSync, platformReadSync, platformEnsureDir, retryRenameSync, toPosixPath } from './shell-command-projection.cjs';
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
import planningWorkspace = require('./planning-workspace.cjs');
|
||||
const { planningDir, planningPaths } = planningWorkspace;
|
||||
@@ -308,6 +308,12 @@ function cmdStateLoad(cwd: string, raw: boolean): void {
|
||||
state_exists: stateExists,
|
||||
roadmap_exists: roadmapExists,
|
||||
config_exists: configExists,
|
||||
// #2376: absolute (anchored on cwd), not orchestrator-cwd-relative — a
|
||||
// spawned subagent's own cwd may differ from the orchestrator's.
|
||||
// debug.md has no init.* call of its own; it reads this field from
|
||||
// `state load` to build debug_file_path for its gsd-debug-session-manager
|
||||
// spawns instead of hardcoding '.planning/debug/{slug}.md'.
|
||||
debug_dir: toPosixPath(path.join(planDir, 'debug')),
|
||||
};
|
||||
|
||||
// For --raw, output a condensed key=value format
|
||||
|
||||
Reference in New Issue
Block a user