Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.

KR-1 ST2: Identity swap (DEFAULT_AGENT_IDENTITY + SOUL.md scaffold + repo metadata)#2

Merged
rafe-walker merged 1 commit into
mainfrom
feat/kora-KR1-identity-swap
May 20, 2026
Merged

KR-1 ST2: Identity swap (DEFAULT_AGENT_IDENTITY + SOUL.md scaffold + repo metadata)#2
rafe-walker merged 1 commit into
mainfrom
feat/kora-KR1-identity-swap

Conversation

@rafe-walker

Copy link
Copy Markdown
Owner

Bucket

KR-1 sub-task 2 — identity swap.

Summary

  • New DEFAULT_AGENT_IDENTITY (1,017 chars; first line "You are Kora.")
  • SOUL.md scaffold at repo root
  • pyproject.toml: hermes-agent → kora; uv.lock regenerated
  • Console scripts: kora, kora-agent, kora-acp added (BC hermes* aliases retained)
  • 10 new tests in tests/agent/test_kora_identity_kr1.py
  • Touched: test_system_prompt_restore.py:204, test_run_agent_codex_responses.py (×7 fixtures)
  • Full-suite delta vs ST1: +11 passed, -1 failed (xdist noise)
  • Typecheck delta vs ST1: 0 new diagnostics

Deliberately deferred

  • HERMES_AGENT_HELP_GUIDANCE (L144-148) + self-help (L1205-1208) — tangled with skill rename + CLI rename, ST3 + KR-5
  • ~/.hermes paths — ST3 owns end-to-end
  • assets/banner.png art — Rule-6 honest label added to README; KR-7
  • tests/skills/test_openclaw_migration.py:972 — optional-skills, KR-5

Changelog

Exhaustive before/after diffs at docs/kora-runtime/KR-1-st2-identity-changelog.md.

… repo metadata

Replaces the embedded Hermes Agent identity prompt with the Kora skeleton
from the bucket spec, ships SOUL.md as a KR-1 stub at repo root, and
rebrands README + pyproject for the fork. Module paths still say
hermes_cli / hermes_constants / etc. — those rename in ST3.

Primary changes:

- agent/prompt_builder.py L134-142: DEFAULT_AGENT_IDENTITY replaced verbatim
  with the 1017-char Kora skeleton (Architect-of-Will, operator-direct-only,
  IsoKron actor_kind='kora', Role Charter pointer, honest Hermes runtime
  inheritance credit).
- agent/prompt_builder.py L588: PLATFORM_HINTS["webui"] — "Hermes WebUI" →
  "Kora WebUI" (the companion user-facing identity surface for the
  browser dashboard).
- SOUL.md (NEW, repo root): KR-1 stub mirroring DEFAULT_AGENT_IDENTITY so
  an operator who copies it to the profile home does not silently lose
  identity. KR-7 fills with full content + personality modes. Rule-6
  honest label embedded: load_soul_md() still resolves ~/.hermes/SOUL.md;
  ST3 renames the path.
- pyproject.toml: name hermes-agent → kora, description rewritten,
  authors expanded to credit both maintainer and Nous Research upstream,
  [project.urls] added (Homepage/Repository/Upstream). Console scripts
  add kora/kora-agent/kora-acp next to the hermes* BC aliases; ST4
  wraps the legacy hermes* scripts as deprecation shims. Internal
  hermes-agent[<extra>] self-references rewritten to kora[<extra>]
  (required correctness fix — otherwise uv sync resolves the PyPI
  hermes-agent==0.14.0 with python-dotenv==1.2.1 vs our 1.2.2).
- uv.lock: regenerated. Removed hermes-agent v0.14.0, Added kora v0.14.0.
- README.md: surgical rebrand of head (banner alt, H1, badges, tagline)
  and license footer. Middle marketing copy intentionally untouched (KR-7
  refresh). Rule-6 honest label on the banner img tag — KR-7 swaps the
  Hermes artwork.
- .gitignore: + kora.egg-info/ + *.egg-info/ (robust to future renames).

Test fixture updates (data, not behaviour):
- tests/agent/test_system_prompt_restore.py:204 — fixture string
  "You are Hermes Agent.\n" → "You are Kora.\n" (byte-identical-restore
  test; fixture string is arbitrary).
