Document Session
Create and maintain one repository-local Markdown worklog for a research
objective. Ground the record in repository, command, process, log, metric, and
artifact evidence. Keep observations separate from interpretations.
This skill is a standalone producer. It requires no external document system,
does not discover one, and does not route the worklog to one.
Invocation
Accept:
$document-session start
$document-session checkpoint
$document-session resume
$document-session status
$document-session handoff [--target <worklog-path>]
$document-session finalize
Optional user-facing arguments:
--activity auto|analysis|implementation|refactoring|data_preparation|training|inference|evaluation|ablation|debugging|mixed
--target <existing-worklog-path>
--method <method-name>
--title <worklog-title>
--event launch|progress|compact|resume|completion|failure|aborted # checkpoint/finalize only
--new
For handoff, accept only optional --target; do not accept --event,
--label, method, or title overrides. Infer state from inspected evidence.
Treat arguments as instructions to this workflow. The bundled helper has the
lower-level inspect, locate, allocate, validate,
allocate-handoff, and validate-handoff subcommands.
Non-Negotiable Boundaries
- For
checkpoint and finalize, write only the selected worklog.
- For
handoff, create only one new file under docs/handoffs/; never edit
the source worklog or an existing handoff.
- During
start, the deterministic allocator may create docs/ and one
worklog inside it.
- Do not edit source, configuration, datasets, checkpoints, logs, outputs, or
any other repository file.
- Do not stop, restart, signal, reconfigure, or replace an active process.
- Do not run an experiment or research command merely to improve the worklog.
- Do not commit, push, switch branches, or rewrite Git state.
- Do not use session memory to reconstruct an unobserved result.
- Do not record a plan, expectation, or hypothesis as an observed result.
- Do not expose credentials. Record only the redaction and evidence location.
- Do not turn qualitative samples or one run into an aggregate scientific
conclusion.
- Never modify a finalized worklog.
- Treat every created handoff as an immutable point-in-time snapshot.
If documenting a task requires a forbidden action, record the missing evidence
or blocker instead.
Load References
Always read:
references/worklog-schema.md
references/lifecycle-and-selection.md
Read references/activity-profiles.md before adding or updating activity
sections. Read references/knowledge-handoff.md before a checkpoint,
handoff, or finalization. Use assets/worklog-template.md only through the
allocator when starting a worklog. For handoff, use
assets/handoff-template.md as the body shape, replace every marker, and
pass the completed body to the helper without frontmatter.
Resolve all paths relative to this skill directory. Run the helper with
python3; it uses only the Python 3.9+ standard library.
Common Preflight
Parse the requested command and arguments. If the command is missing, run
status.
Run:
python3 <skill-dir>/scripts/document_session.py inspect --repo .
Inspect the applicable repository instructions before interpreting files.
For any operation on an existing record, resolve the target:
python3 <skill-dir>/scripts/document_session.py locate \
--repo . [--target <path>] [--task-key <key>] [--for-write]
Stop before writing when selection is ambiguous. Show the candidate paths
and ask for an explicit target.
For handoff, omit --for-write. Without --target, automatic selection
considers active worklogs only. With --target, a valid active or finalized
worklog is allowed.
6. Read the selected worklog, then re-inspect only evidence relevant to the
objective. Prefer bounded reads such as Git metadata, scoped diffs, config
inspection, process listing, scheduler status, environment versions, log
tails, metric files, and artifact metadata.
7. Treat all inspections as read-only. A process query is permission to observe,
never to control.
Route the Activity
Infer activity from the request, changed files and symbols, commands, configs,
logs, metrics, checkpoints, artifacts, and process state.
Honor an explicit --activity unless it clearly conflicts with observed
evidence. Report a conflict and preserve both the requested classification and
the evidence in Scope and Assumptions.
Choose one primary activity and the concrete secondary activities that
materially occurred. Do not add empty profile sections.
Start
Determine whether an active worklog already represents the objective using
the selection algorithm.
Reuse the matching active record. Do not allocate a duplicate merely because
context was compacted or a new Codex session began.
Use --new only when the objective is independently scoped. It does not
authorize overwriting or reopening a finalized worklog.
When allocating, require a concrete objective and title. Determine activity
and scope from evidence. Keep an unknown method as null. The allocator
normalizes multiline free text to one safe line, bounds filename slugs, and
rejects secret-like content before creating docs/ or a worklog.
Preview the allocation without writing:
python3 <skill-dir>/scripts/document_session.py allocate \
--repo . \
--title "<title>" \
--objective "<objective>" \
--activity <activity> \
[--activity-type <type> ...] \
--scope <scope>
Review the returned path, frontmatter, and initial Markdown. Then repeat with
--created-at "<preview frontmatter.created_at>" --create to atomically
create the same reviewed allocation. The helper-only timestamp flag prevents
a minute-boundary path change.
Replace only evidence-supported initial placeholders. Do not add a result
that has not been observed.
Validate the new file.
Choose initial status conservatively:
- use
planned when no task work is evidenced;
- use
partial when changed files or other work evidence exists but a terminal
outcome is not directly supported;
- use
completed only when inspected evidence directly supports completion;
- use
not_verified when the exact validation command, exit status, or output
is unavailable, even if a pass was reported;
- use
partially_verified only when some relevant validation evidence was
directly inspected.
Populate branch, commit, and remote fields only from inspection output. Do not
infer them from the scenario, repository name, or common conventions.
Checkpoint
Resolve with --for-write; this rejects a finalized target.
Validate the existing target before editing. Stop and report structural or
unsafe-content errors rather than writing into an invalid record.
Recheck current Git state and task-relevant evidence.
Replace Current State with the latest state.
Append one timestamped checkpoint under Session Checkpoints. Never delete
or rewrite an earlier checkpoint. Correct an earlier claim with an amendment
checkpoint.
Add only activity sections supported by inspected evidence.
Update:
last_checkpoint_at;
commit_current;
work_status;
documentation_status: checkpointed;
verification_status;
checkpoint_count;
compact_count only for explicit --event compact;
session_count only for a new-session --event resume;
- relevant run IDs, artifacts, uncertainty, and handoff.
Validate after the edit. If validation fails, repair only the new worklog
edit; preserve previous checkpoints.
Resume
Remain read-only by default.
Resolve the active target without --for-write.
Validate it and include any structural errors or warnings in the read-only
resume report.
Read frontmatter, Current State, and the latest checkpoint.
Recheck Git state, task-relevant process state, configs, logs, metrics, and
artifacts.
Report:
- current objective and activity;
- evidence that still matches the checkpoint;
- evidence that changed;
- blocker and unresolved uncertainty;
- the recovered next action;
- missing evidence.
Do not infer missing context. Do not edit the worklog merely to report
status.
If the user continues the work and requests persistence, use checkpoint --event resume; that later write increments session_count.
Status
Remain read-only.
- Inspect and locate candidates.
- For an unambiguous target, report objective, activity, work status,
documentation status, verification status, blocker, and next action.
- Run validation and report structural errors, warnings, and missing evidence.
- If candidates are ambiguous, list them without choosing one.
Command Responsibilities
| Command |
Responsibility |
checkpoint |
Update the selected active worklog and append evidence. |
handoff |
Read an active or finalized worklog and create a new immutable snapshot. |
finalize |
End the selected active worklog with a terminal checkpoint and lock it. |
Handoff
Create a consumer-neutral point-in-time snapshot. Do not update the source
worklog, even when it is active, stale, or incomplete.
Resolve the source with the existing selection algorithm.
- With
--target, validate and use that active or finalized worklog.
- Without
--target, use exactly one active worklog.
- Stop on multiple active worklogs. Do not choose by recency.
- Do not fall back to a finalized worklog when no active worklog exists.
Validate the source worklog without --for-write. Stop on structural or
secret-like content errors.
Inspect current repository, branch, commit, commands, processes, configs,
logs, metrics, checkpoints, and artifacts relevant to the source objective.
Keep every inspection read-only. Do not run missing experiments or
verification commands solely for the snapshot.
Derive capture fields from direct evidence:
- keep source
primary_activity, activity_types, project, method, title,
worklog ID, and worklog path unchanged;
- copy the source
documentation_status as
documentation_status_at_capture;
- set
work_status_at_capture from the current evidence, including
running for an active job;
- set
verification_status_at_capture from inspected verification
evidence, not a reported claim;
- set
active_process_state to
none|running|completed|failed|unknown;
- set
coverage to complete only when all relevant evidence surfaces
were inspected; otherwise use partial;
- include each inspected verification path or identifier separately.
Fill assets/handoff-template.md. Keep all required sections and replace
every marker. Use only [observed], [interpretation], [decision],
and [unknown]. Put an explicit [unknown] statement in a section with
no supporting evidence.
Preserve evidence boundaries:
- a running job remains running and has no completed result;
- a qualitative sample remains qualitative and selected;
- one run or seed remains one unit and cannot support an aggregate
conclusion;
- a plan or next action is not an observed result;
- missing or conflicting evidence remains unknown.
Preview the allocation by passing the completed body on standard input:
python3 <skill-dir>/scripts/document_session.py allocate-handoff \
--repo . \
--source-worklog "<source-path>" \
--work-status-at-capture <status> \
--verification-status-at-capture <status> \
--documentation-status-at-capture <status> \
--coverage <complete|partial> \
--active-process-state <state> \
[--verification-evidence "<path-or-identifier>" ...]
Review the returned repository-relative path, metadata, body, seal, and full
Markdown. Then repeat with the identical body and capture flags, adding:
--captured-at "<preview data.captured_at>" \
--allocation-token "<preview data.allocation_token>" \
--create
The token binds the reviewed path, source bytes, capture time, body, Git
evidence, statuses, and snapshot seal. If any input or the collision state
changes, stop and preview again.
Run immutable validation:
python3 <skill-dir>/scripts/document_session.py validate-handoff \
--repo . --target <handoff-path>
Never edit, reseal, or overwrite the created handoff. Create another
handoff when a later point-in-time snapshot or correction is needed. A
changed or unavailable source may produce a portability warning without
invalidating an otherwise intact snapshot.
Finalize
Resolve with --for-write.
Validate the existing target before editing. Stop and report structural or
unsafe-content errors rather than finalizing an invalid record.
Revalidate Git state, commands, configs, logs, metrics, processes, and
artifacts relevant to the objective.
If a task-owned run is still active or the terminal state is unsupported,
create a checkpoint instead. Do not alter the process.
Append a terminal checkpoint with completion, failure, or aborted.
Reconcile the summary, current state, observed facts, decisions, artifacts,
anomalies, uncertainty, next actions, activity profiles, and embedded
Knowledge Handoff section.
Set:
- terminal
work_status;
- evidence-supported
verification_status;
documentation_status: final;
finalized_at;
commit_current and commit_final when Git evidence is available;
- checkpoint counters.
Run validation. A final record with errors is not complete.
Treat the finalized file as immutable. Put later work in a new file and link
it through related_worklogs.
When Git evidence is unavailable, keep the commit fields null and record that
boundary. Validation permits this with a warning so non-Git repositories remain
supported. During finalization, record the current HEAD. Later validation
requires that recorded value to remain resolvable as a commit, not to equal a
newer current HEAD.
Validate
Run:
python3 <skill-dir>/scripts/document_session.py validate \
--repo . --target <worklog-path>
For a standalone snapshot, run:
python3 <skill-dir>/scripts/document_session.py validate-handoff \
--repo . --target <handoff-path>
Interpret helper exit codes:
0 command completed; inspect `data.valid` for validate
2 command-line usage error
3 unsafe or invalid input/precondition
4 target not found
5 ambiguous target
6 finalized target rejected for writing
7 structural validation failed
8 secret-like content detected
The helper emits JSON. It performs deterministic inspection, selection,
allocation, snapshot sealing, and validation only. It does not summarize
research content, choose
the final activity, generate a scientific verdict, or rewrite checkpoints.
Evidence Language
Use explicit labels:
[observed] Directly supported by a command, file, log, metric, process, or artifact.
[interpretation] Reasoned from stated observations; not independently verified.
[decision] An explicit design or experiment choice and its rationale.
[unknown] Evidence is absent, incomplete, conflicting, or unsafe to disclose.
Record commands with exit status and relevant output location when available.
Record suggested commands separately as Suggested, Not Executed.
Completion Response
Return:
- the selected or created repository-relative worklog or handoff path;
- command performed;
- resulting work, documentation, and verification statuses;
- snapshot seal for
handoff;
- validation result and warnings;
- any ambiguity, missing evidence, or evidence boundary.
Do not claim the documented research task itself succeeded unless the worklog
contains current evidence for that claim.
1---2name: document-session3description: Use only when the user explicitly invokes $document-session to start, checkpoint, resume, inspect, hand off, or finalize evidence-grounded research work.4---56# Document Session78Create and maintain one repository-local Markdown worklog for a research9objective. Ground the record in repository, command, process, log, metric, and10artifact evidence. Keep observations separate from interpretations.1112This skill is a standalone producer. It requires no external document system,13does not discover one, and does not route the worklog to one.1415## Invocation1617Accept:1819```text20$document-session start21$document-session checkpoint22$document-session resume23$document-session status24$document-session handoff [--target <worklog-path>]25$document-session finalize26```2728Optional user-facing arguments:2930```text31--activity auto|analysis|implementation|refactoring|data_preparation|training|inference|evaluation|ablation|debugging|mixed32--target <existing-worklog-path>33--method <method-name>34--title <worklog-title>35--event launch|progress|compact|resume|completion|failure|aborted # checkpoint/finalize only36--new37```3839For `handoff`, accept only optional `--target`; do not accept `--event`,40`--label`, method, or title overrides. Infer state from inspected evidence.4142Treat arguments as instructions to this workflow. The bundled helper has the43lower-level `inspect`, `locate`, `allocate`, `validate`,44`allocate-handoff`, and `validate-handoff` subcommands.4546## Non-Negotiable Boundaries4748- For `checkpoint` and `finalize`, write only the selected worklog.49- For `handoff`, create only one new file under `docs/handoffs/`; never edit50 the source worklog or an existing handoff.51- During `start`, the deterministic allocator may create `docs/` and one52 worklog inside it.53- Do not edit source, configuration, datasets, checkpoints, logs, outputs, or54 any other repository file.55- Do not stop, restart, signal, reconfigure, or replace an active process.56- Do not run an experiment or research command merely to improve the worklog.57- Do not commit, push, switch branches, or rewrite Git state.58- Do not use session memory to reconstruct an unobserved result.59- Do not record a plan, expectation, or hypothesis as an observed result.60- Do not expose credentials. Record only the redaction and evidence location.61- Do not turn qualitative samples or one run into an aggregate scientific62 conclusion.63- Never modify a finalized worklog.64- Treat every created handoff as an immutable point-in-time snapshot.6566If documenting a task requires a forbidden action, record the missing evidence67or blocker instead.6869## Load References7071Always read:7273- `references/worklog-schema.md`74- `references/lifecycle-and-selection.md`7576Read `references/activity-profiles.md` before adding or updating activity77sections. Read `references/knowledge-handoff.md` before a checkpoint,78handoff, or finalization. Use `assets/worklog-template.md` only through the79allocator when starting a worklog. For `handoff`, use80`assets/handoff-template.md` as the body shape, replace every marker, and81pass the completed body to the helper without frontmatter.8283Resolve all paths relative to this skill directory. Run the helper with84`python3`; it uses only the Python 3.9+ standard library.8586## Common Preflight87881. Parse the requested command and arguments. If the command is missing, run89 `status`.902. Run:9192 ```text93 python3 <skill-dir>/scripts/document_session.py inspect --repo .94 ```95963. Inspect the applicable repository instructions before interpreting files.974. For any operation on an existing record, resolve the target:9899 ```text100 python3 <skill-dir>/scripts/document_session.py locate \101 --repo . [--target <path>] [--task-key <key>] [--for-write]102 ```1031045. Stop before writing when selection is ambiguous. Show the candidate paths105 and ask for an explicit target.106107For `handoff`, omit `--for-write`. Without `--target`, automatic selection108considers active worklogs only. With `--target`, a valid active or finalized109worklog is allowed.1106. Read the selected worklog, then re-inspect only evidence relevant to the111 objective. Prefer bounded reads such as Git metadata, scoped diffs, config112 inspection, process listing, scheduler status, environment versions, log113 tails, metric files, and artifact metadata.1147. Treat all inspections as read-only. A process query is permission to observe,115 never to control.116117## Route the Activity118119Infer activity from the request, changed files and symbols, commands, configs,120logs, metrics, checkpoints, artifacts, and process state.121122Honor an explicit `--activity` unless it clearly conflicts with observed123evidence. Report a conflict and preserve both the requested classification and124the evidence in `Scope and Assumptions`.125126Choose one primary activity and the concrete secondary activities that127materially occurred. Do not add empty profile sections.128129## Start1301311. Determine whether an active worklog already represents the objective using132 the selection algorithm.1332. Reuse the matching active record. Do not allocate a duplicate merely because134 context was compacted or a new Codex session began.1353. Use `--new` only when the objective is independently scoped. It does not136 authorize overwriting or reopening a finalized worklog.1374. When allocating, require a concrete objective and title. Determine activity138 and scope from evidence. Keep an unknown method as null. The allocator139 normalizes multiline free text to one safe line, bounds filename slugs, and140 rejects secret-like content before creating `docs/` or a worklog.1415. Preview the allocation without writing:142143 ```text144 python3 <skill-dir>/scripts/document_session.py allocate \145 --repo . \146 --title "<title>" \147 --objective "<objective>" \148 --activity <activity> \149 [--activity-type <type> ...] \150 --scope <scope>151 ```1521536. Review the returned path, frontmatter, and initial Markdown. Then repeat with154 `--created-at "<preview frontmatter.created_at>" --create` to atomically155 create the same reviewed allocation. The helper-only timestamp flag prevents156 a minute-boundary path change.1577. Replace only evidence-supported initial placeholders. Do not add a result158 that has not been observed.1598. Validate the new file.160161Choose initial status conservatively:162163- use `planned` when no task work is evidenced;164- use `partial` when changed files or other work evidence exists but a terminal165 outcome is not directly supported;166- use `completed` only when inspected evidence directly supports completion;167- use `not_verified` when the exact validation command, exit status, or output168 is unavailable, even if a pass was reported;169- use `partially_verified` only when some relevant validation evidence was170 directly inspected.171172Populate branch, commit, and remote fields only from inspection output. Do not173infer them from the scenario, repository name, or common conventions.174175## Checkpoint1761771. Resolve with `--for-write`; this rejects a finalized target.1782. Validate the existing target before editing. Stop and report structural or179 unsafe-content errors rather than writing into an invalid record.1803. Recheck current Git state and task-relevant evidence.1814. Replace `Current State` with the latest state.1825. Append one timestamped checkpoint under `Session Checkpoints`. Never delete183 or rewrite an earlier checkpoint. Correct an earlier claim with an amendment184 checkpoint.1856. Add only activity sections supported by inspected evidence.1867. Update:187188 - `last_checkpoint_at`;189 - `commit_current`;190 - `work_status`;191 - `documentation_status: checkpointed`;192 - `verification_status`;193 - `checkpoint_count`;194 - `compact_count` only for explicit `--event compact`;195 - `session_count` only for a new-session `--event resume`;196 - relevant run IDs, artifacts, uncertainty, and handoff.1971988. Validate after the edit. If validation fails, repair only the new worklog199 edit; preserve previous checkpoints.200201## Resume202203Remain read-only by default.2042051. Resolve the active target without `--for-write`.2062. Validate it and include any structural errors or warnings in the read-only207 resume report.2083. Read frontmatter, `Current State`, and the latest checkpoint.2094. Recheck Git state, task-relevant process state, configs, logs, metrics, and210 artifacts.2115. Report:212213 - current objective and activity;214 - evidence that still matches the checkpoint;215 - evidence that changed;216 - blocker and unresolved uncertainty;217 - the recovered next action;218 - missing evidence.2192206. Do not infer missing context. Do not edit the worklog merely to report221 status.2227. If the user continues the work and requests persistence, use `checkpoint223 --event resume`; that later write increments `session_count`.224225## Status226227Remain read-only.2282291. Inspect and locate candidates.2302. For an unambiguous target, report objective, activity, work status,231 documentation status, verification status, blocker, and next action.2323. Run validation and report structural errors, warnings, and missing evidence.2334. If candidates are ambiguous, list them without choosing one.234235## Command Responsibilities236237| Command | Responsibility |238| --- | --- |239| `checkpoint` | Update the selected active worklog and append evidence. |240| `handoff` | Read an active or finalized worklog and create a new immutable snapshot. |241| `finalize` | End the selected active worklog with a terminal checkpoint and lock it. |242243## Handoff244245Create a consumer-neutral point-in-time snapshot. Do not update the source246worklog, even when it is active, stale, or incomplete.2472481. Resolve the source with the existing selection algorithm.249250 - With `--target`, validate and use that active or finalized worklog.251 - Without `--target`, use exactly one active worklog.252 - Stop on multiple active worklogs. Do not choose by recency.253 - Do not fall back to a finalized worklog when no active worklog exists.2542552. Validate the source worklog without `--for-write`. Stop on structural or256 secret-like content errors.2573. Inspect current repository, branch, commit, commands, processes, configs,258 logs, metrics, checkpoints, and artifacts relevant to the source objective.259 Keep every inspection read-only. Do not run missing experiments or260 verification commands solely for the snapshot.2614. Derive capture fields from direct evidence:262263 - keep source `primary_activity`, `activity_types`, project, method, title,264 worklog ID, and worklog path unchanged;265 - copy the source `documentation_status` as266 `documentation_status_at_capture`;267 - set `work_status_at_capture` from the current evidence, including268 `running` for an active job;269 - set `verification_status_at_capture` from inspected verification270 evidence, not a reported claim;271 - set `active_process_state` to272 `none|running|completed|failed|unknown`;273 - set `coverage` to `complete` only when all relevant evidence surfaces274 were inspected; otherwise use `partial`;275 - include each inspected verification path or identifier separately.2762775. Fill `assets/handoff-template.md`. Keep all required sections and replace278 every marker. Use only `[observed]`, `[interpretation]`, `[decision]`,279 and `[unknown]`. Put an explicit `[unknown]` statement in a section with280 no supporting evidence.2816. Preserve evidence boundaries:282283 - a running job remains running and has no completed result;284 - a qualitative sample remains qualitative and selected;285 - one run or seed remains one unit and cannot support an aggregate286 conclusion;287 - a plan or next action is not an observed result;288 - missing or conflicting evidence remains unknown.2892907. Preview the allocation by passing the completed body on standard input:291292 ```text293 python3 <skill-dir>/scripts/document_session.py allocate-handoff \294 --repo . \295 --source-worklog "<source-path>" \296 --work-status-at-capture <status> \297 --verification-status-at-capture <status> \298 --documentation-status-at-capture <status> \299 --coverage <complete|partial> \300 --active-process-state <state> \301 [--verification-evidence "<path-or-identifier>" ...]302 ```3033048. Review the returned repository-relative path, metadata, body, seal, and full305 Markdown. Then repeat with the identical body and capture flags, adding:306307 ```text308 --captured-at "<preview data.captured_at>" \309 --allocation-token "<preview data.allocation_token>" \310 --create311 ```312313 The token binds the reviewed path, source bytes, capture time, body, Git314 evidence, statuses, and snapshot seal. If any input or the collision state315 changes, stop and preview again.3163179. Run immutable validation:318319 ```text320 python3 <skill-dir>/scripts/document_session.py validate-handoff \321 --repo . --target <handoff-path>322 ```32332410. Never edit, reseal, or overwrite the created handoff. Create another325 handoff when a later point-in-time snapshot or correction is needed. A326 changed or unavailable source may produce a portability warning without327 invalidating an otherwise intact snapshot.328329## Finalize3303311. Resolve with `--for-write`.3322. Validate the existing target before editing. Stop and report structural or333 unsafe-content errors rather than finalizing an invalid record.3343. Revalidate Git state, commands, configs, logs, metrics, processes, and335 artifacts relevant to the objective.3364. If a task-owned run is still active or the terminal state is unsupported,337 create a checkpoint instead. Do not alter the process.3385. Append a terminal checkpoint with `completion`, `failure`, or `aborted`.3396. Reconcile the summary, current state, observed facts, decisions, artifacts,340 anomalies, uncertainty, next actions, activity profiles, and embedded341 `Knowledge Handoff` section.3427. Set:343344 - terminal `work_status`;345 - evidence-supported `verification_status`;346 - `documentation_status: final`;347 - `finalized_at`;348 - `commit_current` and `commit_final` when Git evidence is available;349 - checkpoint counters.3503518. Run validation. A final record with errors is not complete.3529. Treat the finalized file as immutable. Put later work in a new file and link353 it through `related_worklogs`.354355When Git evidence is unavailable, keep the commit fields null and record that356boundary. Validation permits this with a warning so non-Git repositories remain357supported. During finalization, record the current HEAD. Later validation358requires that recorded value to remain resolvable as a commit, not to equal a359newer current HEAD.360361## Validate362363Run:364365```text366python3 <skill-dir>/scripts/document_session.py validate \367 --repo . --target <worklog-path>368```369370For a standalone snapshot, run:371372```text373python3 <skill-dir>/scripts/document_session.py validate-handoff \374 --repo . --target <handoff-path>375```376377Interpret helper exit codes:378379```text3800 command completed; inspect `data.valid` for validate3812 command-line usage error3823 unsafe or invalid input/precondition3834 target not found3845 ambiguous target3856 finalized target rejected for writing3867 structural validation failed3878 secret-like content detected388```389390The helper emits JSON. It performs deterministic inspection, selection,391allocation, snapshot sealing, and validation only. It does not summarize392research content, choose393the final activity, generate a scientific verdict, or rewrite checkpoints.394395## Evidence Language396397Use explicit labels:398399```text400[observed] Directly supported by a command, file, log, metric, process, or artifact.401[interpretation] Reasoned from stated observations; not independently verified.402[decision] An explicit design or experiment choice and its rationale.403[unknown] Evidence is absent, incomplete, conflicting, or unsafe to disclose.404```405406Record commands with exit status and relevant output location when available.407Record suggested commands separately as `Suggested, Not Executed`.408409## Completion Response410411Return:412413- the selected or created repository-relative worklog or handoff path;414- command performed;415- resulting work, documentation, and verification statuses;416- snapshot seal for `handoff`;417- validation result and warnings;418- any ambiguity, missing evidence, or evidence boundary.419420Do not claim the documented research task itself succeeded unless the worklog421contains current evidence for that claim.