> 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/phase24-session01-source-local-scoring-signals/tasks.md).

# Task Checklist

**Session ID**: `phase24-session01-source-local-scoring-signals` **Total Tasks**: 25 **Estimated Duration**: 3.5-4 hours **Created**: 2026-06-07

***

## 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          | 3      | 3      | 0         |
| Foundation     | 5      | 5      | 0         |
| Implementation | 12     | 12     | 0         |
| Testing        | 5      | 5      | 0         |
| **Total**      | **25** | **25** | **0**     |

***

## Setup (3 tasks)

Initial verification and session note setup.

* [x] T001 \[S2401] Verify current scoring, schema, source normalization, and Engine Replay extension points (`scripts/lib/ai-runtime/scoring.ts`)
* [x] T002 \[S2401] Record source compliance review for entity identity and placement fields (`.spec_system/specs/phase24-session01-source-local-scoring-signals/implementation-notes.md`)
* [x] T003 \[S2401] Create session security and compliance note shell (`.spec_system/specs/phase24-session01-source-local-scoring-signals/security-compliance.md`)

***

## Foundation (5 tasks)

Core contracts and helper structures.

* [x] T004 \[S2401] \[P] Create source-local signal helper contracts (`scripts/extensions/trend-finder/source-local-signals.ts`)
* [x] T005 \[S2401] Extend source adapter contracts for stable entity identity and placement flags with exhaustive enum handling (`scripts/extensions/trend-finder/sources/types.ts`)
* [x] T006 \[S2401] Extend browser schema with additive source-local evidence fields with types matching declared contract and exhaustive enum handling (`src/extensions/trend-finder/schema.ts`)
* [x] T007 \[S2401] Extend analyst evidence contract with source-local fields and safe defaults (`scripts/lib/ai-runtime/trend-analyst.ts`)
* [x] T008 \[S2401] Extend Engine Trace browser contract for baseline availability and excluded/down-weighted counts with bounded counts and deterministic ordering (`src/extensions/trend-finder/engine-trace.ts`)

***

## Implementation (12 tasks)

Main source-local signal behavior, UI projection, and docs.

* [x] T009 \[S2401] Implement entity identity and placement flag extraction in Apify normalizers with schema-validated input and explicit error mapping (`scripts/extensions/trend-finder/sources/apify-normalizers.ts`)
* [x] T010 \[S2401] Preserve Hacker News unavailable-baseline behavior without author exposure (`scripts/extensions/trend-finder/normalize.ts`)
* [x] T011 \[S2401] Apply source-local baseline computation during collection with failure-path handling and deterministic ordering (`scripts/extensions/trend-finder/collector.ts`)
* [x] T012 \[S2401] Integrate bounded source-local lift into scoring with explicit cap and no ranking override (`scripts/lib/ai-runtime/scoring.ts`)
* [x] T013 \[S2401] Emit sanitized source-local trace events and counts with raw payload exclusion (`scripts/extensions/trend-finder/engine-trace.ts`)
* [x] T014 \[S2401] Add source-local metric and actionability view models with exhaustive enum handling (`src/extensions/trend-finder/view-model.ts`)
* [x] T015 \[S2401] Render source-local ratio and actionability chips with platform-appropriate accessibility labels, focus management, and input support (`src/extensions/trend-finder/components/evidence-metric-chips.tsx`)
* [x] T016 \[S2401] Surface baseline and exclusion summaries in Engine Replay with explicit unavailable and zero-count states (`src/extensions/trend-finder/engine-replay-model.ts`)
* [x] T017 \[S2401] Add score-breakdown bounded-lift context without changing factor list semantics (`src/extensions/trend-finder/components/score-breakdown.tsx`)
* [x] T018 \[S2401] \[P] Update scoring docs for formula, low-sample caps, bounded lift, and actionability semantics (`docs/extensions/trend-finder-scoring.md`)
* [x] T019 \[S2401] \[P] Update source docs for reviewed entity fields and pinned/promoted handling (`docs/extensions/trend-finder-sources.md`)
* [x] T020 \[S2401] \[P] Update runtime/provenance docs for Engine Replay baseline and exclusion labels (`docs/extensions/trend-finder-runtime-and-provenance.md`)

***

## Testing (5 tasks)

Verification and quality assurance.

* [x] T021 \[S2401] \[P] Write helper unit tests for ratio calculation, low samples, missing baselines, exclusions, and bands (`scripts/extensions/trend-finder/__tests__/source-local-signals.test.ts`)
* [x] T022 \[S2401] Extend normalizer tests for entity fields, pinned/promoted exclusion, and private field rejection (`scripts/extensions/trend-finder/sources/__tests__/apify-normalizers.test.ts`)
* [x] T023 \[S2401] Extend scoring tests for bounded lift and six-factor preservation (`scripts/lib/ai-runtime/__tests__/scoring.test.ts`)
* [x] T024 \[S2401] Extend schema tests for legacy payloads and malformed source-local fields (`src/lib/__tests__/trend-finder-schema.test.ts`)
* [x] T025 \[S2401] Run focused Trend Finder tests and ASCII checks (`package.json`)

***

## 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] security-compliance.md updated
* [x] Ready for the validate workflow step

***

## Next Steps

Run the validate workflow step to verify session completeness.


---

# 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/phase24-session01-source-local-scoring-signals/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.
