feat(athena): structured synthesis header + audit cross-check flow

Add universal YAML front-matter header to all synthesis.md outputs (council,
question, date, members, session_ids, mode, intent, responded count).

AUDIT: structured finding format with required fields (severity, confidence,
members reported, evidence, impact, fix direction). New cross-check flow asks
user to verify minority/solo findings via a second council round before
proceeding to findings processing.

Also fix prompt-file cleanup: skip cleanupPromptFile when movePromptFile
already succeeded.
This commit is contained in:
ismeth
2026-03-14 20:09:28 +01:00
committed by YeonGyu-Kim
parent 974eb8e176
commit 44b3efe7a3
3 changed files with 64 additions and 13 deletions
@@ -144,8 +144,12 @@ export function createCouncilFinalize(
})
}
let promptFileMoved = false
const relPromptFile = args.prompt_file
? await movePromptFile(args.prompt_file, base, absArchiveDir, relArchiveDir)
? await movePromptFile(args.prompt_file, base, absArchiveDir, relArchiveDir).then((result) => {
promptFileMoved = true
return result
})
: undefined
const relMetaFile = join(relArchiveDir, "meta.yaml")
@@ -164,7 +168,7 @@ export function createCouncilFinalize(
const guidance = buildAthenaRuntimeGuidance(resolvedIntent, resolvedMode)
return JSON.stringify(result, null, 2) + "\n\n" + guidance
} finally {
if (args.prompt_file) {
if (args.prompt_file && !promptFileMoved) {
await cleanupPromptFile(args.prompt_file, base)
}
}