arrow_backRetour aux issues
fu351/Doberman-Core
#438
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
cli: add `--json` to `doberman memory`
ecoDébutant
enhancement
good first issue
level-3
descriptionDescription
`doberman memory` (`src/doberman/cli/main.py:1476`) prints a human summary built from `memory_summary(path)`, which is already a plain dict with `decisions`, `verdicts`, `top_path_classes`, `secrets_seen`. Every sibling view in the Daily/Policy panels has a `--json`: `scan` (`:254`), `status` (`:789`), `doctor` (`:808`), `policy-history`, `tune`. `memory` is the one left out, so scripts have to scrape its text.
**What to do**
1. Add `as_json: bool = typer.Option(False, "--json", help="Emit the learned-memory summary as one JSON document.")` to `memory()`, copied from `status`'s option.
2. Before the human output: `if as_json: typer.echo(json.dumps(summary, sort_keys=True, separators=(",", ":"))); return`. Same call shape as the other five, so it lands inside the shared JSON-output contract in docs/CLI.md automatically. Add the command to that doc's machine-readable list.
3. New `tests/unit/test_cli_memory_json.py`, shaped like `tests/unit/test_cli_scan_json.py`: seed with `doberman demo --fast`, run `memory --json`, `json.loads` it, assert the four keys are present and the text is compact.
`memory_summary` already returns counts and classes only, so the JSON path exposes nothing the text path doesn't.
Issues similaires
calkit/calkit
star53
Poids du dépôt moyen
VS Code extension should be robust to YAML parser errors
Seeing this error: ``` Failed to read calkit.yaml: YAMLParseError: A block sequence may not be used as an implicit map…
Python
bug
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: a manual Refresh control
The dashboard polls: `refreshStats()` (`src/doberman/dash/app.py:408`) every 5 s and `refreshPending()` (`:546`) every …
Python
enhancement
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: "Copy details" button on each pending-approval card
Each pending-approval card in the dashboard (`renderPending`, `src/doberman/dash/app.py:448-544`) shows the risk badge,…
Python
enhancement
good first issue