> 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/specs/phase41-session01-local-access-startup-contract/tasks.md).

# Task Checklist

**Session ID**: `phase41-session01-local-access-startup-contract` **Total Tasks**: 18 **Estimated Duration**: 3-4 hours **Created**: 2026-07-03

***

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

***

## Setup (2 tasks)

* [x] T001 \[S4101] Verify current startup env behavior in `package.json`, `vite.config.ts`, `scripts/dev.sh`, and `scripts/cleandev.sh` (`package.json`)
* [x] T002 \[S4101] Create the local access env helper owner with canonical key and legacy alias constants (`scripts/lib/local-access-env.ts`)

***

## Foundation (4 tasks)

* [x] T003 \[S4101] Implement all-access default normalization with explicit handling for unset and compatibility env values (`scripts/lib/local-access-env.ts`)
* [x] T004 \[S4101] Implement Hermes and OpenClaw legacy alias resolution from `AI_OS_LOCAL_ALL_ACCESS=1` without weakening production or token checks (`scripts/lib/local-access-env.ts`)
* [x] T005 \[S4101] \[P] Add helper unit coverage for unset defaults, explicit all-access values, and legacy alias preservation (`scripts/lib/__tests__/local-access-startup.test.ts`)
* [x] T006 \[S4101] \[P] Add static startup fixture readers for package and shell launch contract assertions (`scripts/lib/__tests__/local-access-startup.test.ts`)

***

## Implementation (7 tasks)

* [x] T007 \[S4101] Update the `dev` script to seed and launch Vite with `AI_OS_LOCAL_ALL_ACCESS=1` as the normal local default (`package.json`)
* [x] T008 \[S4101] Wire Vite bridge env resolution through the local access helper before Hermes and OpenClaw middleware register (`vite.config.ts`)
* [x] T009 \[S4101] Update `scripts/dev.sh` to export and pass `AI_OS_LOCAL_ALL_ACCESS=1` into the tmux server environment (`scripts/dev.sh`)
* [x] T010 \[S4101] Update `scripts/cleandev.sh` launch setup to export the same all-access contract in default, configured, and restart modes (`scripts/cleandev.sh`)
* [x] T011 \[S4101] Update `scripts/cleandev.sh` tmux args to pass `AI_OS_LOCAL_ALL_ACCESS` alongside existing PATH, extension, and Dream env (`scripts/cleandev.sh`)
* [x] T012 \[S4101] Update the clean-dev Hermes runtime hint to report real readiness, token, dependency, or offline failures instead of manual admin env setup (`scripts/cleandev.sh`)
* [x] T013 \[S4101] Update local env template guidance so `AI_OS_LOCAL_ALL_ACCESS=1` is the normal contract and admin env keys are legacy aliases (`.env.local.example`)

***

## Testing (5 tasks)

* [x] T014 \[S4101] Add static regression assertions that `bun run dev`, `scripts/dev.sh`, and `scripts/cleandev.sh` establish `AI_OS_LOCAL_ALL_ACCESS=1` (`scripts/lib/__tests__/local-access-startup.test.ts`)
* [x] T015 \[S4101] Add Vite env regression assertions for Hermes and OpenClaw compatibility alias derivation from local all-access (`scripts/lib/__tests__/local-access-startup.test.ts`)
* [x] T016 \[S4101] Run the focused startup regression test command (`bun run test -- scripts/lib/__tests__/local-access-startup.test.ts`)
* [x] T017 \[S4101] Run script type checking for the local access helper (`bun run typecheck:scripts`)
* [x] T018 \[S4101] Validate ASCII and LF requirements for new spec, task, helper, and test files (`.spec_system/specs/phase41-session01-local-access-startup-contract`)

***

## Completion Checklist

* [x] All tasks marked `[x]`
* [x] All tests and checks passing
* [x] All files ASCII-encoded with LF line endings
* [x] implementation-notes.md updated
* [x] Ready for `creview` (next step in the implement -> creview -> validate sequence)

***

## Next Steps

Run the `creview` 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/specs/phase41-session01-local-access-startup-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.
