Skip to content

docs: ADR-024 — Thin CLI with Local Daemon Mode#37

Merged
cidrblock merged 3 commits intoansible:mainfrom
cidrblock:adr/024-thin-cli-daemon-mode
Mar 19, 2026
Merged

docs: ADR-024 — Thin CLI with Local Daemon Mode#37
cidrblock merged 3 commits intoansible:mainfrom
cidrblock:adr/024-thin-cli-daemon-mode

Conversation

@cidrblock
Copy link
Copy Markdown
Collaborator

Summary

  • Proposes ADR-024 to refactor the CLI from a fat client back to a thin gRPC presentation layer, restoring the original ADR-001/ADR-004 design intent.
  • The CLI currently embeds the entire engine (ARI, validators, formatter, remediation convergence loop) for standalone "local mode," creating dual code paths, blocking web UI reuse, and violating the gRPC-first architecture.
  • Introduces a local daemon mode that spawns Primary + validators as localhost gRPC servers, so standalone users get the same architecture as the Podman pod without requiring containers.
  • Includes phased rollout (daemon launcher, new FixStream/FormatStream RPCs, cli.py split, local-mode removal) and new proto definitions.

Files changed

  • .sdlc/adrs/ADR-024-thin-cli-daemon-mode.md — new ADR (Proposed)
  • .sdlc/adrs/README.md — index updated with ADR-024

Context

This ADR was developed through an architecture review of the engine and CLI scope analysis. The fat CLI problem was identified during PR #34 review, where collection_specs handling diverged between local and gRPC scan paths — a direct symptom of dual code paths. The daemon approach aligns local development with the pod architecture and enables a web UI as a second gRPC client without reimplementing orchestration logic.

Made with Cursor

Captures the architectural decision to refactor the CLI from a fat
client (embeds engine, validators, formatter, remediation) back to a
thin gRPC presentation layer per the original ADR-001/ADR-004 design.

Introduces a local daemon mode that runs Primary + validators as
localhost gRPC servers, giving standalone users the same architecture
as the Podman pod without requiring containers. Includes phased
rollout plan and new FixStream/FormatStream RPC definitions.

Made-with: Cursor
Copilot AI review requested due to automatic review settings March 19, 2026 00:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new architecture decision record (ADR-024) proposing a shift back to a thin gRPC CLI by introducing a local “daemon mode” that runs Primary + validators locally, aligning standalone development with the pod architecture.

Changes:

  • Add ADR-024 documenting the thin-CLI + local daemon approach and phased rollout plan.
  • Update the ADR index/metadata in .sdlc/adrs/README.md to include ADR-024.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
.sdlc/adrs/ADR-024-thin-cli-daemon-mode.md New proposed ADR describing motivation, decision, consequences, and rollout for daemon-backed thin CLI.
.sdlc/adrs/README.md Updates ADR index/categories/changelog to reference ADR-024 and bumps next-available ADR number.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread .sdlc/adrs/ADR-024-thin-cli-daemon-mode.md
Comment thread .sdlc/adrs/ADR-024-thin-cli-daemon-mode.md Outdated
Comment thread .sdlc/adrs/README.md
Comment thread .sdlc/adrs/README.md
Comment thread .sdlc/adrs/ADR-024-thin-cli-daemon-mode.md Outdated
- Align daemon state file path with existing ~/.apme-data/ convention
  (ADR-022) instead of introducing ~/.apme/
- Clarify session subcommand becomes gRPC pass-through rather than
  removed; add ADR-022 to Related Decisions
- Replace .cursor/plans/ references (gitignored) with PR links
- Add missing ADR-022 to index table, changelog, and categories

Made-with: Cursor
@cidrblock cidrblock force-pushed the adr/024-thin-cli-daemon-mode branch from 932f133 to a537cd5 Compare March 19, 2026 00:37
@cidrblock cidrblock merged commit 370e5b8 into ansible:main Mar 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants