Skip to content

Commit 998c230

Browse files
Updated readme and added TDD features
updated /.context/README.md file to accurately reflect the current directory structure and include information about the new TDD integration.
1 parent f052ea5 commit 998c230

File tree

4 files changed

+129
-8
lines changed

4 files changed

+129
-8
lines changed

.context/AI_INSTRUCTIONS.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Comprehensive implementation guide for the Aegis framework, containing detailed
3939
- Target state allowed
4040
- Dependencies met
4141
- Progress tracked
42+
- Test status appropriate
4243

4344
3. **Memory Validation**
4445
- Front matter valid
@@ -82,6 +83,8 @@ Comprehensive implementation guide for the Aegis framework, containing detailed
8283
- [ ] Validate the current task state
8384
- [ ] Perform the requested task operation
8485
- [ ] Update the task document
86+
- [ ] Verify test status when completing a task
87+
- [ ] Prompt for confirmation if test status is not "Passing" or "Not Applicable"
8588
- [ ] Update project.json with task changes
8689
- [ ] Update timestamps to current time
8790
- [ ] Verify all files have been properly updated
@@ -151,6 +154,7 @@ Comprehensive implementation guide for the Aegis framework, containing detailed
151154
- Dependencies noted
152155
- Status updated
153156
- Next steps defined
157+
- Test status managed
154158

