> 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/phase27-session08-dated-predictions-and-story-log/tasks.md).

# Task Checklist

**Session ID**: `phase27-session08-dated-predictions-and-story-log` **Total Tasks**: 22 **Estimated Duration**: 3-4 hours **Created**: 2026-06-13

***

## Legend

* `[x]` = Completed
* `[ ]` = Pending
* `[P]` = Parallelizable (can run with other \[P] tasks)
* `[SNNMM]` = Session reference (NN=phase number, MM=session number)
* `TNNN` = Task ID

***

## Progress Summary

| Category       | Total  | Done   | Remaining |
| -------------- | ------ | ------ | --------- |
| Setup          | 2      | 2      | 0         |
| Foundation     | 6      | 6      | 0         |
| Implementation | 9      | 9      | 0         |
| Testing        | 5      | 5      | 0         |
| **Total**      | **22** | **22** | **0**     |

***

## Setup (2 tasks)

Initial verification and source orientation.

* [x] T001 \[S2708] Verify analyzer state, Session 01 and Session 06 completion, dated prediction scope, and no open security findings (`.spec_system/specs/phase27-session08-dated-predictions-and-story-log/implementation-notes.md`)
* [x] T002 \[S2708] Inspect prediction, retro, collector, schema, view-model, Watchlist, Brief, fixture, and test baselines (`.spec_system/specs/phase27-session08-dated-predictions-and-story-log/implementation-notes.md`)

***

## Foundation (6 tasks)

Dated contracts, fallback rules, and retro eligibility.

* [x] T003 \[S2708] Add additive dated prediction fields, Story Log schemas, browser bounds, and legacy defaults with schema-validated input and explicit error mapping (`src/extensions/trend-finder/schema.ts`)
* [x] T004 \[S2708] Extend prediction prompt hints, validation, sanitization, and accepted AI output for dated target fields with exhaustive enum handling (`scripts/lib/ai-runtime/predictions.ts`)
* [x] T005 \[S2708] Implement deterministic dated fallback buckets from generated date, lifecycle, and movement without wall-clock drift (`scripts/lib/ai-runtime/predictions.ts`)
* [x] T006 \[S2708] Add target-date eligibility, not-yet-due pending behavior, and after-target stale-pending logic with deterministic UTC date comparisons (`scripts/lib/ai-runtime/retros.ts`)
* [x] T007 \[S2708] Extend calibration helpers so resolved dated outcomes count while not-yet-due pending calls stay unresolved (`scripts/lib/ai-runtime/retros.ts`)
* [x] T008 \[S2708] Define Story Log view-model types, filter metadata, due-state labels, and deterministic row ordering with validated filters and stable bounds (`src/extensions/trend-finder/view-model.ts`)

***

## Implementation (9 tasks)

Pipeline projection and browser rendering.

* [x] T009 \[S2708] Pass topic lifecycle into prediction candidates and dated fallback inputs with types matching the declared schema contract (`scripts/extensions/trend-finder/collector.ts`)
* [x] T010 \[S2708] Build capped Story Log projection from sanitized prediction and retro archives with bounded pagination, validated filters, and deterministic ordering (`scripts/extensions/trend-finder/collector.ts`)
* [x] T011 \[S2708] Emit sanitized prediction history counters in Engine Replay trace context without private paths, raw archives, prompts, or provider responses (`scripts/extensions/trend-finder/collector.ts`)
* [x] T012 \[S2708] \[P] Create Story Log panel with verdict and due-state segmented filters, explicit empty states, state reset on data changes, and platform-appropriate accessibility labels (`src/extensions/trend-finder/components/story-log-panel.tsx`)
* [x] T013 \[S2708] Wire Story Log panel into Watchlist prediction/history content with filter revalidation on re-entry and mobile-safe layout constraints (`src/extensions/trend-finder/views/watchlist-view.tsx`)
* [x] T014 \[S2708] Add compact dated prediction and recent outcome summary to Brief with explicit empty and fallback states (`src/extensions/trend-finder/views/brief-view.tsx`)
* [x] T015 \[S2708] Add dated prediction, due, pending, resolved, malformed, and legacy fixture states for browser-safe coverage (`src/extensions/trend-finder/fixtures.ts`)
* [x] T016 \[S2708] Update committed example payload with compact dated prediction and Story Log examples while preserving additive defaults (`src/data/live-data.example.json`)
* [x] T017 \[S2708] Ensure prediction and retro archive write/read paths remain atomic, idempotent across reruns, and compensated by warnings on failure (`scripts/lib/ai-runtime/predictions.ts`)

***

## Testing (5 tasks)

Verification and quality assurance.

* [x] T018 \[S2708] Extend prediction tests for dated fallback buckets, AI validation, invalid dates, unknown lifecycle stages, unknown evidence IDs, sanitization, and legacy archives (`scripts/lib/ai-runtime/__tests__/predictions.test.ts`)
* [x] T019 \[S2708] Extend retro tests for before-target pending, on-target grading, after-target stale behavior, disappeared topics, mode preservation, and calibration math (`scripts/lib/ai-runtime/__tests__/retros.test.ts`)
* [x] T020 \[S2708] Extend collector and schema tests for lifecycle candidate wiring, Story Log projection bounds, malformed archives, sanitized trace counters, max-array defaults, and legacy parsing (`scripts/extensions/trend-finder/__tests__/collector.test.ts`)
* [x] T021 \[S2708] \[P] Add view-model and component tests for Story Log filters, counts, ordering, empty states, reset behavior, ARIA labels, and mobile-safe row text (`src/extensions/trend-finder/components/__tests__/story-log-panel.test.tsx`)
* [x] T022 \[S2708] Run focused validation, ASCII checks, payload budget check, and record implementation results (`.spec_system/specs/phase27-session08-dated-predictions-and-story-log/implementation-notes.md`)

***

## Completion Checklist

Before marking session complete:

* [x] All tasks marked `[x]`
* [x] All tests passing
* [x] All files ASCII-encoded
* [x] `implementation-notes.md` updated
* [x] Ready for the validate workflow step

***

## Next Steps

Run the validate workflow step for final review.


---

# 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/phase27-session08-dated-predictions-and-story-log/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.
