Skip to content
Back to skills

Session Intent Analyzer

ASecurity

Records the response model's new or changed interpretation of the input the response model is answering as its `interpreted-as` record before the first tool call of work, and reads that record when it can change the objective, constraints, work choice or whether earlier work continues.

  • 15 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 28, 2026
ai-agentspythongobashsqlapi

Works with

  • api

Security analysis

A100/100

Scanned November 23, 2026

npx -y skills add AidALL/ghost-alice --skill session-intent-analyzer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Session Intent Analyzer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Session Intent Analyzer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aidall-session-intent-analyzer/badge)](https://www.skillsdirectory.com/skills/aidall-session-intent-analyzer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: session-intent-analyzer
description: "Records the response model's new or changed interpretation of the input the response model is answering as its `interpreted-as` record before the first tool call of work, and reads that record when it can change the objective, constraints, work choice or whether earlier work continues."
compatibility:
  - "Python 3.11+ standard library"
  - "Ghost-ALICE _shared folder, installed beside the skill"
  - "hook-capable environments"
calls:
  - "soft:skill-evolution"
---

# Session Intent Analyzer

Core code records the identity of a prompt the host delivers under the user role in the intent ledger without keeping its text. Canonical intake provenance below defines when each host's prompt becomes the recorded input. The common contract's Session Intent section sets when the response model records its `interpreted-as: ` interpretation; this skill defines the record's fields. Following task-router, the response model selects the work and the skills for the input the response model is answering, within the objective, constraints and acceptance criteria that the current `interpreted-as` record holds, when one applies.

## The response model's interpreted-as record and references

First identify the stored fact that can change the next decision. A source lookup can proceed from the input the response model is answering and the session metadata without reading the ledger. Read the stored `interpreted-as` record when it can affect the objective, the constraints, whether work that the human user's instructions authorize continues, the work selection or a semantic update (a ledger write through `--delta-json`). When the decision depends on no stored state and needs no semantic update, do not read the ledger and proceed with the selected work.

To read the stored `interpreted-as` record, run `scripts/session_intent_ledger.py --read-intent` with `ledger_root`, `platform` and `session_id` from the session metadata. The result holds the routing keywords, the input they were written for, the current input and revision, and JSON pointers to detailed state. Keywords alone do not establish that the work is complete or that the keywords still apply.

The response model writes the `interpreted-as: ` record as a semantic update: `current_goal` holds the objective, `constraints` and `non_goals` hold the constraints, and `acceptance_criteria` holds the acceptance criteria, each with the source label that the common contract's Session Intent section names. The ledger stores a new acceptance criterion labeled `interpreted-as` with `selectable: false`, so a response route cannot select it; report such an acceptance criterion as an assumption together with the result. When the human user approves it, update that acceptance criterion with `selectable: true`. `routing_keywords` holds short terms for selecting work and `routing_summary` holds a concise current objective, the relevant constraints, the latest decision and who made it (the human user or the response model), and the next action; each write replaces the earlier value. Neither field contains prompt text, tool output, full documents or repeated history. Send no update when nothing changed. `constraints`, `non_goals` and `open_questions` hold current values. Supply a field's complete current value only when it changes, and an empty list to remove all of its entries. Keep the human user's applicable restrictions when preparing a replacement.

The ledger also holds detailed work, authority and evidence records for the Core code that uses them. When the next decision needs one stored detail, read it by its JSON pointer:

```bash
session_intent_ledger.py --root "<ledger_root>" --platform "<platform>" --session-id "<session_id>" --read-state --pointer /latest_scope --expected-input-event-id "<input_event_id>"
```

Pass `--expected-revision` when a pointer with a list index depends on an exact revision. The command returns the selected value with the input and revision it belongs to. When that input or revision has changed, interpret the newer input before writing.

For a semantic update, pass `--delta-json` with only the changed values and pass `--expected-input-event-id` with the current input ID that `--read-intent` returns. Core code keeps only the defined summary fields and the event records it requires. Do not create a second state file or an export only to read the current `interpreted-as` record. The canonical SQLite API, ownership, work contract and correction details are in [references/ledger-schema.md](references/ledger-schema.md); open the relevant section only for that operation.

## Input records and authority

[Canonical intake provenance](references/ledger-schema.md#canonical-intake-provenance) defines how Core code records input on each host; a notification never counts as human authority. A pending input cannot authorize the writes that depend on it. The session that the host reports must match the session selected for a write. Core code reads and validates the ledger state for response route registration, context dispositions, execution that depends on authority, and completion records; supplied prose cannot replace those checks. A read-only lookup of an earlier session does not grant that session's permission to execute.

The response model can record a material correction of its conduct as one compressed `conduct_feedback` entry with a stable ID and a supported source. The response model assigns `user-said` when the human user asserted the correction and `interpreted-as` when the response model directly observed the mismatch. Core code validates the source label, not the sender or the observation's meaning. When the response model proposes a new correction to its conduct, it describes the conduct to change and the target of that correction, then asks the human user for confirmation. The response model does not ask again when recording a correction the human user has already stated. Confirmation of a model-proposed correction does not change the source of the model's observation. A constraint for future work is not evidence of an earlier failure. Task-router uses the current `interpreted-as` record; skill-evolution reads `conduct_feedback` only for its reports.

## Failure modes

Do not accumulate routing keywords, obsolete summaries or resolved questions. A successful ledger write does not establish that the work is complete. Name missing state as an unresolved dependency.

Files in this skill

  • SKILL.md13.2 KB
  • references/ledger-schema.md16.8 KB
  • scripts/session_intent_ledger.py63.6 KB
  • scripts/test_criterion_revision.py3.5 KB
  • scripts/test_session_intent_ledger.py43.4 KB
  • scripts/test_session_intent_transactions.py27.8 KB
  • scripts/test_sqlite_authority.py8.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.