- tests/run_agent/test_run_agent_codex_responses.py (×7) — bare
  "You are Hermes." custom-prompt fixtures → "You are Kora." (sed swap).

Test additions:
- tests/agent/test_kora_identity_kr1.py (NEW): 10 assertions across 4
  test classes — Kora opener, negative-Hermes, Role Charter pointer,
  actor_kind marker, honest inheritance credit, SOUL.md scaffold
  invariants, Kora WebUI hint, length floor.

Deliberately deferred to ST3 / KR-5 / KR-7 (per bucket scope):
- L144-148 HERMES_AGENT_HELP_GUIDANCE — entangled with skill rename (KR-5)
  + CLI command rename (ST3/ST4); deferred.
- L1205-1208 self-help guidance — same shape; deferred.
- L621/L649/L670/L809/L810/L820 process-host strings — bulk s/Hermes/Kora/
  is ST3 territory.
- ~/.hermes path migration — ST3.
- assets/banner.png — KR-7.
- tests/skills/test_openclaw_migration.py:972 — lives in optional-skills;
  KR-5.

Verification:
- Touched-tests serial run: 544 passed / 1 skipped in 145.91s.
- Full suite (xdist): 24,482 passed / 99 failed / 129 skipped in 243.75s
  (vs ST1 baseline 24,471/100/129/229.80s — +11 passed = 10 new ST2
  tests + 1 parametric variance; −1 failed is xdist flake noise).
- ty check: 7,341 diagnostics, identical to ST1 baseline (zero new
  diagnostics from ST2).
- Smoke: python -c "from agent.prompt_builder import DEFAULT_AGENT_IDENTITY;
  print(len(DEFAULT_AGENT_IDENTITY))" → 1017; first line == "You are Kora."

Bucket: KR-1 sub-task 2 / 4. Full changelog at
docs/kora-runtime/KR-1-st2-identity-changelog.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rafe-walker rafe-walker merged commit 94d5e5b into main May 20, 2026
rafe-walker added a commit that referenced this pull request May 24, 2026
…p phrasebook (#160)

Lock R3-4 item #2. Regex pre-filter + YAML phrasebook + snapshot-field interpolation in front of Slack DM reasoning engine. Operator-approved phrasebook covers ~30-40% of DM traffic at $0 LLM cost.

8 default entries: greeting / thanks / ack / burn_query / status_query / alert_query / health_query / pause_check. Snapshot-interp templates pull live data via {snapshot.path.to.field} placeholders; missing OR literal-unknown values fall through cleanly to reasoning engine (never sends half-filled responses).

Operator override path: ${KORA_HOME}/phrasebook/slack_dm.yml (malformed → graceful fallback to bundled default).

Telemetry signal: reasoning_meta[model_used]=='short_circuit' literal LOCKED as join key for KR-CHEAP-COST-TELEMETRY (CC#1, in flight).

40 tests pass (25 phrasebook + 15 handler integration). 532/532 serial regression green; full xdist green vs baseline.
rafe-walker added a commit that referenced this pull request May 24, 2026
…n completion) (#182)

Unified-operator-interface vision completion. Kora's investigation can now include 'I tried restart_machine on i-abc; result: success; new health state: ok' instead of just 'recommend you rotate the token.'

2nd mutating tool in REASONING_TOOL_ALLOWLIST (documented as 'Deliberate scope expansion #2'). Blast-radius bounded by 3 fail-CLOSED gates: per-probe env + envelope whitelist + per-probe executor target verification.

Zero envelopes ship enabled by default. fly restart_machine wired but KORA_PROBE_AUTOFIX_FLY_ENABLED defaults OFF. Executor re-reads env on EVERY call (mid-investigation env-flip closes the gate). supabase/vercel/sentry/doppler envelopes remain explicitly empty.

DM differentiation: enabled path includes 'tried/before/after' outcome; disabled path includes the exact manual flyctl command + how to enable. Operator-empathetic engineering.

Reason field recorded VERBATIM (unlike #179's body redaction) — operator triage of 'what did Kora decide and why' is primary use case.

New audit seam tool.probe_autofix_attempted with status enum {attempted, rejected, execution_failed}.

24 new autofix tests + 317 cross-bucket regression + ruff clean.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant