feat: store discussion prose in Markdown bodies
Add versioned Markdown discussion documents with legacy YAML reading and explicit migration that backs up originals and preserves semantic history. Render readable discussion and decision prose in Markdown context, document compatibility, and extend native smoke coverage for migration. Validated with 29 passing tests, macOS ARM64 native smoke, and context-preserving migration of the Zelda pilot Work.
This commit is contained in:
@@ -30,7 +30,21 @@ aie_without_git work create 'Continue application' --goal 'Preserve local contex
|
||||
aie_without_git discussion add WRK-0001 --text 'No repository is required' > discussion.yaml
|
||||
aie_without_git artifact add WRK-0001 --file main.txt --purpose 'Initial source evidence' > artifact.yaml
|
||||
aie_without_git decision draft WRK-0001 --title 'Pilot the protocol' --evidence ART-0001 > decision.yaml
|
||||
# Exercise compatibility/migration using an exact legacy representation of this entry.
|
||||
aie_discussion=.ai-engineering/works/WRK-0001-continue-application/discussions/DSC-0001.md
|
||||
grep -q 'documentVersion: 2' "$aie_discussion"
|
||||
awk '
|
||||
/^---$/ { delimiters++; if (delimiters == 2) { print "text: \"No repository is required\""; print "---"; exit } }
|
||||
/documentVersion:/ { next }
|
||||
{ print }
|
||||
' "$aie_discussion" > legacy.md
|
||||
cp legacy.md "$aie_discussion"
|
||||
aie_without_git work context WRK-0001 --format json > before.json
|
||||
aie_without_git discussion migrate WRK-0001 --format json > migration.json
|
||||
grep -q '"converted" : 1' migration.json
|
||||
grep -q 'documentVersion: 2' "$aie_discussion"
|
||||
aie_without_git discussion migrate WRK-0001 --format json > repeated-migration.json
|
||||
grep -q '"converted" : 0' repeated-migration.json
|
||||
mkdir src
|
||||
cd src
|
||||
aie_without_git work context WRK-0001 --format json > ../after.json
|
||||
|
||||
Reference in New Issue
Block a user