Commit 35b4a2c
committed
fix(formatters): expand ExecPlans guidance injection
Why
- Align generated AGENTS guidance with the updated ExecPlans, Milestones, and CLI authoring instructions.
- Ensure existing repositories with older ExecPlans wording are upgraded to the new canonical block.
What changed
- Replaced the single-line ExecPlans insertion in clean_agentrules with a canonical multi-section block:
- ExecPlans bullet guidance
- Milestones subsection
- CLI-first creation/archive commands for plans and milestones
- Added required-line detection so idempotence checks validate the full canonical block.
- Added replacement logic to update outdated existing ExecPlans sections under Development Principles.
- Updated and expanded unit tests to cover:
- insertion of the new block
- idempotence when the full block already exists
- replacement of legacy/outdated ExecPlans text
Impact
- AGENTS.md generation now injects the full ExecPlans guidance block requested by policy.
- Existing AGENTS files with legacy ExecPlans wording are automatically normalized on regeneration.
- No user-visible runtime behavior changes outside AGENTS formatting.
Tests
- pytest -q tests/unit/test_clean_agentrules.py
- ruff check src/agentrules/core/utils/formatters/clean_agentrules.py tests/unit/test_clean_agentrules.py
Notes
- None1 parent dce1184 commit 35b4a2c
2 files changed
Lines changed: 123 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
33 | 66 | | |
34 | 67 | | |
35 | 68 | | |
36 | 69 | | |
37 | | - | |
| 70 | + | |
38 | 71 | | |
39 | 72 | | |
40 | 73 | | |
| |||
54 | 87 | | |
55 | 88 | | |
56 | 89 | | |
57 | | - | |
58 | | - | |
| 90 | + | |
59 | 91 | | |
60 | 92 | | |
61 | 93 | | |
| |||
71 | 103 | | |
72 | 104 | | |
73 | 105 | | |
74 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
75 | 109 | | |
76 | 110 | | |
77 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
78 | 135 | | |
79 | 136 | | |
80 | 137 | | |
81 | 138 | | |
82 | 139 | | |
83 | | - | |
| 140 | + | |
84 | 141 | | |
85 | 142 | | |
86 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
31 | 41 | | |
32 | 42 | | |
33 | 43 | | |
| |||
40 | 50 | | |
41 | 51 | | |
42 | 52 | | |
43 | | - | |
44 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
45 | 67 | | |
46 | 68 | | |
47 | 69 | | |
| |||
70 | 92 | | |
71 | 93 | | |
72 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
73 | 128 | | |
74 | 129 | | |
75 | 130 | | |
0 commit comments