Files
skills/docs/decisions/0001-session-mode-and-learning-contract.md
T
kiskaadee 27b9fd8059 feat(practice): default to delivery mode with scoped practice learning mode
- Default session mode to delivery in profile/AGENTS.md

- Scope practice skill execution to learning mode with automatic return to delivery

- Add decision amendment in docs/decisions/0001-session-mode-and-learning-contract.md
2026-11-01 10:10:33 -05:00

6.5 KiB

type, status, project, date, tags
type status project date tags
decision accepted skills 2026-10-13
learning-contract
session-mode
cognitive-load
git-commit
practice

Adopt Persistent Session Mode and Learning Contract Across Skills

Context and Problem Statement

Autonomous AI agents in the engineering workflow routinely generated finished commit messages, comprehensive journal summaries, and polished technical explanations. While structured and grammatically fluent, this generated output created a fluency illusion: the AI performed the cognitive synthesis while the engineer acted merely as a reviewer, diminishing genuine recall, understanding, and long-term retention.

How should the agent interaction model be restructured so that the engineer actively generates reasoning, practices retrieval, and builds engineering competence without eliminating high-throughput delivery when needed?

Decision Drivers

  • Preservation of cognitive effort for the learner (generation effect, retrieval practice, desirable difficulties).
  • Clear boundary between empirical facts (diffs, test outputs, execution logs) and cognitive interpretation (commit rationale, conceptual synthesis).
  • Deterministic session-wide state across skills without requiring agent reinvention on each turn.
  • Avoidance of "AI slop": prevent AI from fabricating mastery or filling unanswered knowledge gaps.
  • Low friction when time-sensitive delivery is required.

Considered Options

  • Option 1: Ad-hoc prompts per skill execution: Leave behavior to invocation-time user instructions (e.g. typing "don't write it for me" or relying on skill-specific defaults).
  • Option 2: Skill-local learning contracts: Define contract files inside individual skills (e.g. skills/practice/references/learning-contract.md) and reference across skill boundaries.
  • Option 3: Profile-level session state and shared learning contract (Adopted): Define persistent Session mode (learning vs delivery) in profile/AGENTS.md, place profile/learning-contract.md adjacent to it, install both globally via install.sh, and require skills to adapt their behavior accordingly.

Decision Outcome

Chosen option: Option 3: Profile-level session state and shared learning contract, because session mode must be globally authoritative, always present in context via profile/AGENTS.md, and enforceable across skills (practice, git-commit, journal-builder) without creating cross-skill dependency coupling.

Summary of Architectural Commitments

  1. State Machine & Authority Boundary:
    • Two session states: learning (user writes reasoning) and delivery (agent drafts).
    • Mode is set once per session and persists.
    • Only the user may transition states ("learn" / "deliver"); the agent may suggest but never switch states unilaterally.
    • Skill output must visibly display mode: <state>.
  2. The Write Rule & Diagnostic Feedback:
    • In learning mode, the agent provides facts (diff slices, file changes, test outputs) and 0-5 evidence-grounded questions. The user writes the commit messages, explanations, and architectural rationale.
    • Agent feedback is strictly diagnostic (correct, missing, wrong, unsupported) against empirical evidence. Promotional judgment ("masterful", "expert") is forbidden.
    • Unanswered questions remain explicitly open; the agent must not fill gaps.
  3. Assistance Levels & Evidence Separation:
    • Attempts track assistance (independent, hints, substantial, shown-solution).
    • Observed events (commits, passed tests) remain distinct from competence claims.
  4. Author-Driven Git Commits:
    • git-commit inspects diffs and groups slices, but in learning mode prompts the user to draft the Conventional Commit message and only quizzes topological integration strategy when a non-trivial choice exists.

Pros and Cons of the Options

Option 1: Ad-hoc prompts per skill execution

  • Good, because it requires zero architectural changes to existing files.
  • Bad, because it suffers from prompt fatigue, inconsistent enforcement, and default drift back to AI generation.

Option 2: Skill-local learning contracts

  • Good, because it keeps files within the skills/ directory tree.
  • Bad, because other skills (git-commit, document) must import references across peer skill boundaries, creating fragile relative path dependencies and failing if a single skill is uninstalled.

Option 3: Profile-level session state and shared learning contract (Adopted)

  • Good, because profile/AGENTS.md is always loaded in agent context, ensuring uniform visibility and session state propagation.
  • Good, because profile/learning-contract.md establishes a single source of truth for pedagogical invariants.
  • Bad, because it introduces global configuration requirements in install.sh and requires manual user intervention to switch modes.

Consequences

Positive Consequences

  • Prevents the fluency illusion by ensuring the user performs active recall and formulation.
  • Eliminates AI slop in journals and commit histories by substituting AI-generated assessments with user-authored explanations and explicit gap tracking.
  • Restores high-throughput drafting via a single-word mode switch ("deliver").

Negative Consequences & Accepted Trade-offs

  • Commits and learning interactions in learning mode take more time and cognitive effort.
  • Session mode persistence in the agent prompt is subject to context-window attenuation during very long conversations, mitigated by the required mode: <state> banner in skill outputs.

More Information

Amendment (2026-11-01): Default Delivery Mode and Scoped Practice Learning Mode

Context

Asking the user to pick a mode on first skill invocation introduced initial prompt friction during routine delivery work. Additionally, users invoking /practice intentionally seek deliberate practice and Socratic retrieval without wanting to perform a separate manual mode toggle beforehand.

Decision

  1. Default to Delivery: The baseline session mode defaults to delivery without prompting.
  2. Practice Scoped Transition: Invoking practice automatically transitions execution to learning mode for the duration of the practice topic, returning to delivery mode upon completion.
  3. Manual Override Preserved: The user retains full control to manually switch session modes ("learn" / "deliver") at any time.