feat: add explicit decision relations to FLG - #44
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 109e39e45d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| end = matches[index + 1].start() if index + 1 < len(matches) else len(content) | ||
| block = content[match.start():end] | ||
| graph[source] = { | ||
| relation: _extract_ids(_relation_value(block, labels)) |
There was a problem hiding this comment.
Report malformed relation values instead of dropping them
When the human-editable ledger contains a mistyped relation such as - **Depends On:** D-99O, _extract_ids returns an empty list, so both flg trace and flg doctor --strict treat the declaration as if no relation existed. Because DECISIONS.md is authoritative and may be edited outside decision add, parsing should preserve or report non-empty malformed relation values rather than silently discarding them.
Useful? React with 👍 / 👎.
Summary
This PR adds a small, file-backed decision relation layer to FLG.
supersedes,supports,conflicts_with, anddepends_onflg decision addflg traceflg doctorWhy
FLG already has durable decision IDs, provenance episodes, and a human-readable ledger. This adds explicit links between judgments without introducing a graph database or a second source of truth.
Design boundaries
DECISIONS.mdremains the source of truth.D-*formal decisions only.derived_fromremain conceptual or evidence-provenance relationships in v0.Example
Validation
git diff --checkpassed