diff options
| author | Morgan Lunt <morganl@anthropic.com> | 2026-09-23 19:01:51 -0700 |
|---|---|---|
| committer | Morgan Lunt <morganl@anthropic.com> | 2026-09-24 17:49:55 -0700 |
| commit | ffa01ef52f175dfe3abe19171f4714fe496082db (patch) | |
| tree | 7a6dc62f83196b25ab1a472f042eaad7f176ffb5 /plugins/code-modernization | |
| parent | 08bf451b72fb386f47dae959c35294e7d89164b4 (diff) | |
code-modernization: keep RULE-NNN headings and the rule-render script
A run numbered rules with domain-coded ids (BR-D7 and similar), which
broke the tools that find rules by their RULE-NNN heading. The Rule Card
section now says the heading is exactly that form, numbered
sequentially.
The script that renders BUSINESS_RULES.md and DATA_OBJECTS.md from the
workflow result was being written to /tmp, so the documents could not be
regenerated. It is now saved as analysis/<system>/render_rules.py, next
to the result it reads.
Diffstat (limited to 'plugins/code-modernization')
| -rw-r--r-- | plugins/code-modernization/commands/modernize-extract-rules.md | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/code-modernization/commands/modernize-extract-rules.md b/plugins/code-modernization/commands/modernize-extract-rules.md index 8e5afa74..6efcdf40 100644 --- a/plugins/code-modernization/commands/modernize-extract-rules.md +++ b/plugins/code-modernization/commands/modernize-extract-rules.md @@ -187,8 +187,11 @@ Cards, de-duplicating by `source` + name). ### 4. Render When it returns, **you** write the artifacts from the structured result — -the extraction agents are read-only by design (see "Untrusted code" in the -plugin README); nothing they produced touches disk until this step: +the extraction agents are read-only by design (see "Safety notes" in the +plugin README); nothing they produced touches disk until this step. Save the +result as `analysis/$system/rules_result.json` and write one script, +`analysis/$system/render_rules.py` (never `/tmp`), that reads it, so the +documents can be regenerated: 1. Render every entry in `confirmedRules` as a Rule Card (exact format below) into `analysis/$system/BUSINESS_RULES.md`, grouped by category, with the @@ -262,6 +265,10 @@ For each distinct rule, write a **Rule Card** in this exact format (in **Source* **Confidence:** High | Medium | Low — <why; if < High, state the exact SME question> ``` +The heading is exactly `### RULE-NNN: <name>`, numbered sequentially +(`RULE-001`, `RULE-002`, …) — never domain-coded ids such as `BR-D7`: later +commands and tools find rules by that pattern. + Priority heuristic — default to **P1**. Assign **P0** if the rule moves money, enforces a regulatory/compliance requirement, or guards data integrity (and flag P0 rules at <High confidence as SME-required). Assign **P2** for |
