> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase32-session02-preference-contract/tasks.md).

# Task Checklist

**Session ID**: `phase32-session02-preference-contract` **Total Tasks**: 16 **Estimated Duration**: 3-4 hours **Created**: 2026-06-24

***

## Progress Summary

| Metric              | Value     |
| ------------------- | --------- |
| Tasks Completed     | 16 / 16   |
| Estimated Remaining | 0 minutes |
| Blockers            | 0         |

***

Legend: `[x]` completed; `[ ]` pending; `[P]` parallelizable; `[SNNMM]` session ref; `TNNN` task ID.

***

## Setup (2 tasks)

* [x] T001 \[S3202] Verify Session 01 prerequisite evidence and current raw preference default before edits (`.spec_system/specs/phase32-session01-baseline-validation/IMPLEMENTATION_SUMMARY.md`, `src/extensions/ai-rogue/save-schema.ts`)
* [x] T002 \[S3202] Map current runtime-facing input-mode call sites that must stay concrete (`src/extensions/ai-rogue/views/runtime-canvas.tsx`, `src/extensions/ai-rogue/runtime/types.ts`, `src/extensions/ai-rogue/runtime/renderer.ts`)

***

## Foundation (5 tasks)

* [x] T003 \[S3202] \[P] Add raw and effective AI Rogue input-mode constants and exported types (`src/extensions/ai-rogue/input-mode.ts`)
* [x] T004 \[S3202] \[P] Implement the pure raw-to-effective input-mode resolver with injected capability inputs and keyboard fallback (`src/extensions/ai-rogue/input-mode.ts`)
* [x] T005 \[S3202] Implement the mounted media-query capability hook with post-mount reads and cleanup on scope exit for all acquired resources (`src/extensions/ai-rogue/input-mode.ts`)
* [x] T006 \[S3202] Extend durable preference schema, defaults, and legacy migration to support raw `auto` while preserving explicit concrete values (`src/extensions/ai-rogue/save-schema.ts`)
* [x] T007 \[S3202] Preserve concrete runtime preference boundaries after the raw schema widens (`src/extensions/ai-rogue/views/runtime-canvas.tsx`, `src/extensions/ai-rogue/runtime/types.ts`)

***

## Implementation (4 tasks)

* [x] T008 \[S3202] Update preference read/write behavior for default `auto`, malformed storage fallback, and explicit override preservation with schema-validated input and explicit error mapping (`src/extensions/ai-rogue/persistence.ts`)
* [x] T009 \[S3202] Update save-state typing and empty-state behavior for raw `auto` without browser global reads in the hook state module (`src/extensions/ai-rogue/use-save-state.ts`)
* [x] T010 \[S3202] Update schema tests for raw `auto` defaults, legacy migration, malformed fallback, and explicit `keyboard`/`compact` parsing (`src/extensions/ai-rogue/__tests__/save-schema.test.ts`)
* [x] T011 \[S3202] Update persistence and save-state tests for raw `auto` reads/writes and preserved explicit overrides (`src/extensions/ai-rogue/__tests__/persistence.test.ts`, `src/extensions/ai-rogue/__tests__/use-save-state.test.tsx`)

***

## Testing (5 tasks)

* [x] T012 \[S3202] \[P] Add resolver and mounted hook lifecycle tests for capability mapping, unavailable APIs, media-query changes, and listener cleanup (`src/extensions/ai-rogue/__tests__/input-mode.test.tsx`)
* [x] T013 \[S3202] Run focused AI Rogue unit/component tests (`bunx vitest run src/extensions/ai-rogue/__tests__/save-schema.test.ts src/extensions/ai-rogue/__tests__/persistence.test.ts src/extensions/ai-rogue/__tests__/use-save-state.test.tsx src/extensions/ai-rogue/__tests__/input-mode.test.tsx src/extensions/ai-rogue/__tests__/runtime-canvas.test.tsx`)
* [x] T014 \[S3202] Run typecheck to prove runtime-facing APIs do not accept raw `auto` (`bun run typecheck`)
* [x] T015 \[S3202] Run formatting and lint checks for touched AI Rogue files (`bunx prettier --check src/extensions/ai-rogue/save-schema.ts src/extensions/ai-rogue/persistence.ts src/extensions/ai-rogue/use-save-state.ts src/extensions/ai-rogue/input-mode.ts src/extensions/ai-rogue/views/runtime-canvas.tsx src/extensions/ai-rogue/__tests__/save-schema.test.ts src/extensions/ai-rogue/__tests__/persistence.test.ts src/extensions/ai-rogue/__tests__/use-save-state.test.tsx src/extensions/ai-rogue/__tests__/input-mode.test.tsx src/extensions/ai-rogue/__tests__/runtime-canvas.test.tsx`)
* [x] T016 \[S3202] Validate ASCII and LF requirements for session artifacts and touched AI Rogue files (`.spec_system/specs/phase32-session02-preference-contract`, `src/extensions/ai-rogue`)

***

## Completion Checklist

* [x] All tasks marked `[x]`
* [x] All tests and checks passing
* [x] All session artifacts and touched files ASCII-encoded with LF line endings
* [x] implementation-notes.md updated
* [x] Ready for `creview` to start the creview -> validate sequence

***

## Next Steps

Run the `implement` workflow step.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase32-session02-preference-contract/tasks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