155159
2. Directory Structure
156160
```
@@ -195,6 +199,33 @@ Comprehensive implementation guide for the Aegis framework, containing detailed
195199
- Include test files only when the task directly involves testing
196200
- For framework tasks, include only the specific framework files being modified
197201

202+
4. Test-Driven Development Integration
203+
- Purpose: Support TDD workflow within the framework
204+
- Implementation:
205+
- Each task includes a "Test Status" section
206+
- Valid statuses: Not Started, Failing, Passing, Not Applicable
207+
- "Not Started": Tests haven't been written yet, or testing has not begun
208+
- "Failing": Tests exist but are failing (implementation incomplete/incorrect)
209+
- "Passing": All tests are passing (implementation complete and correct)
210+
- "Not Applicable": Task doesn't require tests (documentation, planning, etc.)
211+
- Related test files are tracked with brief descriptions
212+
- Task Completion Logic:
213+
- When test status is "Passing", task can be completed normally
214+
- When test status is "Failing", prompt user for confirmation before completing
215+
- When test status is "Not Applicable", task can be completed normally
216+
- When test status is "Not Started", prompt user for confirmation before completing
217+
- Status Management:
218+
- Update test status when test files are created or modified
219+
- Set initial status to "Not Started" for tasks involving implementation
220+
- Set initial status to "Not Applicable" for tasks not requiring tests (e.g., documentation)
221+
- Track test files path and descriptions in the task document
222+
- Best Practices:
223+
- Always update test status when related tests are created or modified
224+
- Include comments or documentation about test requirements
225+
- Link to specific test files in the task document
226+
- Explain why a task is marked as "Not Applicable" when applicable
227+
- For TDD workflow: tests should transition from "Not Started" → "Failing" → "Passing"
228+
198229
## Memory System
199230

200231
### Memory Types
@@ -619,4 +650,27 @@ If you detect inconsistencies between state files and the actual system:
619650
1. Prioritize the actual system state (files in directories) as the source of truth
620651
2. Update state files to match the actual system state
621652
3. Document the reconciliation in your response to the user
622-
4. Suggest preventive measures to avoid future inconsistencies
653+
4. Suggest preventive measures to avoid future inconsistencies
654+
655+
### TaskTemplate
656+
"FrontMatter": [
657+
"title, type=task",
658+
"status=[planned|active|completed|hold]",
659+
"created=YYYY-MM-DDTHH:MM:SS",
660+
"updated=YYYY-MM-DDTHH:MM:SS",
661+
"id=TASK-XXX",
662+
"priority=[high|medium|low]",
663+
"memory_types=[procedural|semantic|episodic]",
664+
"dependencies, tags"
665+
]
666+
},
667+
"RequiredTaskSections": [
668+
"Description",
669+
"Objectives",
670+
"Steps",
671+
"Progress",
672+
"Dependencies",
673+
"Test Status",
674+
"Notes",
675+
"Next Steps"
676+
],

.context/README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,30 @@ This directory contains the core Aegis framework implementation. Each subdirecto
44

55
## Directory Structure
66

7+
### ai/
8+
Contains AI assistant operations and patterns:
9+
- `operations/`: Operation patterns and command implementation YAML files
10+
711
### memory/
812
Stores framework and project memory in a structured, file-based system:
913
- `core/`: Framework knowledge and operation patterns
1014
- `project/`: Project-specific memory and state
15+
- `context/`: Project context data
16+
- `self_improvement.json`: Self-improvement metrics and recommendations
1117
- `session/`: Temporary session state and context
18+
- Documentation files:
19+
- `SELF_IMPROVEMENT.md`: Documentation for the self-improvement system
20+
- `STRUCTURE.md`, `REFERENCES.md`, `STATE_TRACKING.md`, etc.
1221

1322
### templates/
1423
Contains document templates for maintaining consistency:
1524
- `tasks/`: Task definition templates
1625
- `sessions/`: Session record templates
1726
- `decisions/`: Decision record templates
1827

19-
### operations/
20-
Stores operation patterns and command implementations:
21-
- `core/`: Core command implementations and patterns
28+
### plan/
29+
Stores planning documents and resources:
30+
- `planning_document.md`: Current project plan
2231

2332
### tasks/
2433
Manages tasks through their lifecycle:
@@ -27,6 +36,23 @@ Manages tasks through their lifecycle:
2736
- `hold/`: Tasks waiting on dependencies
2837
- `completed/`: Finished tasks
2938

39+
### sessions/
40+
Stores session records and progress:
41+
- Files named by date: `YYYY-MM-DD.md`
42+
43+
### decisions/
44+
Stores important decision records:
45+
- Files named by ID: `DECISION-XXX.md`
46+
47+
## Key Files
48+
- `AI_INSTRUCTIONS.md`: Comprehensive framework instructions for the AI assistant
49+
50+
## TDD Integration
51+
The framework now supports Test-Driven Development with:
52+
- Test Status tracking in task documents
53+
- Conditional task completion based on test status
54+
- Support for test statuses: Not Started, Failing, Passing, Not Applicable
55+
3056
## Usage
3157
1. Copy this `.context` directory to your project root
3258
2. Initialize with `/aegis start`

.context/ai/operations/task.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ command_template:
233233
implementation: |
234234
1. For create: Copy template and create new task file
235235
2. For start: Move task from planned to active
236-
3. For complete: Move task from active to completed
236+
3. For complete:
237+
- Check Test Status section value
238+
- If status is "Passing" or "Not Applicable", proceed normally
239+
- If status is "Failing" or "Not Started", prompt user for confirmation
240+
- Only after confirmation or if status is acceptable, move task from active to completed
237241
4. For hold: Move task from active to hold
238242
239243
- task_update:

.context/ai/operations/task_transition.yaml

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,25 @@ flow:
2323
- target_state: {type: state_valid}
2424
- transition: {type: allowed_transition}
2525

26-
2_update_task:
26+
2_check_test_status:
27+
action: check_test_status
28+
condition: ${operation} == "complete"
29+
checks:
30+
- test_status_section: {type: section_exists, section: "Test Status", error: "Test Status section not found"}
31+
- test_status: {type: extract_value, pattern: "Status: ([\\w\\s]+)", section: "Test Status", error: "Test status not found"}
32+
responses:
33+
- condition: ${test_status} == "Passing" || ${test_status} == "Not Applicable"
34+
action: proceed
35+
- condition: ${test_status} == "Failing" || ${test_status} == "Not Started"
36+
action: user_prompt
37+
message: "Warning: Task has test status '${test_status}'. Do you want to complete it anyway? (yes/no)"
38+
responses:
39+
- yes: proceed
40+
- no: abort
41+
validate:
42+
- status_valid: {error: "Invalid test status value"}
43+
44+
3_update_task:
2745
action: update_frontmatter
2846
updates:
2947
- field: status
@@ -35,7 +53,7 @@ flow:
3553
validate:
3654
- timestamps: {error: "Invalid timestamps"}
3755

38-
3_move_file:
56+
4_move_file:
3957
action: move_file
4058
source: ${current_path}
4159
target: ${target_path}
@@ -44,7 +62,7 @@ flow:
4462
- target_valid: {error: "Target directory must be valid"}
4563
- permissions_ok: {error: "Must have write permissions"}
4664

47-
4_verify:
65+
5_verify:
4866
action: verify_transition
4967
checks:
5068
- file_moved: {type: file_check}
@@ -86,6 +104,25 @@ safeguards:
86104
- cleanup: "Remove any duplicate files"
87105
- state_check: "Verify state matches directory"
88106

107+
# Test Status validation
108+
test_status:
109+
valid_values:
110+
- "Not Started"
111+
- "Failing"
112+
- "Passing"
113+
- "Not Applicable"
114+
completion_checks:
115+
auto_complete:
116+
- "Passing"
117+
- "Not Applicable"
118+
confirm_required:
119+
- "Failing"
120+
- "Not Started"
121+
error_messages:
122+
invalid_status: "Invalid test status: must be one of Not Started, Failing, Passing, or Not Applicable"
123+
missing_section: "Missing Test Status section: all tasks must include this section"
124+
confirmation_required: "Task has tests in '${status}' state. Confirmation required to complete."
125+
89126
transitions:
90127
start:
91128
from: planned

0 commit comments

Comments
 (0)