feat(discuss-phase): auto-generate DISCUSSION-LOG.md for audit trail (#1209)

- Generate {phase_num}-DISCUSSION-LOG.md alongside CONTEXT.md during
  discuss-phase sessions
- Log captures all options presented per gray area (not just the
  selected one), user's choice, notes, Claude's discretion items,
  and deferred ideas
- File is explicitly marked as audit-only — not for agent consumption
- Add discussion-log.md template with format specification
- Track Q&A data accumulation instruction in discuss_areas step
- Commit discussion log alongside CONTEXT.md in same git commit
- Add regression tests for workflow reference and template existence
This commit is contained in:
Tom Boucher
2026-03-19 09:21:01 -04:00
parent 342ca5929d
commit 61d82dc3c0
3 changed files with 152 additions and 2 deletions

View File

@@ -181,3 +181,34 @@ describe('AGENT: required frontmatter fields', () => {
});
}
});
// ─── Discussion Log ──────────────────────────────────────────────────────────
describe('DISCUSS: discussion log generation', () => {
test('discuss-phase workflow references DISCUSSION-LOG.md generation', () => {
const content = fs.readFileSync(
path.join(WORKFLOWS_DIR, 'discuss-phase.md'), 'utf-8'
);
assert.ok(
content.includes('DISCUSSION-LOG.md'),
'discuss-phase must reference DISCUSSION-LOG.md generation'
);
assert.ok(
content.includes('Audit trail only'),
'discuss-phase must mark discussion log as audit-only'
);
});
test('discussion-log template exists', () => {
const templatePath = path.join(__dirname, '..', 'get-shit-done', 'templates', 'discussion-log.md');
assert.ok(
fs.existsSync(templatePath),
'discussion-log.md template must exist'
);
const content = fs.readFileSync(templatePath, 'utf-8');
assert.ok(
content.includes('Do not use as input to planning'),
'template must contain audit-only notice'
);
});
});