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
This ticket addresses the observation that the "ticket-first" mandate within `AGENTS.md` was frequently being bypassed by AI agents. The hypothesis is that once an agent enters a "flow state" for a coding task, it deprioritizes procedural checks.
11
+
12
+
### 2. Goal
13
+
14
+
The goal was to restructure the development workflow in `AGENTS.md` to make the ticket-creation step a non-negotiable "gate" rather than a step in a linear process. This change is intended to align with the AI's natural processing logic and improve compliance.
15
+
16
+
### 3. Changes Implemented
17
+
18
+
- The `## 4. Development Workflow` section was replaced with a new `## 4. Development Workflow: Triage and Gating Protocol`.
19
+
- This new protocol explicitly separates tasks into "Conceptual" and "Actionable".
20
+
- For actionable tasks, it establishes a mandatory "Ticket-First" Gate, stating that no file modification tools can be used until a ticket is created.
21
+
- The important concept of the self-improving knowledge base was preserved and reframed under a new `### The Virtuous Cycle: Enhancing the Knowledge Base` subsection, which logically follows the implementation steps.
22
+
23
+
### 4. Status
24
+
25
+
This task is complete. The changes have been applied to `AGENTS.md`.
Copy file name to clipboardExpand all lines: AGENTS.md
+58-29Lines changed: 58 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,10 @@ At the beginning of every new session, you **MUST** perform the following steps
29
29
- The distinction between class namespaces (e.g., `Neo.component.Base`) and `ntype` shortcuts (e.g., `'button'`).
30
30
31
31
3.**Read the Base Class (`src/core/Base.mjs`):** This is the foundation for all components and classes. Focus on:
32
-
- The `static config` system: **CRITICAL:** You must deeply understand the difference between **reactive configs** (e.g., `myConfig_`), which generate `before/afterSet` hooks and are fundamental to the framework's reactivity, and **non-reactive configs**, which are applied to the prototype. Misinterpreting this is a critical failure. The trailing underscore is the key indicator.
32
+
- The `static config` system: **CRITICAL:** You must deeply understand the difference between **reactive configs**
33
+
(e.g., `myConfig_`), which generate `before/afterSet` hooks and are fundamental to the framework's reactivity,
34
+
and **non-reactive configs**, which are applied to the prototype. Misinterpreting this is a critical failure.
35
+
The trailing underscore is the key indicator.
33
36
- The instance lifecycle: `construct()`, `onConstructed()`, `initAsync()`, and `destroy()`.
34
37
- The reactivity hooks: `beforeGet*`, `beforeSet*`, `afterSet*`.
35
38
@@ -81,24 +84,31 @@ files may lack, it is highly recommended to read the most relevant guide file fr
81
84
the #1 ranked file. A good heuristic is to aim to read the top 1-2 source files and the top 1-2 relevant guides to get
82
85
a balanced understanding.
83
86
84
-
-**Prioritize Content Types:** Always prioritize `guide` and `src` results for implementation details and current best practices. Treat `blog` results as sources for historical and conceptual context; their code examples may be outdated.
87
+
-**Prioritize Content Types:** Always prioritize `guide` and `src` results for implementation details and current best
88
+
practices. Treat `blog` results as sources for historical and conceptual context; their code examples may be outdated.
85
89
86
90
### Query Strategies
87
91
88
92
Do not assume you will get the perfect answer on the first try. Use a systematic approach to querying.
89
93
90
94
#### 1. Strategy for High-Level Conceptual Questions
91
95
92
-
When asked a broad, high-level, or conceptual question (e.g., "what makes this framework stand out?"), you must use a more guided approach to find the most important "pillar content".
96
+
When asked a broad, high-level, or conceptual question (e.g., "what makes this framework stand out?"), you must use a
97
+
more guided approach to find the most important "pillar content".
93
98
94
-
1.**Consult the Information Architecture:** Before formulating a query, read the file `learn/tree.json`. This file defines the intended structure of the learning content.
95
-
2.**Identify Key Concepts:** Use the top-level categories in the tree (e.g., "Benefits", "Fundamentals") to identify the most important concepts.
96
-
3.**Formulate Initial Query:** Base your first query on these high-level concepts to ensure you start your exploration from the project's intended information architecture.
99
+
1.**Consult the Information Architecture:** Before formulating a query, read the file `learn/tree.json`.
100
+
This file defines the intended structure of the learning content.
101
+
2.**Identify Key Concepts:** Use the top-level categories in the tree (e.g., "Benefits", "Fundamentals") to identify
102
+
the most important concepts.
103
+
3.**Formulate Initial Query:** Base your first query on these high-level concepts to ensure you start your exploration
104
+
from the project's intended information architecture.
97
105
98
106
#### 2. Discovery Pattern (Broad to Narrow)
99
107
100
108
When you need to understand a new concept or feature area:
101
-
1.**Query Foundational Concepts First:** Always begin a broad inquiry by querying for foundational terms like `"benefits"`, `"concept"`, `"architecture"`, and `"vision"`. Prioritize reading files from the `learn/benefits` directory or top-level `README.md` and `.github/*.md` files if they appear in these initial results.
109
+
1.**Query Foundational Concepts First:** Always begin a broad inquiry by querying for foundational terms like
110
+
`"benefits"`, `"concept"`, `"architecture"`, and `"vision"`. Prioritize reading files from the `learn/benefits`
111
+
directory or top-level `README.md` and `.github/*.md` files if they appear in these initial results.
102
112
2.**Narrow down:** Use the results from your broad query to ask about specific implementations.
103
113
-`npm run ai:query -- -q "Button component examples"`
104
114
-`npm run ai:query -- -q "what is Neo.component.Base?"`
@@ -211,39 +221,58 @@ keywords based on the knowledge you've gathered from reading the core files.
211
221
If the `npm run ai:query` command itself fails or throws an error, consult the setup guide at `.github/AI_QUICK_START.md`
212
222
to ensure the environment is configured correctly and the knowledge base is properly built.
213
223
214
-
## 4. Development Workflow
224
+
## 4. Development Workflow: Triage and Gating Protocol
215
225
216
-
Integrate the query tool and the ticketing system into your development process.
226
+
You **MUST** follow this protocol for every user request to ensure work is tracked and context is maintained.
217
227
218
-
1.**Understand the Task & Identify Intent:** When a new request is received, first determine the user's intent.
219
-
-**Conceptual/Informational:** Is the user asking for an explanation, brainstorming ideas, or asking a question that does not involve changing files? (e.g., "How does reactivity work?", "Should we move these files?"). If so, proceed directly to answering the query. No ticket is needed.
220
-
-**Actionable/Modification:** Does the user's request require creating, deleting, or modifying files in the repository? (e.g., "Fix this bug," "Add JSDoc to this file," "Create a new release"). If so, proceed to the next step.
221
-
-**Note:** A conceptual discussion can often lead to an actionable task. When the conversation shifts from "what if we..." to "let's do...", you must treat this as a new actionable request and follow the ticket-first mandate before proceeding.
228
+
### Step 1: Triage the Request
222
229
223
-
2.**Ensure a Ticket Exists (Ticket-First Mandate):**
224
-
- For any modification task, check if the request is already associated with an existing ticket file in `.github/ISSUE/`.
225
-
- If not, your first action **MUST** be to create one. The ticket should summarize the task, its scope, and the goal. Inform the user that you are creating the ticket to track the work, following the process defined in `.github/TICKET_STRATEGY.md`.
230
+
First, classify the user's request into one of two categories:
226
231
227
-
3.**Query & Analyze:** With a ticket now in place, use the **Discovery Pattern** to understand the context and find relevant files. When reading, focus on understanding the existing class structure, method signatures, configuration patterns, and overall architecture. **If you encounter source code lacking intent-driven comments, apply the "Knowledge Base Enhancement Strategy" to add meaningful documentation before proceeding.** Your goal is to make your changes fit in seamlessly.
232
+
-**A) Conceptual/Informational:** The user is asking a question, seeking an explanation, or brainstorming.
233
+
No files will be created, modified, or deleted.
234
+
-**Action:** Proceed directly to using the knowledge base and other tools to answer the user's query. **No ticket is required.**
228
235
229
-
4.**Implement Changes:** Write or modify the code, strictly adhering to the conventions you observed.
236
+
-**B) Actionable/Modification:** The user's request requires creating, deleting, or modifying files in the repository
237
+
(e.g., "Fix this bug," "Add JSDoc," "Create a release").
238
+
-**Action:** Proceed to **Step 2**.
230
239
231
-
5.**Verify:** After making changes, run any relevant verification tools, such as tests, to ensure your changes are correct and meet the project's standards. For bug fixes, ensure you've created regression tests (see `learn/guides/UnitTestingWithSiesta.md` for guidance).
240
+
**Note:** A conceptual discussion can become an actionable task. The moment the intent shifts from "what if..." to
241
+
"let's do...", you must treat it as a new actionable request and start this protocol from Step 1.
232
242
233
-
6.**Use `text` over `html` in VDOM:** When creating VDOM nodes, always prefer using the `text` property over the `html`
243
+
### Step 2: The "Ticket-First" Gate
234
244
235
-
## This Changes the Workflow
245
+
For any **Actionable/Modification** request, a ticket is mandatory. This is a non-negotiable gate.
236
246
237
-
The enhanced workflow becomes:
247
+
1.**Check for an Existing Ticket:** Does the request reference an existing ticket file in `.github/ISSUE/`?
248
+
2.**Create a New Ticket:** If no ticket exists, your immediate next action **MUST** be to create one.
249
+
- Inform the user: "This is an actionable request. I will create a ticket to track this work, as per our workflow."
250
+
- Follow the process in `.github/TICKET_STRATEGY.md` to create the ticket file.
238
251
239
-
1.**Query for understanding** (as before)
240
-
2.**Read available documentation**
241
-
3.**If source lacks context**: Analyze the code and **add meaningful comments**
242
-
4.**Implement your changes** with the new understanding
243
-
5.**The knowledge base gets richer** for the next session
252
+
**CRITICAL:** You are not permitted to use any file modification tools (`replace`, `write_file`) or run any
253
+
file-system-altering shell commands until a ticket has been created and acknowledged.
244
254
245
-
This approach transforms the AI agent from just a consumer of documentation to a **contributor** to the project's
246
-
long-term maintainability.
255
+
### Step 3: The Implementation Loop
256
+
257
+
Once you have passed the "Ticket-First" Gate, you may proceed with the task.
258
+
259
+
1.**Query & Analyze:** Use the **Discovery Pattern** to understand the context. If you find source code lacking
260
+
intent-driven comments, apply the **Knowledge Base Enhancement Strategy** to add them *before* implementing your main changes.
261
+
2.**Implement Changes:** Write or modify code, adhering to project conventions.
262
+
3.**Verify:** Run tests and other verification tools to confirm your changes are correct.
263
+
264
+
### The Virtuous Cycle: Enhancing the Knowledge Base
265
+
266
+
The Implementation Loop creates a virtuous cycle that continuously improves the project's knowledge base:
267
+
268
+
1.**Query for understanding** (as before).
269
+
2.**Read available documentation**.
270
+
3.**If source lacks context**: Analyze the code and **add meaningful, intent-driven comments**.
271
+
4.**Implement your changes** with the new, deeper understanding.
272
+
5.**The knowledge base gets richer**, making the next query more effective.
273
+
274
+
This approach transforms the AI agent from just a consumer of documentation to a **contributor**
0 commit comments