Skip to content

feat: file-based test loop for P-01/P-02 (CHG-0002) - #20447

Closed
WanderingStardust79 wants to merge 3 commits into
NousResearch:mainfrom
WanderingStardust79:feat/test-property-loop
Closed

feat: file-based test loop for P-01/P-02 (CHG-0002)#20447
WanderingStardust79 wants to merge 3 commits into
NousResearch:mainfrom
WanderingStardust79:feat/test-property-loop

Conversation

@WanderingStardust79

Copy link
Copy Markdown

Summary

First real property running (CHG-0002). Adds a local-only file-based loop
that proves the agent stack works against real-shaped tenant emails before
we wire SMTP/IMAP, the Postgres ledger, or the Command Center buttons.

  • Reads JSON from inbox/, runs P-01 (intent classify) then conditionally
    P-02 (maintenance triage) against the canonical UCPM SOP, drafts a
    response to outbox/drafts/<id>.json, and emits per-step audit rows to
    audit-log/<id>.jsonl. Audit schema mirrors ucpm.audit_log from the
    SOP global invariants so future BigQuery loaders can ingest unchanged.
  • Three sample messages ship under hermes_agent/loops/sample_emails/ and
    are also wired in as pytest fixtures: maintenance-hvac, rent-question,
    emergency-water.
  • Gates (legal / lease-change / novel / spend / emergency) are evaluated
    in deterministic Python — never via the LLM — so they cannot silently
    regress when prompts change.

Implementation notes

  • New package hermes_agent.loops/ lives separately from upstream
    hermes/hermes_cli so it survives upstream rebases without conflicts.
  • New hermes-ucpm console script (kept off the upstream hermes CLI for
    the same reason). Invocation: uv run hermes-ucpm test-property-loop ....
  • Anthropic calls go through a thin LlmClient that stamps
    cache_control: ephemeral on the SOP + company-context system blocks so
    we do not re-pay for them per message. Default model
    claude-sonnet-4-6. API key sourced from Doppler — no .env.
  • Sample messages live at hermes_agent/loops/sample_emails/ (not
    examples/) because the upstream .gitignore excludes any examples/
    directory at any depth.

Cross-refs

Test plan

  • 31 unit + e2e tests pass (uv run pytest tests/ucpm/). All LLM calls
    are mocked via a fake SDK seam — no API spend in CI.
  • Smoke-run against the three sample messages with a real Anthropic
    key (Doppler).
  • Wire to the per-property 1011-verrado-office company-dir once the
    branch lands real tenant + state YAML.
  • Confirm the JSONL audit format ingests into BigQuery ucpm.audit_log
    without column transformation.

Generated with Claude Code

WanderingStardust79 and others added 3 commits May 5, 2026 12:44
Append a gitsubmodule ecosystem block to .github/dependabot.yml so
Dependabot tracks the tinker-atropos submodule. Monthly cadence,
labelled "dependencies" + "submodule".

Upstream's existing github-actions block (and the comment block
explaining why pip is intentionally excluded under uv.lock pinning) is
preserved verbatim — gitsubmodule is the one ecosystem upstream's
policy doesn't cover, and this fork carries a submodule upstream does
not.

Refs: WanderingStardust79/paperclip-UCPM-orchestrator#2

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds an "Optional extras and submodules — security boundaries" subsection
under Important Policies. Enumerates [rl], [yc-bench], and the
tinker-atropos submodule as research-only and out-of-scope for any
orchestrator default-install path; documents how to opt in deliberately
and provides a maintainer check to verify defaults are clean.

Mitigation for the two latent CRITICAL findings (CRIT-1 unlicensed
tinker-atropos submodule, CRIT-2 unlicensed yc-bench dep) flagged in the
2026-05-05 dependency audit. Closes #2.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a local-only loop that proves the agent stack works against real-shaped
tenant emails without wiring SMTP/IMAP, Postgres, or external services.
Reads JSON from inbox/, runs P-01 (intent classify) -> P-02 (maintenance
triage if applicable) against the canonical UCPM SOP, and writes drafted
responses to outbox/drafts/<id>.json plus per-step audit JSONL to
audit-log/<id>.jsonl. Audit schema mirrors ucpm.audit_log from the SOP
global invariants so future BigQuery loaders can ingest unchanged.

Three example messages ship under hermes_agent/loops/sample_emails/ and are
also wired in as pytest fixtures: maintenance-hvac (high), rent-question
(payment, no triage), emergency-water (emergency + spend gate).

Implementation lives in a new hermes_agent.loops package separate from the
upstream hermes/hermes_cli modules so it survives upstream rebases. CLI
exposed via a new hermes-ucpm console script (kept off the upstream
hermes CLI for the same reason). Anthropic calls go through a thin
LlmClient wrapper that stamps cache_control on the SOP + company-context
system blocks so we don't re-pay for them per message; default model
claude-sonnet-4-6, key sourced from Doppler.

Tests: 31 unit + e2e tests (pytest), all LLM calls mocked via a fake SDK
seam — no API spend in CI. Cross-refs CHG-0001 (orchestrator issue #2)
and the canonical SOP in paperclip-UCPM PR #8 (companies/ucpm-default/SOP.md).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@WanderingStardust79

Copy link
Copy Markdown
Author

Closing — opened against the wrong repo. Will reopen against WanderingStardust79/hermes-agent-ucpm.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have invalid This doesn't seem right labels May 5, 2026
@WanderingStardust79
WanderingStardust79 deleted the feat/test-property-loop branch May 18, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants