Skip to content

Commit f1671a0

Browse files
committed
chore: merge main - adopt ADR-014 read-only HANDOFF.md
2 parents 04f97ac + 51c9019 commit f1671a0

File tree

124 files changed

+24500
-3255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+24500
-3255
lines changed

.PSScriptAnalyzerSettings.psd1

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
@{
2+
# Use default rules plus custom rules specified
3+
# Note: Not using IncludeRules as it restricts to only those rules
4+
# Instead, we enable all default rules and configure specific ones in the Rules section
5+
6+
# Consistent indentation settings
7+
Rules = @{
8+
PSUseConsistentIndentation = @{
9+
Enable = $true
10+
IndentationSize = 4
11+
PipelineIndentation = 'IncreaseIndentationForFirstPipeline'
12+
Kind = 'space'
13+
}
14+
15+
PSUseConsistentWhitespace = @{
16+
Enable = $true
17+
CheckInnerBrace = $true
18+
CheckOpenBrace = $true
19+
CheckOpenParen = $true
20+
CheckOperator = $true
21+
CheckPipe = $true
22+
CheckPipeForRedundantWhitespace = $false
23+
CheckSeparator = $true
24+
CheckParameter = $false
25+
}
26+
27+
PSAvoidUsingCmdletAliases = @{
28+
Enable = $true
29+
}
30+
31+
PSAvoidUsingPositionalParameters = @{
32+
Enable = $true
33+
CommandAllowList = @()
34+
}
35+
36+
PSAvoidUsingInvokeExpression = @{
37+
Enable = $true
38+
}
39+
}
40+
}

.agents/HANDOFF.md

Lines changed: 70 additions & 3019 deletions
Large diffs are not rendered by default.

.agents/SESSION-PROTOCOL.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The agent MUST read context documents before starting work. This is a **blocking
7373

7474
**Requirements:**
7575

76-
1. The agent MUST read `.agents/HANDOFF.md` for previous session context
76+
1. The agent MUST read `.agents/HANDOFF.md` for previous session context (READ-ONLY reference)
7777
2. The agent SHOULD read relevant Serena memories based on task topic
7878
3. The agent SHOULD read `.agents/planning/enhancement-PROJECT-PLAN.md` if working on enhancement project
7979
4. The agent MAY read additional context files based on task requirements
@@ -84,7 +84,7 @@ The agent MUST read context documents before starting work. This is a **blocking
8484
- Agent references prior decisions from HANDOFF.md
8585
- Agent does not ask questions answered in HANDOFF.md
8686

87-
**Rationale:** Agents are expert amnesiacs. Without reading HANDOFF.md, they will repeat completed work or contradict prior decisions.
87+
**Rationale:** Agents are expert amnesiacs. Without reading HANDOFF.md, they will repeat completed work or contradict prior decisions. Note: HANDOFF.md is a read-only reference; do not modify it during sessions.
8888

8989
### Phase 1.5: Skill Validation (BLOCKING)
9090

@@ -200,23 +200,24 @@ The agent MUST update documentation before ending.
200200

201201
**Requirements:**
202202

203-
1. The agent MUST update `.agents/HANDOFF.md` with:
204-
- Link to session log (e.g., `[Session NN](./sessions/YYYY-MM-DD-session-NN.md)`)
205-
- What was completed this session
206-
- What should happen next session
207-
- Any blockers or concerns
208-
- Files changed
203+
1. The agent MUST NOT update `.agents/HANDOFF.md` directly. Session context MUST go to:
204+
- Your session log at `.agents/sessions/YYYY-MM-DD-session-NN.md`
205+
- Serena memory for cross-session context (using `mcp__serena__write_memory` or equivalent)
206+
- `.agents/handoffs/{branch}/{session}.md` for branch-specific handoff (if on feature branch)
209207
2. The agent MUST complete the session log with:
210208
- Tasks attempted and outcomes
211209
- Decisions made with rationale
212210
- Challenges encountered and resolutions
211+
- Link reference for next session handoff
213212
3. The agent SHOULD update PROJECT-PLAN.md if tasks were completed
213+
4. The agent MAY read `.agents/HANDOFF.md` for historical context (read-only reference)
214214

