PWR-HYBRID-3/claude_memory/2026-04-16-repo-restructure.md
Dane Sabo cebf8c167a Initial umbrella repo: thesis + FRET pipeline + plant model with first controllers
Folds three previously-separate pieces into one preliminary-example repo
for the HAHACS thesis:

- thesis/ (submodule) → gitea Thesis.git — the PhD proposal
- fret-pipeline/ — FRET requirements to AIGER controller (was
  ~/Documents/fret_processing/; prior single-commit history abandoned
  per user decision)
- plant-model/ — 10-state PKE + lumped T/H PWR model (was
  ~/Documents/PKE_Playground/; never version-controlled before)
- presentations/2026DICE/ (submodule) → gitea 2026DICE.git
- reachability/, hardware/ — empty placeholders for Thrust 3 and HIL
- docs/architecture.md — how the discrete and continuous layers compose
- claude_memory/ — session notes and scratch knowledge pattern

Plant model refactored to thesis naming (x, plant, u, ref); pke_th_rhs
now takes u as an explicit arg instead of reading rho_ext from the
params struct. First two controllers built to the contract
u = ctrl_<mode>(t, x, plant, ref): ctrl_null (baseline) and
ctrl_operation (stabilizing, proportional on T_avg). Validated under a
100% -> 80% Q_sg step: ctrl_operation reduces steady-state T_avg drift
~47% vs. the unforced plant.

Root CLAUDE.md emphasizes that CLAUDE.md files are living documents and
that any knowledge not captured before a session ends is lost forever;
claude_memory/ holds the session-level notes that haven't stabilized
enough to graduate into a CLAUDE.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 16:24:11 -04:00

95 lines
4.9 KiB
Markdown

# 2026-04-16 — repo restructure
Folded three previously-separate pieces into this umbrella repo. Created the
initial layout, the root `CLAUDE.md`, `README.md`, `docs/architecture.md`,
and `fret-pipeline/CLAUDE.md`.
## What we did
- Created `~/Documents/pwr-hybrid-3-demo/` as the umbrella repo (`git init`,
`main` branch, not yet pushed to any remote).
- Copied `~/Documents/fret_processing/``fret-pipeline/` via `rsync`
excluding `.git`, `.DS_Store`, `.claude`, `__pycache__`. **Git history
abandoned by explicit user decision** — the old single-commit history did
not carry forward.
- Copied `~/Documents/PKE_Playground/``plant-model/` via `rsync`. Never
was a git repo; nothing to abandon.
- Added `thesis/` as a submodule pointing at
`ssh://git@gitea.danesabo.com:1738/danesabo/Thesis.git` (also has GitHub
mirror at `namelessfaceless/dissertation`).
- Added `presentations/2026DICE/` as a submodule pointing at
`ssh://git@gitea.danesabo.com:1738/danesabo/2026DICE.git`.
- Created empty placeholders: `reachability/`, `hardware/`, `docs/figures/`.
## What we decided and why
- **Monorepo with thesis as a submodule, not the reverse.** Code iterates
daily, thesis weekly. A slow parent with fast children is painful; a fast
parent pointing at a slow submodule matches the actual cadence. Also
preserves the thesis's independent git history for advisor/committee use.
- **Copy, not move.** Old `~/Documents/fret_processing/` and
`~/Documents/PKE_Playground/` still exist. User will delete them later;
this gives a safe rollback window.
- **Folder renames:** `fret_processing``fret-pipeline` (more accurate —
it's a pipeline, not a processing step), `PKE_Playground``plant-model`
(describes function not content). Both switched to hyphens for consistency.
- **No `git init` on `PKE_Playground` before the move** — user said to skip
it and fold in clean.
- **Used `git submodule add`, not `git subtree`.** Submodule pain
acknowledged (detached HEAD, two-step commits, `--recurse-submodules` on
clone) but accepted in exchange for preserving the thesis's independent
git life. Revisit if pain outweighs benefit.
## Things that surprised us / are worth remembering
- The thesis's Figure 1 (Cold Shutdown → Heatup → Power Operation + SCRAM)
and the `fret-pipeline/` running example `PWR_HYBRID_3` are the same
automaton. This is the integration point — the figure should eventually
be swapped from hand-drawn TikZ to `\includegraphics` of a generated
state-machine PNG.
- The plant model's state vector `[n; C1..C6; T_f; T_c; T_cold]` exposes
exactly the quantities the FRET predicates reference (`T_avg = T_c`,
`T_hot = 2*T_c - T_cold`). The two layers are already semantically
aligned; nobody wired them because they were in different folders.
- `Q_sg(t)` is the physical input, not `T_cold`. Cold leg temperature is a
dynamic state that *results from* SG heat removal. This matters for the
reachability/barrier-cert formulation where `Q_sg ∈ [Q_min, Q_max]` is
the bounded disturbance.
- `fret_to_synth.py` adds a mutual-exclusion LTL constraint because
decomposing `control_mode = q_X` into independent booleans lets the
synthesizer assert multiple modes simultaneously. **This is a synthesis
encoding artifact, not a missing FRET requirement.** Do not add it in
FRET.
## Open items (for future sessions)
- **`presentations/2026DICE/` submodule reflects gitea HEAD, not user's
local state.** The original `~/Documents/Writing/2026DICE/` had
uncommitted changes: `M DANE_SABO_ABSTRACT.pages` plus three untracked
PDFs (`DANE_SABO.pdf`, `DANE_SABO_ABSTRACT.pdf`, `DANE_SABO_ABSTRACT_V2.pdf`,
`DANE_SABO_ABSTRACT_V3.pdf`). If user wants these in the submodule, commit
from the original location, push to gitea, then from umbrella:
`cd presentations/2026DICE && git pull` and commit the new pointer.
- **Old folders not yet deleted.** `~/Documents/fret_processing/` and
`~/Documents/PKE_Playground/` still live at their old paths. Delete when
user confirms the umbrella is working.
- **No initial commit yet.** Everything is staged but uncommitted. User
wanted to review the four new docs before committing.
- **No remote yet.** Need to create `gitea.danesabo.com/danesabo/pwr-hybrid-3-demo`
and `git remote add origin` + push.
- **`fret-pipeline/README.md` still says `fret_processing/` in its directory
structure section.** Didn't update — it's a minor inconsistency but worth
fixing on the next pass.
- **No bridge between discrete and continuous layers yet.** The whole point
of the umbrella is to eventually wire them — `reachability/` is where
that work lands. Not started.
## Paths touched
- Created: `/Users/danesabo/Documents/pwr-hybrid-3-demo/` (entire tree)
- Untouched: `/Users/danesabo/Documents/fret_processing/`,
`/Users/danesabo/Documents/PKE_Playground/`,
`/Users/danesabo/Documents/Writing/Thesis/`,
`/Users/danesabo/Documents/Writing/2026DICE/` — all still present,
unchanged.