> 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/phases/phase_21/session_02_project_windows_skill_roi_defaults.md).

# Session 02: Project Windows And Skill ROI Defaults

**Session ID**: `phase21-session02-project-windows-skill-roi-defaults` **Status**: Not Started **Estimated Tasks**: \~16-22 **Estimated Duration**: 2-4 hours

***

## Objective

Correct recent project semantics and restore useful per-skill saved-time defaults so project history and ROI surfaces stop presenting misleading activity or zero-value saved-time rows.

***

## Source Reference Detail

### A4 Recent Projects And allProjects

* v2.3 filters `recentProjects` to projects modified within the last seven days and adds `allProjects` for long-tail history: [V23/scripts/aggregate.ts:1288](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/scripts/aggregate.ts:1288) through `:1323`.
* v2.3 rationale: the old top-10-ever list was labeled 7d and could include 17-28-day-old projects.
* aios currently emits top-10 all-time as `recentProjects`, with no seven-day filter and no `allProjects`: [AIOS/scripts/lib/aggregate-orchestration.ts:1112](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/scripts/lib/aggregate-orchestration.ts:1112) through `:1122`.

### A5 Per-Skill Default Minutes

* v2.3 defines `getDefaultMinutes(name)` through a prefix-regex table and a generic five-minute fallback: [V23/src/lib/time-saved.ts:8](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/src/lib/time-saved.ts:8) through `:89`.
* v2.3 home wiring uses that function for skill rows: [V23/src/routes/index.tsx:16088](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/src/routes/index.tsx:16088) and [V23/src/routes/index.tsx:16108](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/claudeos/claude-os-v2.3/src/routes/index.tsx:16108).
* aios currently has `getDefaultMinutes(_name)` returning zero: [AIOS/src/lib/time-saved.ts:23](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/src/lib/time-saved.ts:23).
* aios already imports and uses the helper: [AIOS/src/lib/time-saved.ts:91](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/src/lib/time-saved.ts:91).
* Decision: port v2.3's table verbatim as the starting point; change an individual default only if it is objectively wrong for the corresponding aios skill.

***

## Scope

### In Scope (MVP)

* Change aggregate output so `recentProjects` means projects modified within the last seven days.
* Preserve count honesty: do not cap `recentProjects` if aios can safely emit the full seven-day list; otherwise document and test the chosen cap.
* Add `allProjects` for long-tail history, with top 30 as the default planned cap unless implementation proves uncapped output is safe.
* Extend `AIOS/src/lib/live-data-types.ts`, `AIOS/src/lib/validate-live-data.ts`, and `AIOS/src/data/live-data.example.json` for `allProjects`.
* Update home or downstream consumers only as needed to avoid broken contracts.
* Port the `SKILL_MINUTE_DEFAULTS` prefix-regex table and generic fallback into `AIOS/src/lib/time-saved.ts`.
* Add tests for recent-project filtering, `allProjects`, known skill defaults, unknown skill fallback, and current aios usage of saved-time values.

### Out of Scope

* Reclassifying old projects as recent for display convenience.
* Hand-tuning every aios-only skill minute estimate.
* Adding Antigravity saved-equivalent data; Phase 22 owns that after B1.

***

## Prerequisites

* [ ] Session 01 complete or no conflicting aggregate shape changes pending.
* [ ] Confirm the project record fields available for last-modified filtering.
* [ ] Confirm any UI selectors that consume `recentProjects`.

***

## Deliverables

1. True seven-day `recentProjects` output.
2. Long-tail `allProjects` output with type, validator, and fixture support.
3. Per-skill default minutes table with five-minute generic fallback.
4. Tests covering filtering and saved-time defaults.

***

## Success Criteria

* [ ] Projects older than seven days no longer appear in `recentProjects`.
* [ ] Long-tail project history is available through `allProjects`.
* [ ] Live-data validation accepts both new and old payloads safely.
* [ ] Known v2.3 skill prefixes receive the planned default minute values.
* [ ] Unknown skills receive a generic five-minute default instead of zero.
* [ ] Existing ROI math uses the defaults without showing avoidable zero-dollar saved rows.


---

# 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/phases/phase_21/session_02_project_windows_skill_roi_defaults.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.
