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
Copy file name to clipboardExpand all lines: AGENTS.md
+34-14Lines changed: 34 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,13 @@ This project uses `make` as the primary task runner, backed by `uv` for Python e
12
12
make install
13
13
```
14
14
*(Always recommend `make install` to users. It handles all dependencies, `uv venv`, and setup. NEVER recommend using `pip install` or `uv pip` directly.)*
15
+
-**Sync dependencies**: `make sync`
15
16
-**Start the Plone instance**:
16
17
```bash
17
18
make start
18
19
```
19
20
-**Clean the environment** (without removing data): `make clean`
21
+
-**Remove all content**: `make remove-data`
20
22
-**Create a new site**: `make create-site`
21
23
22
24
### Linting and Formatting
@@ -34,11 +36,11 @@ Tests are written using `pytest` and `plone.app.testing`.
34
36
-**Run tests with coverage**: `make test-coverage`
-**Filenames**: `snake_case` for Python and XML files (except specific Zope configurations like `configure.zcml`or specific profiles like `Plone_Site.xml` which follow Plone's exact casing).
64
+
-**Filenames**: `snake_case` for Python and XML files (except `configure.zcml`/ Plone profiles).
64
65
65
66
### Types & Schema
66
67
- Define Dexterity schemas using `plone.supermodel.model.Schema`.
67
68
- Apply `@implementer(IYourInterface)` to your content type classes.
68
69
- Explicitly subclass `Container` or `Item` from `plone.dexterity.content`.
- Avoid unnecessary type annotations if Zope schemas already enforce types (`zope.schema`).
70
71
71
72
### Error Handling
72
73
- Use standard Python exceptions or `plone.api.exc` (like `InvalidParameterError`) when using `plone.api`.
@@ -75,7 +76,7 @@ Tests are written using `pytest` and `plone.app.testing`.
75
76
76
77
### XML, ZCML, and PT
77
78
-**XML/ZCML**: Keep it strictly formatted with `zpretty`. Indent with 2 spaces.
78
-
-**Page Templates (PT)**: Ensure they are properly formed HTML/XML. Keep logic in the python views, not in the templates.
79
+
-**Page Templates (PT)**: Ensure they are properly formed HTML/XML. Keep logic in python views, not templates.
79
80
80
81
---
81
82
@@ -91,8 +92,7 @@ These rules are strictly enforced for AI agents interacting with this Plone repo
91
92
- If no docs are found, EXPLICITLY STATE: "I cannot find official documentation for this." Trial and error MUST be labeled: "This requires trial and error - not documented."
92
93
93
94
2.**Terminal Commands**
94
-
- Provide ONE step at a time.
95
-
- WAIT for confirmation before moving to the next step.
95
+
- Provide ONE step at a time. WAIT for confirmation before moving to the next step.
96
96
- Include the full command with all parameters.
97
97
- ALWAYS recommend using `make` commands (`make install`, `make start`). NEVER recommend `pip install`, `uv add` or `uv pip` directly.
98
98
@@ -109,8 +109,7 @@ These rules are strictly enforced for AI agents interacting with this Plone repo
109
109
- In README, review the code if necessary to explain features correctly (e.g. use `- Register a behavior providing additional fields representing contact information` instead of just `- Behavior`).
110
110
111
111
5.**Internationalization (i18n)**
112
-
- All UI strings MUST be translatable.
113
-
- Use `cs_dynamicpages` as the i18n domain.
112
+
- All UI strings MUST be translatable. Use `cs_dynamicpages` as the i18n domain.
114
113
- Example: `_(u"My string")` imported from the project's MessageFactory.
115
114
- Run `make i18n` to update `.pot` and `.po` files.
116
115
@@ -125,5 +124,26 @@ These rules are strictly enforced for AI agents interacting with this Plone repo
125
124
- Acknowledge good ideas and creative solutions.
126
125
127
126
8.**Definition of Success**
128
-
- Success is ONLY a fully functional, tested result.
129
-
- Never claim success for partial or broken implementations.
127
+
- Success is ONLY a fully functional, tested result. Never claim success for partial or broken implementations.
128
+
129
+
---
130
+
131
+
## 4. Engram Persistent Memory — Protocol
132
+
133
+
You have access to Engram, a persistent memory system that survives across sessions and compactions.
134
+
135
+
### WHEN TO SAVE (mandatory — not optional)
136
+
Call `mem_save` IMMEDIATELY after any of these:
137
+
- Bug fix completed
138
+
- Architecture or design decision made
139
+
- Non-obvious discovery about the codebase
140
+
- Configuration change or environment setup
141
+
- Pattern established (naming, structure, convention)
142
+
- User preference or constraint learned
143
+
144
+
### WHEN TO SEARCH MEMORY
145
+
- Call `mem_context` — checks recent session history (fast, cheap)
146
+
- If not found, call `mem_search` with relevant keywords (FTS5 full-text search)
147
+
148
+
### SESSION CLOSE PROTOCOL (mandatory)
149
+
Before ending a session, you MUST call `mem_session_summary` using the structured outline (Goal, Instructions, Discoveries, Accomplished, Next Steps, Relevant Files). This is NOT optional.
The text and illustrations in this website are licensed by the Plone Foundation under a [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/) license. Plone and the Plone® logo are registered trademarks of the Plone Foundation, registered in the United States and other countries. For guidelines on the permitted uses of the Plone trademarks, see [https://plone.org/foundation/logo](https://plone.org/foundation/logo). All other trademarks are owned by their respective owners.
0 commit comments