A local-first multi-agent app development platform, built on PenguinHarness
docs(changelog): 2026-08-11 UI polish and prompt-injection batch entries (#258)
Yaowei Zheng1e4785d20974
diff --git a/changelog/unreleased/2026-08-11-agent-kernel-version.md b/changelog/unreleased/2026-08-11-agent-kernel-version.mdnew file mode 100644index 00000000..708655b9--- /dev/null+++ b/changelog/unreleased/2026-08-11-agent-kernel-version.md@@ -0,0 +1,17 @@+# Agent config kernel version: dated generations with a smart update++`system_config.yaml` is baked at agent creation and never auto-upgraded, so until now the only way to newer built-in defaults was a full restore that discarded every customization. Agent configs now carry a **kernel version** (#263): a date, `kernel_version: 2026-08-11`, recording which generation of built-in defaults the config was created from or last updated to. Creation and "restore defaults" both stamp it; ordinary config edits never touch it (it is unrelated to `version`, the optimization counter).++## Development-side bumps, mechanically enforced++The version only moves when development changes the defaults, and it cannot be forgotten: a guard test pins the hash of every leaf default to the latest entry of a per-generation history table, so any default change fails CI until `KERNEL_VERSION` gets a new date and the table gains the generation. The history is seeded with two generations — the current defaults and the byte-exact pre-#257 reconstruction — and matching is purely by hash, never by the stored date.++## Update beside restore++An **Update kernel** control sits directly above "restore defaults" on the agent overview, and does a smart merge rather than a wipe: fields still equal to any recorded generation's default advance to the new default; user-modified fields are kept and reported back by readable names; values from generations the table cannot recognize are conservatively kept (restore stays the full-refresh escape hatch). Builtin tools are compared per tool name, so a customized tool description keeps only that tool behind, user-added entries survive, and a deliberately removed default tool is not resurrected. The merge writes through the comment-preserving yaml path and tolerates hand-edited damage (an invalid section node is replaced rather than crashing).++Outdated agents are flagged with the minimal-chrome convention — the kernel-version row plus an update hint on the overview, and an icon-with-tooltip marker on the agent list cards deep-linking there. Outdated uses an ordering compare, so a config stamped by a newer build never nags after a downgrade. Legacy configs predating the stamp count as outdated by design — see the [compat notes](2026-08-11-backward-compatibility.md).++## The overview settles into ruled sections++The rest of the overview follows the kernel controls (#261), as horizontal-rule-divided sections in the skill library's visual family rather than boxed cards: an **Agent State** section (State version with the snapshot import/export actions beside it, and the state path below — click-to-copy via the chat details card's optimistic "Copied" convention, full path on hover) and the **Kernel** section (Update and Restore in its action slot). Version values render dark and semibold against small gray labels so the number is the first thing read. The name/description form keeps its Save beside the fields it actually saves, and the active-session statistic is dropped from the overview.diff --git a/changelog/unreleased/2026-08-11-backward-compatibility.md b/changelog/unreleased/2026-08-11-backward-compatibility.mdnew file mode 100644index 00000000..e1af27c9--- /dev/null+++ b/changelog/unreleased/2026-08-11-backward-compatibility.md@@ -0,0 +1,17 @@+# Backward compatibility: legacy baked templates, section placeholders, kernel version++## Prompt-injection section placeholders (#257) `system_config.yaml` is baked at agent creation and never auto-upgraded, so every agent created before this change carries the old template text — hardcoded `# Vault` and `# Skills` sections with inline `{{VAULT_KEYS}}` / `{{SKILL_METADATA}}` placeholders, and no schedules section.++**What old shape is tolerated.** Template-level substitution of the inline `{{VAULT_KEYS}}` and `{{SKILL_METADATA}}` placeholders continues to work, now honoring the new toggles: `vault.enabled: false` / `skills.enabled: false` blanks the inline list. On such templates the toggle cannot remove the baked section wording around the list — that text is literal template content; the tab explains this on legacy templates.++**How far it reaches.** Every agent created before #257. New agents get the placeholder-only template and are unaffected.++**Does the user need to act?** No — existing agents keep rendering the prompt they always had. To adopt the new per-feature prompts and full toggle behavior, each tab offers a one-click migration that replaces the legacy default section with the placeholder, available when the baked wording is byte-identical to the old default (the frozen `LEGACY_VAULT_SECTION` / `LEGACY_SKILLS_SECTION` constants; a test pins that a migrated legacy default template equals the current default). A hand-edited section is never rewritten — the alert strip directs those templates to the System Prompt tab instead. Schedules has no legacy shape; its placeholder is a plain one-click insert, as Memory's was.++**When it can be removed.** The legacy inline-substitution path and the frozen section constants carry retirement comments (the `withShellLineFallback` convention): remove once pre-`{{SKILLS}}`-era agent configs are no longer expected in the wild — realistically after a migration nudge has shipped in a release or two and telemetry/user reports show no legacy templates remaining.++## Kernel version (#263)++`system_config.yaml` predating the change carries no `kernel_version` stamp and is therefore reported **outdated** — that is the feature working, not breakage; nothing changes until the user clicks Update (or Restore). The smart merge recognizes the current and the pre-#257 generations by hash; a value matching neither — older generations, or user edits — is conservatively kept, so an update can never destroy a customization it cannot prove is stock. No user action is required.++**When it can be removed.** The seeded pre-#257 history entry shares #257's retirement horizon (drop both together once legacy configs are gone); the guard test and history table themselves are permanent machinery, growing one row per deliberate defaults change.diff --git a/changelog/unreleased/2026-08-11-humanizer-skill.md b/changelog/unreleased/2026-08-11-humanizer-skill.mdnew file mode 100644index 00000000..64503208--- /dev/null+++ b/changelog/unreleased/2026-08-11-humanizer-skill.md@@ -0,0 +1,11 @@+# New library skill: humanizer++`humanizer` joins the built-in library under the Office Productivity group as a manual-install skill — `preinstall: false`, so it stays out of default_agent's preinstalled set and installs from the Skill Library on demand (#256).++## What it does++Rewrites or edits prose in any language so it reads like edited human writing in the register of books, newspapers and encyclopedias rather than default AI output. The SKILL.md working surface is deliberately small: seven drafting principles (vary every pattern, density from anchored facts in whole grammar, a quota on quotable lines, a real writer with real material, structure serving content, native idiom and typography, verify-and-calibrate) under one meta-rule — aim for the natural distribution of edited prose, not a perfect scorecard. The detailed instrument ships as reference files read during the diagnostic census rather than during drafting: a 25-tell catalog in three layers (sentence patterns, discourse shapes, and the humanizing pass's own fingerprint), per-language surface forms for Chinese, English, Japanese, French, German and Spanish, and the measured case study behind every rule.++## How it was derived++Five empirical rounds, documented with counts in the skill's `reference/case-study.md`: a controlled baseline-versus-rewrite exercise; reader field tests that yielded the discourse-layer tells; a ten-piece, five-language blind cross-review by independent editor agents (two pieces double-reviewed for agreement, all pieces revised against accepted flags, the four worst re-scored blind with the average verdict dropping from ~71 to 30) that yielded the scrub layer; and two further user passes that caught successive overcorrections (telegraph compression, then clipped conditionals and connective monotony). One recurring result shaped the design: drafting against a long checklist produces compliance-shaped text, so the rules live in the diagnosis step and the drafting core stays small.diff --git a/changelog/unreleased/2026-08-11-prompt-injection-toggles.md b/changelog/unreleased/2026-08-11-prompt-injection-toggles.mdnew file mode 100644index 00000000..6f64377b--- /dev/null+++ b/changelog/unreleased/2026-08-11-prompt-injection-toggles.md@@ -0,0 +1,17 @@+# Skills, Vault and Schedules adopt Memory's prompt-injection pattern++The three remaining prompt-borne subsystems now follow the shape Memory established (#257): the system-prompt template carries only a section placeholder, the section's wording is per-agent editable config, and an on/off switch decides whether the section is injected at all.++## Template and config++The default template's hardcoded `# Vault` and `# Skills` sections are replaced by `{{VAULT}}` and `{{SKILLS}}` placeholders in the same positions, and a new `{{SCHEDULES}}` placeholder lands after `{{MEMORY}}`. Each expands to its feature's prompt — `vault.prompt`, `skills.prompt`, `schedules.prompt` in `system_config.yaml`, defaulting to the previous built-in wording for Vault and Skills — gated by `vault.enabled` / `skills.enabled` / `schedules.enabled` (default on). The former inline data placeholders keep working inside those prompts: `{{VAULT_KEYS}}` and `{{SKILL_METADATA}}` render the key-name list and the installed-skill lines, and the new `{{SCHEDULE_LIST}}` renders the roster of existing schedule files (with an explicit "no scheduled tasks defined yet" note when empty). All four section placeholders expand in a single pass, so content arriving through one section can never smuggle another section's token into a second expansion.++## The model learns to manage schedules++The new default Schedules prompt teaches the model to CRUD scheduled tasks the same way Memory taught it to keep notes: through the ordinary file tools, no dedicated tool added. It names the directory (`agent_state/schedule/`, one TOML per task), shows the file format, and states the field rules — `prompt` required, `enabled` defaults to false so an active task sets it explicitly, ISO 8601 `start_at`/`end_at`, `period` like `30m`/`12h`/`7d` with a 5-minute floor, `session_id` and `workspace`+`provider`+`model_id` mutually exclusive — plus the hygiene rules (check the roster before creating, edit in place, delete obsolete files) and that the server reconciles the directory within ~30 seconds with no registration step.++## Tabs++The Skills, Vault and Schedules tabs each gain the Memory tab's controls: an enable switch on top (启用技能 / 启用密钥保险柜 / 启用定时任务, the Memory switch's shape — written immediately, not joining the tab's Save), an alert strip when the template lacks the section's placeholder (one-click insert, or one-click migration on a legacy template — see the [compat notes](2026-08-11-backward-compatibility.md)), and an editable prompt section at the bottom with the feature's inner placeholders as click-to-insert chips. Vault and Schedules keep their owner-only editing convention. The schedules table also stops wrapping mid-cell: headers and compact columns are nowrap, name and target truncate with hover titles, and the next/last fire times stack as a deliberate two-line cell over the existing horizontal-scroll container.++The switches govern prompt injection only — stated in the configuration docs rather than as tab copy: Vault values are still injected into shell subprocesses as environment variables when the section is off (the model just loses the key-name listing), the scheduler still fires existing tasks, and installed Skills remain explicitly usable via `[use_skills]`.diff --git a/changelog/unreleased/2026-08-11-web-ui-polish.md b/changelog/unreleased/2026-08-11-web-ui-polish.mdnew file mode 100644index 00000000..0db426ad--- /dev/null+++ b/changelog/unreleased/2026-08-11-web-ui-polish.md@@ -0,0 +1,9 @@+# Web App: dismissible password banner, /model hint, agent list and tab order polish++Five UI fixes from one review pass (#252, #253, #254, #255, #259):++- **Dismissible initial-password banner (#254).** The top banner urging a change away from the seeded password gains a close X at its right edge — a flat glyph with no background fill, hover darkening only, matching the "Change now" link's colors. Dismissal is permanent per user: it is stored server-side in `ui_prefs` (`initialPasswordBannerDismissed`), so it holds across devices and browsers. The banner renders only after the preference is hydrated — a dismissed banner never flashes — and fails open to visible when the preference request errors.+- **Locked-model chip hint and cursor (#252).** After a session locks its model, clicking the read-only model chip now toasts just 输入 /model 切换模型 / "Type /model to switch models" instead of the long parenthetical about new-session continuation, and the chip's hover cursor changes from the question-mark `cursor-help` to `cursor-pointer` — it is a clickable button, and this was the codebase's only `cursor-help`.+- **Agent list settings button (#253).** The per-agent Settings button rendered a hand-rolled gear path that had drifted from the sidebar's canonical lucide gear and looked muddy at 13px, with an icon color one shade dimmer than its own label. The canonical gear now lives in the shared icon module, the sidebar imports it from there, and the button's icon inherits the label color like its New Chat neighbor.+- **Toggle switch restyle (#259).** The shared slide switch no longer keeps a gray halo after a mouse click — the focus ring moves to `focus-visible` with an accent tint — and gets a proper edge: an inset hairline on the track, off-state grays retuned for the true-neutral dark palette (the old cool-tinted `gray-600` read dirty), a hairline on the knob so it survives the near-white neutral accent theme, and eased transitions. The knob's hairline is drawn as a border inside its own 16px box (an outer ring stacked on the track hairline along the near arc as one heavier line, which read as uneven distance), its offset drop shadow is gone, and the geometry is all integer pixels with the knob concentric to the track's end caps — a uniform 1px clearance to the outline on every side, in both states, verified by magnified screenshots at 1x and 2x in both themes. Component API and switch semantics unchanged; all five usage sites verified.+- **Agent detail tab order and stat row (#255).** The detail tabs settle into the canonical order Overview, System Prompt, Runtime, Tools, Skills, Memory, Vault, Schedules (Memory moves from third place; the zh tab label Prompt becomes 系统提示词, en "System Prompt"), and the agent list's clickable stat icons mirror the same order between the session count and the updated-at time. The stat row also drops its per-item `min-w` reservation — short counts no longer leave lopsided holes — with the uniform flex gap widened from `gap-x-2.5` to `gap-x-4` so the row keeps breathing room.diff --git a/changelog/unreleased/README.md b/changelog/unreleased/README.mdindex 7c3212d3..57eed78c 100644--- a/changelog/unreleased/README.md+++ b/changelog/unreleased/README.md@@ -1,5 +1,13 @@# Unreleased+- [2026-08-11] Skills: new manual-install library skill `humanizer` — rewrites prose in any language into book/newspaper/encyclopedia register; a seven-principle drafting core backed by a 25-tell three-layer diagnostic catalog, six-language cues and a five-round measured case study as reference files; Office Productivity group, `preinstall: false` (#256). ([details](2026-08-11-humanizer-skill.md))++- [2026-08-11] Core + Web App: agent configs gain a dated **kernel version** — creation and restore stamp the defaults generation, a hash-pin guard test forces a dated bump on any defaults change, and an Update control beside "restore defaults" smart-merges newer defaults while keeping user-customized fields (reported by readable names; unknown generations conservatively kept), with outdated hints on the agent overview and list cards; the overview itself settles into ruled Kernel and Agent State sections — version values rendered prominent, snapshot import/export beside the State version, a click-to-copy state path, the active-session stat dropped (#263, #261, stacked on #257). ([details](2026-08-11-agent-kernel-version.md), [compat](2026-08-11-backward-compatibility.md))++- [2026-08-11] Core + Web App: Skills, Vault and Schedules adopt Memory's injection pattern — the default template carries only `{{VAULT}}` / `{{SKILLS}}` / `{{SCHEDULES}}` section placeholders, each expanding to a per-agent editable prompt behind an enable switch on its tab; the new Schedules prompt teaches the model to manage schedule TOMLs with the ordinary file tools (`{{SCHEDULE_LIST}}` roster included), and legacy baked templates keep working, with one-click migration where the old default wording is intact (#257). ([details](2026-08-11-prompt-injection-toggles.md), [compat](2026-08-11-backward-compatibility.md))++- [2026-08-11] Web App: UI polish — the initial-password banner gains a flat dismiss X persisted per user, the locked-model chip's hint shrinks to "type /model to switch models" with a pointer cursor, the agent list's Settings button adopts the canonical sidebar gear at label color, and the agent detail tabs settle into Overview / System Prompt / Runtime / Tools / Skills / Memory / Vault / Schedules with the list's stat icons mirroring that order at uniform, wider spacing, and the shared toggle switch drops its lingering post-click focus halo for a refined track/knob treatment (#252, #253, #254, #255, #259). ([details](2026-08-11-web-ui-polish.md))+- [2026-08-11] Web App: the chat details card gains a click-to-copy Session id, the schedule form adopts the Project-defaults model/workspace pickers and a searchable session dropdown, saving Project new-chat defaults toasts, and the missing `{{SHELL}}` placeholder is restored to the prompt-placeholder list (drift-proofed by a test against the real default prompt). ([details](2026-08-11-web-session-and-schedule-forms.md))- [2026-08-11] Web App: leaving a still-running conversation (switch or "new conversation") no longer fires a phantom completion that reloaded the session/Agent lists — the reload trigger is now guarded by session identity, removing an occasional app-wide flicker right after the click (#242). ([details](2026-08-11-chat-phantom-idle-reload.md))