Skip to content

Product principles and design decision framework #9

Description

@sacchen

This issue is the living strategy document for phil.

Purpose:

  • Keep big-picture decisions coherent across roadmap and implementation.
  • Preserve reasoning history (including dead ends) without treating early thoughts as final.

Status Legend

  • Hypothesis: idea under exploration; not a commitment.
  • Leaning: current preference; still open to change.
  • Provisional Decision: active default policy pending more evidence.
  • Accepted: stable policy for current milestones.
  • Superseded: kept for history, no longer active.

Current Position (Not Final)

  • Provisional Decision: phil is terminal-first, exact-first, recovery-first, and script-safe.
  • Provisional Decision: reliability regressions block release.
  • Leaning: one-theme-per-release reduces scope drift and improves user clarity.
  • Leaning: use SymPy-native primitives where possible; keep custom code for safety + UX.
  • Hypothesis: decimal exactness policy may need a calculator-mode default or stronger artifact hinting.

Decision Rules (Apply to Roadmap + PRs)

For any change, answer:

  1. Does it improve correctness, time-to-answer, or time-to-recovery on real workflows?
  2. Does it preserve one-shot/REPL parity and script output contracts?
  3. Is failure behavior explicit and tested (E: + actionable hint:)?
  4. Can it ship as a small coherent slice?
  5. If reliability regresses, is release blocked?

If any answer is "no", de-scope, split, or defer.

Open Questions (Active)

1) Performance and Recovery Policy

Open:

  • Explicit thresholds for normal response, guarded failure response, and startup budget.
  • Fail-fast vs continue-symbolic boundaries.

Evidence needed:

  • benchmark timings on fixed workflow set,
  • REPL recovery latency checks on pathological inputs.

2) Simplification Policy

Open:

  • broad simplify() boundaries vs targeted transform defaults.
  • structure-preservation expectations.

Evidence needed:

  • behavior diffs on representative expressions,
  • user-facing predictability review.

3) Ambiguity Policy

Open:

  • accept/reject/hint table for shorthand ambiguity (sin x^2, 1/2x, etc.).

Evidence needed:

  • parser behavior matrix + tests,
  • error-recovery quality checks.

4) Exactness / Numeric Policy

Open:

  • mixed decimal behavior policy (artifact handling, exactness defaults, hinting).

Evidence needed:

  • explicit decision on decimal parsing/rationalization strategy,
  • regression tests for decimal artifact class.

5) Release Scope Discipline

Open:

  • criteria to move items from Later -> Next.

Evidence needed:

  • impact estimate + reliability risk + testability.

Known Bug Class To Resolve

  • Provisional Decision: treat float-artifact cancellation as a product-level exactness decision, not a one-off bug.

Example:

phil> 1/(0.1 + 0.2 - 0.3)
1.80143985094820e+16

Competitor Win Conditions (Working)

  • vs WolframAlpha: faster terminal-first completion for common workflows.
  • vs qalc: clearer symbolic/exact recovery after mistakes.
  • vs Python/SymPy REPL: fewer keystrokes and less setup for core tasks.

Status: Hypothesis until benchmarked.

Evidence Loop (Lightweight)

Per milestone:

  1. Run fixed workflow benchmark set (core + pathological).
  2. Gather small real-user observation sample.
  3. Track minimal metrics:
    • time to first correct answer,
    • error -> success recovery time,
    • post-error abandonment/tool-switch,
    • repeat usage signal.
  4. Use metrics as release gate input.

Update Protocol (for Archivability)

  • New exploration should be added as comments first.
  • Once stable enough, summarize in this body with a status label.
  • Do not delete old reasoning; mark superseded items as Superseded.
  • Keep this top section concise; keep detailed exploration in linked comment archive.

Exploration Archive (Non-Binding)

These comments capture useful thought process and references but are not final decisions by themselves:

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions