You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCAF is an open framework built by developers who believe AI coding agents need structure, not just prompts.
3
+
MCAF is an open framework built by developers who believe AI coding agents need structure, not just prompts.
4
4
This page recognizes the people who made it happen.
5
5
6
6
## Contributors
7
7
8
-
-[Managed Code](https://www.managed-code.com) — Framework design and development
8
+
-<ahref="https://www.managed-code.com"target="_blank">Managed Code</a> — Framework design and development
9
9
10
10
## Special Thanks
11
11
12
-
-**[Roger Johansson](https://www.linkedin.com/in/roger-johansson-4a4bb61/)** — His post about self-learning code agents inspired the self-learning logic that became the core of MCAF
12
+
-**<ahref="https://www.linkedin.com/in/roger-johansson-4a4bb61/"target="_blank">Roger Johansson</a>** — His post about self-learning code agents inspired the self-learning logic that became the core of MCAF
13
13
14
14
---
15
15
16
-
*Want to contribute? Open a PR or issue on [GitHub](https://github.com/managedcode/MCAF).*
16
+
*Want to contribute? Open a PR or issue on <ahref="https://github.com/managedcode/MCAF"target="_blank">GitHub</a>.*
Copy file name to clipboardExpand all lines: README.md
+63-10Lines changed: 63 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,10 +146,26 @@ MCAF uses several levels of tests:
146
146
147
147
Coverage expectations:
148
148
149
-
- Each significant feature or functional behaviour has at least one integration-level test for its core flow.
150
-
- If behaviour is exposed via API, there is at least one API test for it.
151
-
- If behaviour is visible to users through UI, there is at least one UI/E2E test for it.
152
-
- Unit tests are added when internal logic is complex, critical, or performance-sensitive.
149
+
- Each significant feature or functional behaviour has sufficient tests to cover its possible cases; at minimum, one integration-level test for the core flow.
150
+
- If behaviour is exposed via API, each public endpoint has at least one API test; complex endpoints have tests for different input variations and error conditions.
151
+
- API and integration tests must exercise real flows end-to-end, not just call endpoints in isolation; tests verify that components work together correctly.
152
+
- If behaviour is visible to users through UI, there is at least one UI/E2E test for it; critical user flows have tests for main and alternative paths.
153
+
- Unit tests are added when internal logic is complex, critical, or performance-sensitive.
154
+
- The goal is not "one test per feature" but "enough tests to have confidence in the behaviour"; one is the minimum, not the target.
155
+
156
+
Code coverage:
157
+
158
+
- Code coverage is measured and tracked to see which functionality is actually tested.
159
+
- Coverage reports show which functions, branches, and flows are exercised by tests — and which are not.
160
+
- Coverage reports are generated as part of CI or on demand.
161
+
- Low coverage in critical modules triggers review and test planning.
162
+
- Coverage is a tool for finding gaps, not a target to game; 100% coverage with weak assertions is worse than 70% coverage with meaningful tests.
163
+
164
+
Test quality:
165
+
166
+
- Each test verifies a real flow or scenario, not just that a function can be called.
167
+
- Tests without meaningful assertions are forbidden; a test that only calls code without verifying outcomes is not a valid test.
168
+
- Tests check behaviour and outcomes, not implementation details.
153
169
154
170
Tests cover:
155
171
@@ -283,12 +299,30 @@ In large repositories, directories may have their own `AGENTS.md` files. They:
283
299
- add stricter requirements without contradicting MCAF principles
284
300
- apply to files in that directory and its subdirectories
285
301
286
-
### 4.6 Hard rules for Instructions
302
+
### 4.6 AGENTS.md governance
303
+
304
+
`AGENTS.md` is a critical document that shapes how AI agents work in the repository. Changes to it affect all future AI-assisted development.
305
+
306
+
Change approval:
307
+
308
+
- Changes to the root `AGENTS.md` require review and approval by a designated owner or lead maintainer.
309
+
- The owner of `AGENTS.md` is defined in the document itself or in `CODEOWNERS`.
310
+
- AI agents may propose changes to `AGENTS.md`, but humans approve and merge them.
311
+
- Significant rule changes are discussed with the team before merging.
312
+
313
+
Review criteria for `AGENTS.md` changes:
314
+
315
+
- The change aligns with MCAF principles.
316
+
- The rule is clear and actionable.
317
+
- The rule does not contradict existing rules without explicit replacement.
318
+
- The rule reflects a stable pattern, not a one-time preference.
287
319
288
-
- Every repository that uses MCAF has a root `AGENTS.md`.
289
-
- Root `AGENTS.md` is in English and aligned with this Guide.
290
-
- Agents read `AGENTS.md` and relevant docs before editing code.
291
-
- Stable patterns and lessons are recorded in `AGENTS.md` or docs; chat alone is not memory.
320
+
### 4.7 Hard rules for Instructions
321
+
322
+
- Every repository that uses MCAF has a root `AGENTS.md`.
323
+
- Root `AGENTS.md` is in English and aligned with this Guide.
324
+
- Agents read `AGENTS.md` and relevant docs before editing code.
325
+
- Stable patterns and lessons are recorded in `AGENTS.md` or docs; chat alone is not memory.
292
326
- Automation and agent instructions rely only on documented `build`, `test`, `format`, and `analyze` commands.
293
327
294
328
---
@@ -573,4 +607,23 @@ To adopt MCAF in a repository:
573
607
- updated docs and `AGENTS.md`
574
608
- human review and merge
575
609
576
-
MCAF is considered active only when these practices are followed in day-to-day work, not just written down.
610
+
MCAF is considered active only when these practices are followed in day-to-day work, not just written down.
611
+
612
+
---
613
+
614
+
## 10. Ownership and Process
615
+
616
+
### 10.1 Ownership
617
+
618
+
Every significant feature, document, and decision has an accountable owner:
619
+
620
+
- Feature docs — owned by the feature owner (Product perspective).
621
+
- ADRs — owned by the person who made the decision.
622
+
- Test docs — owned by QA or the feature owner.
623
+
-`AGENTS.md` — see governance rules in section 4.6.
624
+
625
+
### 10.2 Process
626
+
627
+
-**Onboarding**: New team members read this Guide, the root `AGENTS.md`, and key docs before making changes.
628
+
-**Regular review**: The team periodically reviews `AGENTS.md` and docs to ensure they reflect current practices.
629
+
-**Feedback loops**: Issues with AI agent behaviour are tracked and lead to `AGENTS.md` or doc updates, not repeated chat corrections.
Learn the user's habits, preferences, and working style. Extract rules from conversations, save to "## Rules to follow", and generate code according to the user's personal rules.
13
13
14
+
**Update requirement (core mechanism):**
15
+
16
+
Before doing ANY task, evaluate the latest user message.
17
+
If you detect a new rule, correction, preference, or change → update `agents.md` first.
18
+
Only after updating the file you may produce the task output.
19
+
If no new rule is detected → do not update the file.
20
+
14
21
**When to extract rules:**
15
22
16
23
- prohibition words (never, don't, stop, avoid) or similar → add NEVER rule
@@ -73,6 +80,7 @@ Learn the user's habits, preferences, and working style. Extract rules from conv
73
80
- Run tests in layers: new → related suite → broader regressions
74
81
- After all tests pass: run format, then build
75
82
- Summarize changes and test results before marking complete
83
+
- Always run required builds and tests yourself; do not ask the user to execute them (explicit user directive).
76
84
77
85
### Documentation (ALL TASKS)
78
86
@@ -87,11 +95,15 @@ Learn the user's habits, preferences, and working style. Extract rules from conv
87
95
88
96
<!-- CUSTOMIZE (remove after): your test structure -->
89
97
90
-
- Every behaviour change needs automated tests
98
+
- Every behaviour change needs sufficient automated tests to cover its cases; one is the minimum, not the target
99
+
- Each public API endpoint has at least one test; complex endpoints have tests for different inputs and errors
100
+
- Integration tests must exercise real flows end-to-end, not just call endpoints in isolation
91
101
- Prefer integration/API/UI tests over unit tests
92
102
- No mocks for internal systems (DB, queues, caches) — use containers
93
103
- Mocks only for external third-party systems
94
104
- Never delete or weaken a test to make it pass
105
+
- Each test verifies a real flow or scenario, not just calls a function — tests without meaningful assertions are forbidden
106
+
- Check code coverage to see which functionality is actually tested; coverage is for finding gaps, not a number to chase
0 commit comments