215215
**Verification:**
216216

217-
- HANDOFF.md modified timestamp is current
218217
- Session log contains complete information
218+
- Serena memory updated with relevant context
219219
- PROJECT-PLAN.md checkboxes updated if applicable
220+
- HANDOFF.md is NOT modified (unless explicitly approved by architect)
220221

221222
### Phase 2: Quality Checks (REQUIRED)
222223

@@ -302,11 +303,12 @@ Copy this checklist to each session log and verify completion:
302303

303304
| Req | Step | Status | Evidence |
304305
|-----|------|--------|----------|
305-
| MUST | Update `.agents/HANDOFF.md` (include session log link) | [ ] | File modified |
306-
| MUST | Complete session log | [ ] | All sections filled |
306+
| MUST | Complete session log (all sections filled) | [ ] | File complete |
307+
| MUST | Update Serena memory (cross-session context) | [ ] | Memory write confirmed |
307308
| MUST | Run markdown lint | [ ] | Lint output clean |
308309
| MUST | Route to qa agent (feature implementation) | [ ] | QA report: `.agents/qa/[report].md` |
309310
| MUST | Commit all changes (including .serena/memories) | [ ] | Commit SHA: _______ |
311+
| MUST NOT | Update `.agents/HANDOFF.md` directly | [ ] | HANDOFF.md unchanged |
310312
| SHOULD | Update PROJECT-PLAN.md | [ ] | Tasks checked off |
311313
| SHOULD | Invoke retrospective (significant sessions) | [ ] | Doc: _______ |
312314
| SHOULD | Verify clean git status | [ ] | `git status` output |
@@ -387,11 +389,12 @@ All MUST requirements above are marked complete.
387389

388390
| Req | Step | Status | Evidence |
389391
|-----|------|--------|----------|
390-
| MUST | Update `.agents/HANDOFF.md` (include session log link) | [ ] | File modified |
391-
| MUST | Complete session log | [ ] | All sections filled |
392+
| MUST | Complete session log (all sections filled) | [ ] | File complete |
393+
| MUST | Update Serena memory (cross-session context) | [ ] | Memory write confirmed |
392394
| MUST | Run markdown lint | [ ] | Output below |
393395
| MUST | Route to qa agent (feature implementation) | [ ] | QA report: `.agents/qa/[report].md` |
394-
| MUST | Commit all changes | [ ] | Commit SHA: _______ |
396+
| MUST | Commit all changes (including .serena/memories) | [ ] | Commit SHA: _______ |
397+
| MUST NOT | Update `.agents/HANDOFF.md` directly | [ ] | HANDOFF.md unchanged |
395398
| SHOULD | Update PROJECT-PLAN.md | [ ] | Tasks checked off |
396399
| SHOULD | Invoke retrospective (significant sessions) | [ ] | Doc: _______ |
397400
| SHOULD | Verify clean git status | [ ] | Output below |
@@ -520,6 +523,7 @@ These documents reference this protocol but MUST NOT duplicate it:
520523

521524
| Version | Date | Changes |
522525
|---------|------|---------|
526+
| 1.4 | 2025-12-22 | P0: Changed HANDOFF.md from MUST update to MUST NOT update; agents use session logs and Serena memory |
523527
| 1.3 | 2025-12-20 | Added Phase 2.5 QA Validation BLOCKING gate |
524528
| 1.2 | 2025-12-18 | Added Phase 1.5 skill validation BLOCKING gate |
525529
| 1.1 | 2025-12-17 | Added requirement to link session log in HANDOFF.md |

0 commit comments

Comments
 (0)