> 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_15/session_07_timer_unit_rendering_reconciliation.md).

# Session 07: Timer Unit Rendering And Reconciliation

**Session ID**: `phase15-session07-timer-unit-rendering-reconciliation` **Status**: Complete **Estimated Tasks**: \~12 **Estimated Duration**: 2-3 hours

***

## Objective

Optionally use `data/ai-os.scheduler.json` to generate or reconcile local systemd user timer guidance after scoped scheduler jobs are stable.

This is the only timer-management implementation pass in Phase 15. Earlier sessions may report desired timer intent, but they must not install or mutate local timer units.

***

## Scope

### In Scope (MVP)

* Dry-run service/timer rendering from validated config
* Inspect/diff output before install
* Explicit install/uninstall commands only after dry-run tests
* Active systemd user timer drift reporting
* Linux systemd-only documentation
* Legacy Dream cron separation
* Rendered unit files kept out of git

### Out of Scope

* macOS or Windows timer management
* Arbitrary shell commands or unreviewed systemd calendar expressions
* Timer management before scoped jobs are stable

***

## Detailed Tasks

1. Add a dry-run command that renders service/timer units from validated config.
2. Keep rendered unit files out of git.
3. Refuse unsafe working directories or unknown commands.
4. Support inspect/diff output before install.
5. Add explicit install/uninstall commands only after dry-run rendering is tested.
6. Detect active systemd user timers and report drift from local config.
7. Keep legacy Dream cron installer out of this path.
8. Add docs for Linux systemd only; defer macOS/Windows management.
9. Render Dream `time` only after strict `HH:MM` validation and only to safe `*-*-* HH:MM:00` guidance.
10. Ensure drift reporting does not expose private paths or raw config contents.

***

## Prerequisites

* [ ] Session 06 complete.
* [ ] Scoped jobs and config validation are stable.

***

## Deliverables

1. Dry-run timer unit renderer.
2. Optional install/uninstall command path.
3. Drift reporting and systemd-only docs.

***

## Handoff Gate

* [ ] Dry-run rendering, explicit install/uninstall commands, drift reporting, systemd-only docs, and legacy Dream cron separation are complete.
* [ ] Operators can inspect exact rendered units before any install command.
* [ ] No unit file is installed without an explicit command.

***

## Success Criteria

* [ ] Rendered units use only reviewed commands and validated config.
* [ ] Drift reporting does not expose private paths or raw config contents.
* [ ] Legacy Dream cron behavior stays separate.
* [ ] Repo config can be compared to active local timers.


---

# 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_15/session_07_timer_unit_rendering_reconciliation.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.
