Skip to content

Commit 06434ff

Browse files
author
Template Maintainer
committed
Release v1.6.0 stage continuity recall guards
1 parent ac5fc71 commit 06434ff

20 files changed

Lines changed: 1055 additions & 79 deletions

.agents/skills/agent-orchestration/SKILL.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ The user may grant project-level standing permission for the agent to decide whe
1919

2020
Before drafting any formal document, use `dissertation-source-first-gate`. Extract known factual fields from source files. Do not invent names, emails, dates, institutional contacts, supervisor/PI/client details, signatures, participant facts, datasets, results, administrative requirements, journal/funder/client requirements, marking criteria, grade-band standards, LMS requirements, deadlines, word counts, or submission rules. If a field is not found in the source material, mark it `TO CONFIRM`.
2121

22+
Before substantive cross-stage work, apply `research-wiki/STAGE_CONTINUITY_PROTOCOL.md` when both conditions hold: (A) the task changes, designs, restates, translates, formalises, or produces a high-risk deliverable class such as method plan, compliance material, fieldwork instrument, analysis plan, stakeholder-facing decision memo, or formal section draft; and (B) `research-wiki/STAGE_GRAPH.md` lists upstream dependencies or the task references prior decisions, accepted outputs, source-of-record files, source maps, or checkpoints. Citation-only edits, formatting/layout fixes, typo repair, file moves, bookkeeping, and source summaries without design/formal-claim output do not trigger the gate.
23+
24+
Use `scripts/stage_recall_policy.py` or the runtime preflight `recall_decision` as the token-aware recall controller. Tier 0 means no project recall; Tier 1 anchor scan; Tier 2 pointer lookup; Tier 3 targeted Stage Continuity Capsule; Tier 4 full upstream audit or pause. This controller manages context budget only. It never overrides Stage Continuity A+B, source-first, compliance, citation, privacy, document-quality, or delivery gates. If the user says to skip upstream checks for a triggered deliverable, surface the omitted dependency first and record an override risk only after explicit user acceptance.
25+
2226
Before answering rubric, grade-band, marking-criteria, journal/funder/client requirement, LMS requirement, word-count, deadline, or submission-rule questions, use the strongest available project requirement source. Use `university-guidance/RUBRIC_EVIDENCE_GATE.md` for assessed academic work. Distinguish official original text, local summary, inference, and evidence-insufficient status.
2327

2428
Before delivering formal documents or important project notes, use `dissertation-document-quality-gate` at the appropriate level.
@@ -37,10 +41,13 @@ Use this quick sequence at the start of every Production Window turn:
3741

3842
1. Classify the user's current task by mode and task type.
3943
2. Select the smallest useful skill set from the classification table.
40-
3. Open the relevant `SKILL.md` files before acting on any non-trivial task.
41-
4. Add source-first, cognitive-framework, self-review, argument-spine, style-memory, document-quality, compliance, project-delivery, and context-continuity gates when the task involves formal or stakeholder-facing output.
42-
5. Re-route if the user changes the task during the turn.
43-
6. Record the routing in `research-wiki/PRODUCTION_RUN_REGISTER.md` for substantial Production tasks.
44+
3. Compute or consume the Token-Aware Recall tier and state the minimum recall scope for substantial work.
45+
4. Check whether Stage Continuity A+B is triggered. If yes, read `research-wiki/STAGE_GRAPH.md`, write a Stage Continuity Capsule, and run `scripts/stage_continuity_capsule_check.py` when available.
46+
5. Open the relevant `SKILL.md` files before acting on any non-trivial task.
47+
6. Add source-first, cognitive-framework, self-review, argument-spine, style-memory, document-quality, compliance, project-delivery, and context-continuity gates when the task involves formal or stakeholder-facing output.
48+
7. Re-route and recompute recall if the user changes the task during the turn.
49+
8. Before formal delivery, confirm the final artifact still matches the latest recall tier, source map, and gates.
50+
9. Record the routing in `research-wiki/PRODUCTION_RUN_REGISTER.md` for substantial Production tasks.
4451

