Skip to content

[engine] Wire the discretionary journal: repo methods, CLI entry (human attestation), web read view #705

Description

@eaitbrahim

Context (verified)

The journal table is declared in schema but dead: emotion_score, rules_followed, errors_made, dollar_impact, chart_note, screenshot_ref — columns with no Repository methods and no read/write path anywhere in the code (keel/data/db.py).

No competitor has this feature at all, and keel's version has a dimension they can't copy: it is a human-sourced attestation — self-scored discipline, honestly separated from venue-reported fills.

Scope

  1. Repository methods for journal (append, list with date bounds). The table already exists — no migration needed; this is wiring, not schema work.
  2. CLI entry: keel journal add on the interactive surface (prompted fields: emotion score, rules followed, errors made, dollar impact, chart note, screenshot ref) and keel journal list. Entry is CLI-only by constitution: attestations are human-sourced or refused — never a web form, never piped.
  3. Web read view (Portfolio · Journal): chronological entries beside the closed-trade journal, with the dollar_impact column rendered as a Field and a visible SELF-REPORTED provenance marker so self-assessment is never visually confusable with venue facts.
  4. Journal rows join the unified Activity timeline ([web] Activity: a unified timeline (cycles · fills · flows · attestations) with audit-grade CSV export #703) under the Attestations chip and ride its CSV export with source columns.

Refusals

  • No web write path. No pre-filled emotion scores. The human types it or it doesn't exist.

Acceptance

  • Round-trip: CLI add → web view renders with provenance marker → CSV export carries it.
  • Dead-schema test updated: journal gains coverage (the completeness tests that pin schema today should fail if the table regresses to dead).

Sprint 2 (context & history), last.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew capability (groups under Features)pythonPull requests that update python code

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions