domains / agent-tooling / session-open / open
The two copies are unrelated procedures that happen to share the name 'open'. The first is a session bootstrap for an 'aigent-OS' vault (preflight safety, heat index, session log, delegation, decision aging, runtime state). The second is a multi-mode research skill ('last30days') that routes to watchlist, briefing, history, or one-shot research modes. Neither is a reproduction of the other, and crowning one would hide a real alternative.
| Repository | Path |
|---|---|
| davepoon/buildwithclaude | plugins/aigent-os/skills/open/SKILL.md |
| LeoYeAI/openclaw-master-skills | skills/last30days-skill/variants/open/SKILL.md |
| Role | Repository | Path |
|---|---|---|
| peer | davepoon/buildwithclaude | plugins/aigent-os/skills/open/SKILL.md |
| peer | LeoYeAI/openclaw-master-skills | skills/last30days-skill/variants/open/SKILL.md |
# Session Open (Combined)
This skill covers two distinct 'open' workflows. Determine which applies based on the environment and user intent.
## Workflow A: aigent-OS Session Bootstrap
Use when `$AIGENT_ROOT` is set and the user is starting a normal working session in an aigent-OS environment.
1. **Preflight Safety Check**
- Verify `$AIGENT_ROOT` is set and `vault/memory/` and `vault/daily/` exist.
- If not, STOP and tell the operator to run `/setup`.
- Run the read-only vault check script. If it prints `STOP`, halt.
2. **First-Run Detection**
- Read `.aigent/state.json`. If `status` is not `ready`, run `/start`.
- If JSON is missing but `.aigent/first-run-done` exists, create the JSON state.
3. **Unbanked-Session Recovery**
- Compare `.aigent/last-close` with newest Session Captures in `vault/daily/`.
- If newer captures exist, recover a summary into `vault/memory/SESSION_LOG.md` marked `(auto-recovered)`.
4. **Load Context**
- Read `vault/memory/HEAT_INDEX.json` (if present) for prioritized reading.
- Read latest daily note, session log, active priorities, delegation tracker.
- Follow the graph into 3-5 relevant notes.
- Check decision aging (30/60/90 days) and attention reconciliation.
- Weekly: check skill gaps.
5. **Compute Runtime State**
- Run `python3 "$AIGENT_ROOT/daemons/runtime/update-active-state.py"`.
- Read `vault/memory/runtime/ACTIVE_STATE.json`.
6. **Output**
- Greet the operator and surface only due decisions, material drift, stale items, dropped work, and open threads.
## Workflow B: last30days Research Skill
Use when the user invokes `last30` or `last30days` with a research, watchlist, briefing, or history request.
1. **Find Skill Root**
- Locate `scripts/last30days.py` in standard skill directories.
2. **Load Context**
- Read `variants/open/context.md` for user preferences.
3. **Route Command**
- Parse the first argument:
- `watch` → Read `references/watchlist.md`
- `briefing` → Read `references/briefing.md`
- `history` → Read `references/history.md`
- *(other)* → Read `references/research.md`
4. **Execute Mode**
- Follow the instructions in the corresponding reference file exactly.
- Use SQLite database at `~/.local/share/last30days/research.db`.
- Check API keys in `~/.config/last30days/.env` or environment variables.