4552
Use this receipt wording:
4653

@@ -53,6 +60,8 @@ Skill routing:
5360
- Subagent decision:
5461
- Gates required:
5562
- Gates completed:
63+
- Recall Decision Note:
64+
- Stage Continuity Gate triggered:
5665
```
5766

5867
If a substantial Production output has no skill-routing receipt, treat the task as incomplete for maintenance-audit purposes.
@@ -82,6 +91,7 @@ Classify the user's request into one or more categories:
8291
| LMS/module requirements | `dissertation-research-search-protocol`, `dissertation-research-wiki`, `dissertation-chapter-plan`, `dissertation-citation-audit` |
8392
| literature search / literature review | `dissertation-research-search-protocol`, `dissertation-learning-loop`, `dissertation-literature-review`, `cognitive-frameworks`, `dissertation-argument-spine`, `dissertation-citation-audit`, `academic-self-review-loop` when drafting formal synthesis |
8493
| research questions / methodology | `cognitive-frameworks`, `dissertation-argument-spine`, `dissertation-research-review`, `dissertation-chapter-plan`, `academic-self-review-loop` when drafting formal prose |
94+
| Stage Continuity triggered deliverable | `context-continuity`, `cognitive-frameworks`, `dissertation-source-first-gate`, `dissertation-argument-spine`, `dissertation-research-review` |
8595
| interview guide / data collection | `qualitative-theme-audit`, `responsible-ai-agent-audit`, `teacher-adoption-modeling` |
8696
| confirmed design-elicitation / co-design outputs | `codesign-output-synthesis`, `qualitative-theme-audit`, `ai-agent-design-spec` |
8797
| AI agent concept / prototype | `ai-agent-design-spec`, `active-learning-design-support`, `prototype-evaluation-audit` |

.agents/skills/context-continuity/SKILL.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Maintain compact-ready checkpoints, task state summaries, source ma
55

66
# Context Continuity
77

8-
Use this skill for long, multi-step, or easily interrupted dissertation tasks, especially when work may span many turns, involve multiple files, or risk losing source-grounded decisions.
8+
Use this skill for long, multi-step, or easily interrupted research tasks, especially when work may span many turns, involve multiple files, cross project stages, or risk losing source-grounded decisions.
99

1010
## Purpose
1111

@@ -21,8 +21,10 @@ This skill also carries the adapted ECC context-budget, save-session, and strate
2121
- output files
2222
- confirmed facts
2323
- `TO CONFIRM` fields
24-
2. During the task, update a compact checkpoint when major decisions or files change.
25-
3. Before final response, summarize:
24+
2. If `research-wiki/STAGE_CONTINUITY_PROTOCOL.md` triggers, read `research-wiki/STAGE_GRAPH.md` before substantive work and record a Stage Continuity Capsule.
25+
3. Use the runtime `recall_decision` or `scripts/stage_recall_policy.py` as the context-budget controller. Recompute when the task changes from discussion to formal output, from layout to content, from reading to design/method/analysis, or before formal delivery.
26+
4. During the task, update a compact checkpoint when major decisions or files change.
27+
5. Before final response, summarize:
2628
- what was done
2729
- what files changed
2830
- what evidence was used
@@ -59,6 +61,7 @@ Update `research-wiki/TASK_STATE.md` when:
5961
- a new source cluster or contextual source is added
6062
- a project rule or skill changes
6163
- a decision affects methodology, research questions, concept cards, data collection, or participant-facing materials
64+
- a Stage Continuity Capsule or Deep Reasoning Pass changes what later work must inherit
6265
- a long task is likely to be resumed later
6366

6467
For substantial Production Window tasks, also update `research-wiki/PRODUCTION_RUN_REGISTER.md` with a run receipt. This lets the Maintenance Window compare the claimed skill routing, created files, gates performed, render artifacts, temporary files, and remaining risks.
@@ -106,6 +109,32 @@ Next action:
106109

107110
For substantial Production tasks, also add a receipt to `research-wiki/PRODUCTION_RUN_REGISTER.md` using the current receipt fields. Do not rely on `TASK_STATE.md` alone for cross-window monitoring.
108111

112+
## Stage Continuity Capsule
113+
114+
Use `research-wiki/STAGE_CONTINUITY_PROTOCOL.md` when triggered. The capsule can live in a thinking checkpoint, design note, decision memo, or `research-wiki/TASK_STATE.md`.
115+
116+
Minimum fields:
117+
118+
```text
119+
Stage Continuity Capsule:
120+
- Current task/stage:
121+
- Trigger:
122+
- Stage graph nodes used:
123+
- Source-of-record files checked:
124+
- Inherited decisions:
125+
- Open confirmations / hard stops:
126+
- What may change:
127+
- What must not change without confirmation:
128+
- Next action boundary:
129+
```
130+
131+
Content rules:
132+
133+
- Use concrete local file paths.
134+
- Cite a stage node or source path for inherited decisions.
135+
- For high-risk deliverables, keep `What must not change without confirmation` non-empty.
136+
- Run `scripts/stage_continuity_capsule_check.py` when available.
137+
109138
## Where To Write
110139

111140
Use:

AGENTS.md

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ Domain-specific skills are included as optional examples. Rename, edit, or remov
8585
- `python3 scripts/agent_runtime.py "<TASK>" --window Production --write --strict`
8686
- or `python3 scripts/agent_runtime.py "<TASK>" --window Maintenance --write --strict`
8787
If it returns `BLOCKED`, fix the missing file or gate before continuing.
88+
- For long-running projects, use `research-wiki/STAGE_GRAPH.md` and `research-wiki/STAGE_CONTINUITY_PROTOCOL.md` before a later-stage task changes, designs, restates, translates, formalises, or produces a high-risk deliverable with upstream dependencies. High-risk deliverables include proposal/brief material, method plans, compliance or ethics material, fieldwork instruments, concept cards/scenario stimuli, RQ-to-method mapping, analysis plans, stakeholder-facing decision memos, and formal chapter/section drafts.
89+
- Use the runtime `recall_decision` or run `python3 scripts/stage_recall_policy.py --task "<TASK>"` as the Token-Aware Recall controller. Tier 0=no project recall, Tier 1=anchor scan, Tier 2=pointer lookup, Tier 3=targeted Stage Continuity Capsule, Tier 4=full upstream audit or pause. This controller saves context but cannot override source-first, compliance, citation, privacy, document-quality, delivery, or Stage Continuity A+B gates.
90+
- If a user asks to skip an upstream check for a triggered deliverable, surface the omitted dependency first. Only after explicit user acceptance may the task proceed as an override risk; do not call the Stage Continuity Gate a pass.
91+
- For non-obvious route, method, instrument, analysis, or delivery decisions, write a concise Deep Reasoning Pass before drafting: decision under consideration, chosen direction and concrete trade-off accepted, rejected alternative only if genuinely considered, and what would change the decision. Do not expose private chain-of-thought.
8892
- Do not invent names, emails, supervisor/PI/client details, dates, funder/journal/client/institutional requirements, rubrics, citations, participant facts, datasets, results, or findings.
8993
- For formal drafting or editing, use `dissertation-source-first-gate`.
9094
- For substantial proposal, manuscript, report, grant, literature review, methodology, or stakeholder-facing writing, use source-first, then `material-passport`, then `academic-integrity-preflight`, then `cognitive-frameworks` before drafting.
@@ -143,34 +147,35 @@ Domain-specific skills are included as optional examples. Rename, edit, or remov
143147
2. Run `scripts/agent_runtime.py` for substantial tasks when local tools are available.
144148
3. Read `RESEARCH_PROJECT_BRIEF.md` if present; otherwise use `RESEARCH_PROJECT_BRIEF_TEMPLATE.md` and mark project facts `TO CONFIRM`.
145149
4. Read `PROJECT_AGENT_PREFERENCES.md` and relevant task-state files.
146-
5. Use source-first checks before formal writing.
147-
6. Use `material-passport` to package source, compliance/requirement, citation, and `TO CONFIRM` status before formal artifacts move forward.
148-
7. Use `academic-integrity-preflight` before major revision and again before delivery.
149-
8. Use `cognitive-frameworks` before major argument, gap, methodology, literature, proposal, manuscript, report, grant, or stakeholder-facing drafting.
150-
9. Use `academic-self-review-loop` before style polishing and document-quality review for formal prose.
151-
10. Use `authorial-voice-integrity` when the task involves AI-style prose, humanising, de-AI, detector framing, or AI-use disclosure.
152-
11. Use `style-fingerprint-gate` for formal prose before delivery when repeated contrast templates could become visible.
153-
12. Record required skill execution receipts for substantial formal tasks.
154-
13. Use the learning loop after useful reading or confirmed decisions.
155-
14. Use `knowledge-base/self-growing/` for controlled intake, growth queue triage, and compiled-wiki navigation.
156-
15. Use source-readiness checks before citation-heavy writing.
157-
16. Use compliance checks before ethics, privacy, funder, journal, client, or data-management claims.
158-
17. Use rubric or requirement evidence checks before grade-band, journal, funder, deadline, or word-count claims.
159-
18. Use `research-wiki/DOCUMENT_PIPELINE.md` for important Word/PDF/stakeholder-facing delivery.
160-
19. Use the project delivery review gate before formal document delivery.
161-
20. Use `formal-delivery-guard` before presenting formal artifacts as usable.
162-
21. Use relevant academic/professional style gates before delivering prose.
163-
22. Use document-quality gate before delivering formal outputs.
164-
23. Update `research-wiki/TASK_STATE.md` after substantial work.
165-
24. Record substantial Production work in `research-wiki/PRODUCTION_RUN_REGISTER.md` if that register is enabled.
166-
25. Use `brainstorming` for unclear, high-impact route decisions before drafting or system changes.
167-
26. Use `project-skill-creator-governance` and global `skill-creator` before adding or changing skills.
168-
27. Use `playwright-dissertation-browser` and global `playwright` for controlled browser automation.
169-
28. Use `markitdown` only after checking tool availability and privacy boundaries.
170-
29. Use `research-*` figure/writing skills only as optional quality layers after source, privacy, compliance, citation, and document gates.
171-
30. Use `scripts/claude_independent_review.py` for optional context-naive independent review when the artifact is safe to send to Claude Code.
172-
31. Use staged literature gap-watch automation only for candidate discovery unless the user confirms ingestion.
173-
32. Use `release-surface-verification` before saying a public GitHub release or template update is visible and ready for readers.
150+
5. Compute or consume the Token-Aware Recall tier; apply Stage Continuity A+B when triggered.
151+
6. Use source-first checks before formal writing.
152+
7. Use `material-passport` to package source, compliance/requirement, citation, and `TO CONFIRM` status before formal artifacts move forward.
153+
8. Use `academic-integrity-preflight` before major revision and again before delivery.
154+
9. Use `cognitive-frameworks` before major argument, gap, methodology, literature, proposal, manuscript, report, grant, or stakeholder-facing drafting.
155+
10. Use `academic-self-review-loop` before style polishing and document-quality review for formal prose.
156+
11. Use `authorial-voice-integrity` when the task involves AI-style prose, humanising, de-AI, detector framing, or AI-use disclosure.
157+
12. Use `style-fingerprint-gate` for formal prose before delivery when repeated contrast templates could become visible.
158+
13. Record required skill execution receipts for substantial formal tasks.
159+
14. Use the learning loop after useful reading or confirmed decisions.
160+
15. Use `knowledge-base/self-growing/` for controlled intake, growth queue triage, and compiled-wiki navigation.
161+
16. Use source-readiness checks before citation-heavy writing.
162+
17. Use compliance checks before ethics, privacy, funder, journal, client, or data-management claims.
163+
18. Use rubric or requirement evidence checks before grade-band, journal, funder, deadline, or word-count claims.
164+
19. Use `research-wiki/DOCUMENT_PIPELINE.md` for important Word/PDF/stakeholder-facing delivery.
165+
20. Use the project delivery review gate before formal document delivery.
166+
21. Use `formal-delivery-guard` before presenting formal artifacts as usable.
167+
22. Use relevant academic/professional style gates before delivering prose.
168+
23. Use document-quality gate before delivering formal outputs.
169+
24. Update `research-wiki/TASK_STATE.md` after substantial work.
170+
25. Record substantial Production work in `research-wiki/PRODUCTION_RUN_REGISTER.md` if that register is enabled.
171+
26. Use `brainstorming` for unclear, high-impact route decisions before drafting or system changes.
172+
27. Use `project-skill-creator-governance` and global `skill-creator` before adding or changing skills.
173+
28. Use `playwright-dissertation-browser` and global `playwright` for controlled browser automation.
174+
29. Use `markitdown` only after checking tool availability and privacy boundaries.
175+
30. Use `research-*` figure/writing skills only as optional quality layers after source, privacy, compliance, citation, and document gates.
176+
31. Use `scripts/claude_independent_review.py` for optional context-naive independent review when the artifact is safe to send to Claude Code.
177+
32. Use staged literature gap-watch automation only for candidate discovery unless the user confirms ingestion.
178+
33. Use `release-surface-verification` before saying a public GitHub release or template update is visible and ready for readers.
174179

175180
## Public Template Boundary
176181

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Changelog
22

3+
## v1.6.0 - Stage Continuity And Token-Aware Recall - 2026-06-10
4+
5+
Status: long-running project continuity and context-budget reliability update.
6+
7+
### Added
8+
9+
- `research-wiki/STAGE_GRAPH.md` as a generic, user-customisable pointer map for upstream source-of-record dependencies.
10+
- `research-wiki/STAGE_CONTINUITY_PROTOCOL.md` to define Stage Continuity A+B triggers, non-triggers, user-skip override handling, Deep Reasoning Pass, and capsule requirements.
11+
- `scripts/stage_recall_policy.py` to compute deterministic recall tiers from task intent, target files, and change type.
12+
- `scripts/stage_continuity_capsule_check.py` to check capsule fields, concrete source paths, and confirmation boundaries.
13+
- Stage continuity unit tests and eval cases `STAGE-001`, `STAGE-002`, and `STAGE-003`.
14+
- Claude Code advisory review packet and review report for this public sync.
15+
16+
### Changed
17+
18+
- `scripts/agent_runtime.py` now emits a `recall_decision` for every preflight and adds Stage Continuity gates only when recall reaches Tier 3 or higher.
19+
- `agent-orchestration` now requires opening recall, mid-task recall recomputation, and pre-delivery recall reconciliation for substantial stage-sensitive work.
20+
- `context-continuity` now owns Stage Continuity Capsules and records what later work must inherit.
21+
- `AGENTS.md`, `PROJECT_AGENT_PREFERENCES.md`, `README.md`, and `README_CN.md` now document the workflow: opening recall prevents blind drafting, mid-task recall prevents drift, and delivery gates prevent packaging drift as a formal artifact.
22+
- Skill eval registry now reports 38 public checks, including three new Stage Continuity cases.
23+
24+
### Boundary
25+
26+
- Stage Graph rows are starter examples, not required private-project structure. A one-row graph is valid after customisation.
27+
- Token-Aware Recall is a context-budget controller. It cannot override source-first, compliance, citation, privacy, document-quality, or formal delivery gates.
28+
- Deep Reasoning Pass is an auditable decision summary, not private chain-of-thought and not a replacement for cognitive frameworks or self-review.
29+
- User-accepted skip/override records risk; it is not a quality pass.
30+
- This release does not include private project content, institution-specific requirements, participant material, private local paths, credentials, runtime state, or generated private reports.
31+
332
## v1.5.2 - DOCX Structure And Layout Guards - 2026-06-09
433

534
Status: formal Word delivery reliability update.

0 commit comments

Comments
 (0)