Skip to content

Commit ef060e8

Browse files
committed
updates
1 parent 6ddfa15 commit ef060e8

4 files changed

Lines changed: 85 additions & 20 deletions

File tree

.github/workflows/jekyll-gh-pages.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ jobs:
3030
id: changes
3131
run: |
3232
git fetch origin main --depth=2
33-
# Get files changed, excluding github-pages/ and .github/
34-
CONTENT_CHANGES=$(git diff --name-only HEAD~1 HEAD 2>/dev/null | grep -vE '^(github-pages/|\.github/|$)' || true)
35-
# Release only if there are content changes
33+
# Only these files trigger a release (actual documentation)
34+
CONTENT_CHANGES=$(git diff --name-only HEAD~1 HEAD 2>/dev/null | grep -E '^(README\.md|TUTORIAL\.md|CREDITS\.md|docs/)' || true)
35+
# Release only if there are documentation changes
3636
if [ -n "$CONTENT_CHANGES" ]; then
37-
echo "Content changes detected:"
37+
echo "Documentation changes detected:"
3838
echo "$CONTENT_CHANGES"
3939
echo "release=true" >> $GITHUB_OUTPUT
4040
else
41-
echo "No content changes, skipping release"
41+
echo "No documentation changes, skipping release"
4242
echo "release=false" >> $GITHUB_OUTPUT
4343
fi
4444

CREDITS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Credits
22

3-
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.
44
This page recognizes the people who made it happen.
55

66
## Contributors
77

8-
- [Managed Code](https://www.managed-code.com) — Framework design and development
8+
- <a href="https://www.managed-code.com" target="_blank">Managed Code</a> — Framework design and development
99

1010
## Special Thanks
1111

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+
- **<a href="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
1313

1414
---
1515

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 <a href="https://github.com/managedcode/MCAF" target="_blank">GitHub</a>.*

README.md

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,26 @@ MCAF uses several levels of tests:
146146

147147
Coverage expectations:
148148

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.
153169

154170
Tests cover:
155171

@@ -283,12 +299,30 @@ In large repositories, directories may have their own `AGENTS.md` files. They:
283299
- add stricter requirements without contradicting MCAF principles
284300
- apply to files in that directory and its subdirectories
285301

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.
287319

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.
292326
- Automation and agent instructions rely only on documented `build`, `test`, `format`, and `analyze` commands.
293327

294328
---
@@ -573,4 +607,23 @@ To adopt MCAF in a repository:
573607
- updated docs and `AGENTS.md`
574608
- human review and merge
575609

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.

docs/templates/AGENTS.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ Follows [MCAF](https://mcaf.managed-code.com/)
1111

1212
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.
1313

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+
1421
**When to extract rules:**
1522

1623
- 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
7380
- Run tests in layers: new → related suite → broader regressions
7481
- After all tests pass: run format, then build
7582
- 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).
7684

7785
### Documentation (ALL TASKS)
7886

@@ -87,11 +95,15 @@ Learn the user's habits, preferences, and working style. Extract rules from conv
8795

8896
<!-- CUSTOMIZE (remove after): your test structure -->
8997

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
91101
- Prefer integration/API/UI tests over unit tests
92102
- No mocks for internal systems (DB, queues, caches) — use containers
93103
- Mocks only for external third-party systems
94104
- 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
95107

96108
### Autonomy
97109

0 commit comments

Comments
 (0)