git:20260930.3c0bf22 to git:20260930.2ecacf7

58 added, 145 removed. Audit B to B.

---
name: lulu-approach
---
# lulu-approach
- Domain holder for technical diagnostic decisions. It orchestrates one `decision`
- session under approach constraints; scripts own transitions, validation, and
- persistence.
+ Domain holder for technical diagnostic decisions. It orchestrates one `decision` session under approach constraints; scripts own transitions, validation, and persistence.
## Prerequisites
<HARD-GATE>
- Do NOT proceed until you have read `../_runtime.md` and loaded:
+ Do NOT proceed until you have read `../_runtime.md` and `../decision/SKILL.md` in full, and loaded:
- `$SKILL_ROOT`, `$WORKFLOW_DIR`, `$PLATFORM`, `$CACHE_DIR` from `## Platform Context`
- `$SKILL_DIR` = `$SKILL_ROOT/lulu-approach` (before Session Foundation)
+ - `$DECISION_SKILL_DIR` = `$SKILL_ROOT/decision`
+ - `$APPROACH_ROOT` = `$CACHE_DIR/<cycle_id>/lulu-approach` (the decision session)
- Feature identification logic from `## Session Foundation`
</HARD-GATE>
- <HARD-GATE>
- Do NOT proceed until you have read `../decision/SKILL.md` in full.
- All DDF rules, gates, and registers defined there apply to this session.
- </HARD-GATE>
-
- `$DECISION_SKILL_DIR` = `$SKILL_ROOT/decision`
- `$APPROACH_ROOT` = `$CACHE_DIR/<cycle_id>/lulu-approach`
-
- The decision session is `$APPROACH_ROOT`.
-
- Use `$SKILL_DIR/constraints-$CYCLE_TYPE.json` on every approach and decision
- invocation. Do not read session data files for routing.
-
## Script Macros
### Local approach macros
| Macro | Command |
|-------|---------|
| `$RESOLVE_CONTEXT` | `python3 "$SKILL_DIR/scripts/resolve_context.py" --project-root "$(pwd)" --cycle-id "<cycle_id>" --constraints "$SKILL_DIR/constraints-$CYCLE_TYPE.json" [--session-dir "<approach_root>"]` |
| `$RESOLVE_CONTEXT_DOCS` | `python3 "$SKILL_DIR/scripts/resolve_context_docs.py" --project-root "$(pwd)" --cycle-id "<cycle_id>" --constraints "$SKILL_DIR/constraints-$CYCLE_TYPE.json"` |
| `$RESOLVE_CONSTRAINT_DOCS` | `python3 "$SKILL_DIR/scripts/resolve_constraint_docs.py" --project-root "$(pwd)" --cycle-id "<cycle_id>" --constraints "$SKILL_DIR/constraints-$CYCLE_TYPE.json"` |
| `$APPROACH_SHELL` | `python3 "$SKILL_DIR/scripts/approach_shell_control.py" --approach-root "$APPROACH_ROOT"` |
| `$APPROACH_SESSION` | `python3 "$SKILL_DIR/scripts/approach_shell_control.py" --approach-root "$APPROACH_ROOT" <subcommand> --project-root "$(pwd)" --cycle-id "<cycle_id>" --constraints "$SKILL_DIR/constraints-$CYCLE_TYPE.json"` |
| `$APPROACH_DELIVER` | `python3 "$SKILL_DIR/scripts/approach_shell_control.py" --approach-root "$APPROACH_ROOT" deliver --cycle-id "<cycle_id>" --project-root "$(pwd)" --confirm` |
### Imported decision macros
| Macro | Command |
|-------|---------|
| `$DEC_START` | `python3 "$DECISION_SKILL_DIR/scripts/dec_start.py" --project-root "$(pwd)" --cycle-id "<cycle_id>" --constraints "<constraints_path>" [--domain-constraints-file "<path>"] [--session-dir "<session_dir>"]` |
| `$DEC_REOPEN` | `python3 "$DECISION_SKILL_DIR/scripts/dec_reopen.py" --project-root "$(pwd)" --cycle-id "<cycle_id>" --constraints "<constraints_path>" [--permit "<permit_path>"]` |
| `$GATE_CONTROL` | `python3 "$DECISION_SKILL_DIR/scripts/dec_gate_control.py" --project-root "$(pwd)" --cycle-id "<cycle_id>" --constraints "<constraints_path>"` |
| `$GET_PAYLOAD` | `$GATE_CONTROL get-payload` |
| `$BATCH_RECLOSE` | `python3 "$DECISION_SKILL_DIR/scripts/dec_gate_control.py" --project-root "$(pwd)" --cycle-id "<cycle_id>" --constraints "<constraints_path>" batch-reclose --payloads '<json object>'` |
| `$REGISTER_COMMIT` | `python3 "$DECISION_SKILL_DIR/scripts/dec_register_control.py" --project-root "$(pwd)" --cycle-id "<cycle_id>" --constraints "<constraints_path>" register-commit --operations '<json array>'` |
| `$RS_COMMIT` | `python3 "$DECISION_SKILL_DIR/scripts/dec_gate_control.py" --project-root "$(pwd)" --cycle-id "<cycle_id>" --constraints "<constraints_path>" rs-commit --gate "<G>" --operations '<json array>'` |
| `$SESSION_INTEGRITY` | `python3 "$DECISION_SKILL_DIR/scripts/dec_session_integrity.py" --project-root "$(pwd)" --cycle-id "<cycle_id>" --constraints "<constraints_path>"` |
- Subcommand and stdout contracts remain in script module docstrings or `--help`.
-
- ## Outer spine
-
- ```text
- session Completed → PackageReady → stage Delivered
- ```
-
- Node/session **Completed** (`$GATE_CONTROL complete`) is not approach-stage
- **Delivered** (`$APPROACH_DELIVER`). After the session Completes, enter
- PackageReady and stage-deliver.
-
- ## Load Context (before session enter)
-
- **Entry:** About to enter the session. Do not call `$DEC_START` yet.
-
- **Act:**
-
- 1. Run `$RESOLVE_CONTEXT_DOCS`. Parse stdout for `files`.
- 2. For each path in `files`, read the file once.
- If `files` is empty, skip reading and continue.
- 3. Load `$SKILL_DIR/references/context-rules.md`.
- 4. Apply Context rules for this entry:
- - Follow the sections in order
- (Principle → Context materials → Obligation → Body entry → Self-check).
- - Do not classify documents into kinds yourself.
-
- **Done:** Context materials (if any) and Context rules are loaded and applied.
+ `<constraints_path>` is `$SKILL_DIR/constraints-$CYCLE_TYPE.json`.
- **Stop:** On non-zero output, stop and report stderr.
+ - Subcommand and stdout contracts remain in script module docstrings or `--help`.
+ - Any command that exits non-zero stops the flow: report stderr.
- ## Load Constraint (before session enter)
+ ## Shared procedures
- **Entry:** [Load Context (before session enter)](#load-context-before-session-enter)
- is complete. Do not call `$DEC_START` yet.
+ Steps that Start, Resume, and Reopen invoke by name.
- **Act:**
+ ### Pre-entry loading
- 1. Run `$RESOLVE_CONSTRAINT_DOCS`. Parse stdout for `files`.
- 2. For each path in `files`, read the file once.
- If `files` is empty, skip reading and continue.
- 3. Load `$SKILL_DIR/references/constraint-rules.md`.
- 4. Apply Constraint rules for this entry:
- - Follow the sections in order
- (Principle → Constraint materials → Obligation → Body entry → Self-check).
- - Do not classify documents into kinds yourself.
+ Run before `$DEC_START`, `$APPROACH_SESSION enter`, or `$APPROACH_SESSION reopen`. For each kind, in this order:
- **Done:** Constraint materials (if any) and Constraint rules are loaded and
- applied.
+ | Kind | Docs macro | Rules |
+ |------|------------|-------|
+ | Context | `$RESOLVE_CONTEXT_DOCS` | `$SKILL_DIR/references/context-rules.md` |
+ | Constraint | `$RESOLVE_CONSTRAINT_DOCS` | `$SKILL_DIR/references/constraint-rules.md` |
- **Stop:** On non-zero output, stop and report stderr.
+ 1. Run the docs macro. Parse stdout for `files`.
+ 2. Read each path in `files` once. If `files` is empty, skip reading.
+ 3. Load the rules file and apply its sections in order (Principle → materials → Obligation → Body entry → Self-check). Do not classify documents into kinds yourself.
- ## Shared context activation
+ ### Context activation
- **Entry:** `$DEC_START`, `$APPROACH_SESSION enter`, or
- `$APPROACH_SESSION reopen` returned `context_docs`.
+ Run after `$DEC_START`, `$APPROACH_SESSION enter`, or `$APPROACH_SESSION reopen` returns `context_docs`:
- **Act:** Run `$GATE_CONTROL resolve-context`, read each returned `context_docs`
- path once, then declare the active session. Use only the newly pinned `$CTX`.
- Do **not** re-run Load Context or Load Constraint.
- (Those run only before session enter.)
+ 1. Run `$GATE_CONTROL resolve-context` and pin `$CTX`.
+ 2. Read each returned `context_docs` path once.
+ 3. Declare the active session to the user. Use only the newly pinned `$CTX`.
- **Done:** `$CTX` is pinned, the listed documents are loaded, and the active
- session is declared to the user.
+ Do not re-run Pre-entry loading; it runs only before session entry.
- **Stop:** On non-zero output, stop and report stderr.
+ ## Routes
- ## Session
+ Resume and Reopen require the approach shell in Session state. From PackageReady or Delivered, report an unsupported state and stop.
- **Entry:** Session Foundation is complete.
+ ### Start
- **Act:**
+ Once Session Foundation is complete:
- 1. Complete [Load Context (before session enter)](#load-context-before-session-enter).
- 2. Complete [Load Constraint (before session enter)](#load-constraint-before-session-enter).
- 3. Run `$RESOLVE_CONTEXT` with `--session-dir "$APPROACH_ROOT"`; capture
- stdout path as `$RESOLVED_CONTEXT_PATH`.
- 4. Run `$APPROACH_SHELL init-shell`.
- 5. Run `$DEC_START` with:
+ 1. Complete [Pre-entry loading](#pre-entry-loading).
+ 2. Run `$RESOLVE_CONTEXT` with `--session-dir "$APPROACH_ROOT"`; capture stdout path as `$RESOLVED_CONTEXT_PATH`.
+ 3. Run `$APPROACH_SHELL init-shell`.
+ 4. Run `$DEC_START` with:
```bash
--constraints "$SKILL_DIR/constraints-$CYCLE_TYPE.json" \
--domain-constraints-file "$RESOLVED_CONTEXT_PATH" \
--session-dir "$APPROACH_ROOT"
```
- 6. Complete [Shared context activation](#shared-context-activation).
- Do **not** re-run Load Context or Load Constraint here.
- 7. Run the delegated DDF on Active. DC close includes `$GATE_CONTROL complete`.
-
- **Done:** The session is **Completed**.
-
- **Exit:** Continue with
- [PackageReady → stage Deliver](#packageready--stage-deliver).
-
- **Stop:** On non-zero output, stop and report stderr. If `$DEC_START` reports a
- blocked prior stage, report that stage and do not retry.
-
- ## PackageReady → stage Deliver
-
- **Entry:** The session is Completed.
-
- **Act:**
+ If it reports a blocked prior stage, report that stage and do not retry.
+ 5. Complete [Context activation](#context-activation).
+ 6. Run the delegated DDF on Active. DC close includes `$GATE_CONTROL complete`.
- 1. Run `$APPROACH_SHELL enter-package-ready`.
- 2. Run `$APPROACH_DELIVER`.
- Session Completed authorizes this deliver.
+ When the session is Completed, continue with [Deliver](#deliver).
- **Done:** On `$APPROACH_DELIVER` success, announce stage complete from stdout
- `next_steps` (join when non-empty).
+ ### Resume
- **Stop:** On non-zero output, stop and report.
+ When Active remains this session:
- ## Reopen paths
+ 1. Complete [Pre-entry loading](#pre-entry-loading).
+ 2. Run `$APPROACH_SESSION enter`.
+ 3. Complete [Context activation](#context-activation).
- Before `$APPROACH_SESSION reopen`, retain the currently declared source outer
- state. If it is unknown, stop and report; do not infer it from files. Until the
- reopen completes, do not enter PackageReady or stage deliver.
+ Then resume the delegated DDF on Active.
### Reopen
- **Entry:** The source outer state is known.
-
- **Act:**
-
- 1. Complete [Load Context (before session enter)](#load-context-before-session-enter).
- 2. Complete [Load Constraint (before session enter)](#load-constraint-before-session-enter).
- 3. Run `$APPROACH_SESSION reopen`. Capture stdout `permit_path` as
- `$PERMIT_PATH` and `transaction_id` as `$TRANSACTION_ID`.
- 4. Complete [Shared context activation](#shared-context-activation).
- 5. Run `$DEC_REOPEN --permit "$PERMIT_PATH"`, perform RS dialogue, then run
- `$RS_COMMIT --gate "<G>" --operations '<json array>'`.
- 6. Run `$APPROACH_SESSION complete-reopen --transaction-id "$TRANSACTION_ID"`.
-
- **Done:** The session is repaired.
-
- **Exit:** Resume the delegated DDF on Active.
-
- **Stop:** On non-zero output, stop and report stderr.
-
- ### Same-Active restore
+ Requires the approach shell in Session state. If the state is unknown, stop and report rather than infer it from files.
- **Entry:** Active remains this session.
+ 1. Complete [Pre-entry loading](#pre-entry-loading).
+ 2. Run `$APPROACH_SESSION reopen`. Capture stdout `permit_path` as `$PERMIT_PATH` and `transaction_id` as `$TRANSACTION_ID`.
+ 3. Complete [Context activation](#context-activation).
+ 4. Run `$DEC_REOPEN --permit "$PERMIT_PATH"`, perform RS dialogue, then run `$RS_COMMIT --gate "<G>" --operations '<json array>'`.
+ 5. Run `$APPROACH_SESSION complete-reopen --transaction-id "$TRANSACTION_ID"`.
- **Act:**
+ Once the session is repaired, resume the delegated DDF on Active. Do not enter Deliver before then.
- 1. Complete [Load Context (before session enter)](#load-context-before-session-enter).
- 2. Complete [Load Constraint (before session enter)](#load-constraint-before-session-enter).
- 3. Run `$APPROACH_SESSION enter`, then complete
- [Shared context activation](#shared-context-activation).
+ ### Deliver
- **Done:** Resume the session.
+ Once the session is Completed (`$GATE_CONTROL complete`), enter PackageReady before delivering; Completed is not stage Delivered (`$APPROACH_DELIVER`):
- **Stop:** On non-zero output, stop and report stderr.
+ 1. Run `$APPROACH_SHELL enter-package-ready`.
+ 2. Run `$APPROACH_DELIVER`. Session Completed authorizes this deliver.
- PackageReady and stage-Delivered are not normal reopen entry states; report an unsupported
- state instead.
+ On success, announce stage complete from stdout `next_steps` (join when non-empty).
## Interrupted binding
- **Entry:** A normal entry or reopen reports an unresolved binding.
-
- **Act:** Stop and report the binding ID and state from stderr.
-
- **Done:** An explicit human recovery decision is received.
+ When any route reports an unresolved binding:
- **Stop:** Do not auto-select `compensate-active` or `cancel`.
- After external recovery, restart the applicable documented entry route and obtain
- fresh command output; do not infer the restored target.
+ 1. Stop and report the binding ID and state from stderr.
+ 2. Wait for an explicit human recovery decision; do not auto-select `compensate-active` or `cancel`.
+ 3. After external recovery, restart the applicable route and obtain fresh command output; do not infer the restored target.