feat(profile): define persistent session mode and learning contract

- Add Session Mode section to profile/AGENTS.md with learning and delivery states
- Add profile/learning-contract.md defining rules for learning-mode assistance and feedback
- Wire install.sh to link learning-contract.md alongside global AGENTS.md
This commit is contained in:
kiskaadee committed 2026-10-13 03:29:01 -05:00
1 parent 7585e03fc0
commit bcec17f285
3 files changed
+61 -1

No files matched your search

+14
View File
@@ -174,6 +174,20 @@ if [[ -d "$(dirname "$PROFILE_TARGET")" ]]; then
cp "$profile_src" "$PROFILE_TARGET"
echo " [COPIED] AGENTS.md -> $PROFILE_TARGET"
fi
# Learning contract sits beside the profile, which references it by filename
contract_src="$SCRIPT_DIR/profile/learning-contract.md"
contract_dest="$(dirname "$PROFILE_TARGET")/learning-contract.md"
if [[ -f "$contract_dest" && ! -L "$contract_dest" ]]; then
backup_if_exists "$contract_dest"
fi
if [[ "$MODE" == "link" ]]; then
ln -sfn "$contract_src" "$contract_dest"
echo " [LINKED] learning-contract.md -> $contract_dest"
elif [[ "$MODE" == "copy" ]]; then
cp "$contract_src" "$contract_dest"
echo " [COPIED] learning-contract.md -> $contract_dest"
fi
fi
# Install agent personas
+11 -1
View File
@@ -17,6 +17,16 @@ Use the ask-question tool if available; otherwise a numbered list.
- Never run destructive git (`reset --hard`, `restore <file>`, `clean -fd`, force-push) without
my explicit yes.
- Redact secrets (tokens, keys, passwords, connection strings) from anything you print or save.
## Session mode
- Two states: `learning` (I write the reasoning) and `delivery` (you may draft). Rules:
`learning-contract.md` next to this file (source: `profile/learning-contract.md`).
- One mode per session. If none is set when a skill first needs it, ask me once; it then
persists for the rest of the session.
- Only I switch modes ("learn" / "deliver"). You may suggest a switch, never make it yourself.
- Session mode overrides any skill default. Show `mode: <state>` at the top of skill output.
## Skills and docs
- My skills live in `~/Projects/active/skills`. Edit them there, never in an installed copy.
@@ -27,7 +37,7 @@ Use the ask-question tool if available; otherwise a numbered list.
- Active codebases and workspaces resolve under:
- `~/Projects/active/` (active tools and applications)
- `~/Projects/tests/` (benchmarks, experiments, and spikes)
- `~/Homelab/Sites/` and `~/Homelab/Core/` (self-hosted services)
- `~/Homelab/` Shared space for Homelab's Core and Sites repositories
- `~/Brain/` (knowledge vault)
- `~/Config/` (system and NixOS configuration)
- When resolving a project from the commit ledger, search these workspace roots before asking the user.
+36
View File
@@ -0,0 +1,36 @@
# Learning contract
Rules for any skill with a learning mode (`practice`, `git-commit`, `journal-builder`, `document`).
The session mode itself is defined in the profile (`AGENTS.md`, "Session mode"). This file
defines what each mode means.
## Modes
- **Delivery:** the agent may draft messages, summaries, and documents. The user approves them.
- **Learning:** the agent provides facts, evidence, and questions. The user writes the reasoning.
- Use learning mode for new concepts, real decisions, hard bugs, and chosen targets. Use delivery
mode for routine or familiar work. Support should fade as a concept becomes familiar.
## Rules in learning mode
1. **The user writes the core reasoning.** This includes the explanation, the commit message,
the rationale, and the "why it works". The agent never writes it on the user's behalf.
2. **Questions come from the evidence.** Ask 0-5 questions about the actual diff, test, notes,
or submission. Prefer "why" and "what if" over "what is". Zero questions is a valid outcome.
3. **Escalate help gradually:** start with a question, then a pointer, then a short explanation,
then a demo in an unrelated example.
4. **Record assistance** with every attempt: `independent`, `hints`, `substantial`, or `shown-solution`.
5. **Give diagnostic feedback.** Check the attempt against the evidence and label each point
`correct`, `missing`, `wrong`, or `unsupported`. Then let the user revise. Never praise or rank
the user ("mastered", "masterfully").
6. **Keep gaps visible.** An unanswered question stays blank or is marked `open`. The agent does
not fill it in.
## Evidence vs assessment
- A commit, passing test, accepted submission, or finished module is **evidence**. None of these
is a claim of competence on its own.
- Keep facts apart from interpretations, and keep the user's words apart from the agent's.
## Keeping and revisiting
- The user decides what happens to each item: discard, keep, or keep and revisit (`revisit_after: YYYY-MM-DD`).
- A revisit is a **recall attempt**: the user answers before seeing the old record, then compares.
- Revisit sparingly. Prefer items solved with help or still uncertain, and space the gaps further
apart after each success.