Skip to content
Back to skills

Penguin Harness Dev

ASecurity

Use when developing PenguinHarness itself — changing any package under packages/ or library/ (core, server, web, cli, desktop, the sites, the shared UI, the domain libraries), the built-in model catalog, the installers or the release workflow; writing or auditing changelog entries; writing a blog post or capturing release screenshots; running the test suite here or, when asked, on another machine; reading a prompt-cache regression out of the core suites; deciding what to do about data already...

  • 3,396 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 2, 2026
ai-agentstypescriptgoshellnodetestinggitfrontendbackenddocumentation

Works with

  • claude code
  • cli

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned December 1, 2026

npx -y skills add Prism-Shadow/penguin-harness --skill penguin-harness-dev --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Penguin Harness Dev?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Penguin Harness Dev
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/prism-shadow-penguin-harness-dev/badge)](https://www.skillsdirectory.com/skills/prism-shadow-penguin-harness-dev)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: penguin-harness-dev
description: Use when developing PenguinHarness itself — changing any package under packages/ or library/ (core, server, web, cli, desktop, the sites, the shared UI, the domain libraries), the built-in model catalog, the installers or the release workflow; writing or auditing changelog entries; writing a blog post or capturing release screenshots; running the test suite here or, when asked, on another machine; reading a prompt-cache regression out of the core suites; deciding what to do about data already on disk; auditing prose that reads like a leaked authoring session; or changing anything a user sees or reads — a component, a style, UI strings, docs, landing copy — which must not read as AI slop. Covers the two-repo symlink layout, the CI-parity verification chain, the record-and-ship contract, where blog media is hosted, and the seams that are intentional.
---

# Developing PenguinHarness

PenguinHarness is a TypeScript monorepo. `packages/` holds the Agent SDK (`core`), the HTTP server
(`server`), the Web App (`web`), the CLI (`cli`), the Electron shell (`desktop`), the landing and
docs sites, the shared UI (`ui`, `ui-gallery`), the message protocol (`amsp`), the A2UI grammar,
the theme packs, the web and browser plugin faces, and the supporting packages (`skills`, `hmr`);
`library/` holds the domain packages the server imports (auth, db, http, model,
project, session, trace, workspace, …), one way: a library package never imports the server. The
shipped plugin library is one npm package per plugin under the repo root's `plugins/` for the
plugins developed here, plus external built-ins pinned from the plugin index (they have no
directory here); each declares what it carries in `src/index.ts`, which its `build` turns into the
`ifaces.json` core's loader reads. The server, CLI and desktop are the host packages — not every
plugin is a server dependency, and the sandbox backends load through the built-in index. It
**consumes** LLM providers through `@prismshadow/mmsp` (MMSP, formerly `@prismshadow/agenthub`)
and implements no provider clients of its own.

This page is the part that applies to every change. The reference files carry the detail, read
them when the task reaches them:

| Read | When |
| --- | --- |
| The `artspec-rfcs` skill (`.agents/skills/artspec-rfcs/SKILL.md`) | **Drafting, revising, versioning, or validating any design RFC under `rfcs/` (`PRFC-NNNN-*.md`)**: invariant-focused design (not plans or full interface dumps), no code permalinks, single SemVer per PR, and the required PR description checkbox |
| The `artspec-changelog` skill (`.agents/skills/artspec-changelog/SKILL.md`) + `reference/changelog.md` | **Writing or auditing any changelog entry** under `changelog/unreleased/` or cutting `RELEASE.md` |
| `reference/verification.md` | A test fails oddly, CI reads green when it should not, or the user asks you to run the suite on another machine |
| `reference/model-catalog.md` | Touching the server's model catalog, pricing, provider groups, which environment variable a keyless row reads, or glyphs |
| `reference/authoring.md` | Writing a blog post, auditing prose, or proposing a simplification |
| The `penguin-harness-writing` skill | Writing or revising a blog post, a docs page or landing copy: a gateway model writes every word, through its prompts and checks |
| `reference/release.md` | Preparing a release: the branch order, what changes, the announcement, the blog post and its screenshots |
| `reference/testing.md` | **Writing or changing any test**: scenarios first, behaviour only, one fake per boundary, branch coverage, speed, CI time as a cost |
| `reference/ai-slop.md` | **Every** change a user sees or reads: UI, styles, UI strings, docs, landing, blog, changelog — the rules, the scanner, the catalogue of tells |

## No AI slop — every time something is rendered or written

Whatever you add to the UI or the copy, check it before you call it done: **decide before you
decorate; one accent, one voice; hierarchy from scale and space; subtract first; specific beats
punchy; decoration must mean something.** No gradients, glows, emoji, pill spam, cards in cards,
coloured keywords or "it's not just X — it's Y". Reuse the theme tokens and `lib/tone.ts`; status
is a labelled pill or an icon plus a tooltip, never a bare coloured dot; sections are ruled, not
boxed. Run `node .agents/skills/penguin-harness-dev/reference/ai-slop/scan.mjs <what you touched>`
and triage every hit. `reference/ai-slop.md` has the repo's own decisions and the full catalogue.

**A copy request changes words, in place.** When the owner asks for new copy, swap the words
inside the existing layout: removing or restyling a section, element, type size, number or
animation needs the owner's explicit say, and a feature demo is the real software (a capture of
the running Web App or a live gallery frame), never an imitation UI or a scripted replay.

## Repo shape — read before your first edit

Two repositories sit side by side: the implementation repo (`penguin-harness`) and the design repo
(`penguin-harness-design`). Three paths inside the implementation repo are symlinks into the design
repo and are gitignored here:

- `design/` → the design repo, so specs are reachable as `design/specs/…`
- `AGENTS.md` → `design/AGENTS.md`
- `CLAUDE.md` → `AGENTS.md`

Editing `AGENTS.md`, `CLAUDE.md` or anything under `specs/` edits **the design repo's files**.
Commit them there, on their own branch, in their own PR. They can never appear in an
implementation-repo PR. A fresh clone has none of the three links; recreate them by hand. A clone
with no design repo beside it — the normal state for a remote or throwaway environment — has
nothing to link to, so it carries no `AGENTS.md` at all and these skills are its whole contract.

`.claude` is a committed symlink to `.agents` (not one of the three), so Claude Code and every
other agent read the same `.agents/skills/` without a copy; a checkout that does not materialise
symlinks gets a plain file instead, so `.agents/skills/` remains the only copy to edit.

Both repos take changes through branch + PR against `main`, squash-merged. Do not push to `main`,
and `gh pr create --base main` — not `dev`, whatever a sibling repo does.

Branches are `feat/<topic>`, `fix/<topic>`, `docs/<topic>` in both repos. Some older branches here
read `docs-<topic>` instead: a remote branch literally named `docs` once held that ref namespace and
made the slashed form unpushable. It is gone — if a push is ever rejected as a directory/file
conflict again, `git ls-remote --heads origin` names the branch responsible.

Independent changes each get their own git worktree under `../penguin-harness-wt/<topic>/` so
several can run in parallel.

**Keep searches inside the worktree you are working in.** Scanning the home directory or the whole
disk is rarely worth it: it is slow, and what it turns up outside the tree is usually another
checkout's copy of the file you are already looking at. When a path does not resolve, prefer
narrowing — reason about the package layout, ask `git ls-files`, follow the conventions above — over
widening the root. The only paths outside the worktree worth reading are the siblings named here:
`../penguin-harness-design` for specs, `../penguin-harness-wt/*` for another topic's tree, and
`../agenthub` for MMSP where it is checked out (the checkout keeps the library's former name).
Reach them by name; never find them by scanning. Say all of this to every subagent you dispatch —
widening the search root is the first move a subagent makes when a path does not resolve.

## Tests prove behaviour, not the source

Before a test, write its scenarios (Given / When / Then) in the file header; one `it` per
scenario, named as the behaviour. Assert only what the caller can observe — and look first for
what must *not* happen (a retry that must not duplicate, a refusal that must not write). Never
test a constant, a copied table, a UI string against its dictionary, or which private helper
ran. Fake only at the system's edge with the package's shared helpers (one fetch fake, one mock
LLM, `createTestApp`, real temp dirs, fake timers); do not `vi.mock` the package's own modules.
Every branch a change adds is taken by a scenario; pruning never lowers branch coverage. No real
sleeps, no per-test servers. CI time is a cost paid three times (Linux, macOS, Windows): keep each
test well under a second, and check your PR's job durations after CI. `reference/testing.md` has
the rules and the checklist.

## Verify what you changed

Node must be >= 24. In each worktree, `pnpm install --frozen-lockfile` first.

The full chain CI runs is `pnpm build`, `pnpm format:check`, `pnpm lint`, `pnpm typecheck`,
`pnpm test`, `sh scripts/test-installer.sh`; the style job also runs `actionlint` over
`.github/workflows/**`. **Do not reach for `pnpm test` by reflex** — it is the whole workspace,
every package with a test script, minutes per run, and for a docs-only diff it proves nothing the
narrow run does not. Pick the narrowest evidence that would actually fail for this change's
regression:

```sh
pnpm --filter @prismshadow/penguin-server exec vitest run test/model-catalog.test.ts # one file, ~2s
pnpm --filter @prismshadow/penguin-web test                                          # one package
```

| Changed | Run |
| --- | --- |
| `rfcs/**` | Follow the `artspec-rfcs` skill, run `pnpm --filter @prismshadow/penguin-landing exec artspec check-rfcs --base origin/main`, and check the `artspec-rfcs` attestation box in the PR description |
| `changelog/**` | Follow the `artspec-changelog` skill (+ `reference/changelog.md`) and run `pnpm --filter @prismshadow/penguin-landing exec artspec check-changelog --base origin/main` |
| Markdown only — `.github/CONTRIBUTING.md`, `.agents/`, README | `git diff --check`, then read it: prettier ignores `*.md` repo-wide, so `format:check` proves nothing here |
| `packages/docs/content/**`, blog posts under `packages/landing/content/**` | the `docs` and `landing` package tests (search index, blog fixtures) + the writing skill's `check` for prose; prettier does not see the Markdown |
| `plugins/**` (repo root) | that plugin's `build` (a change to `src/index.ts` reaches the library only through the `ifaces.json` it writes) and its own `test` where it has one, the server's `plugin-library.test.ts` (every shipped package reads clean), core's `goal-hooks.test.ts` / `hook-packages.test.ts` / `plugin-porting.test.ts` when those scripts changed, and `node scripts/check-plugin-versions.mjs origin/main` |
| The model catalog | server `model-catalog.test.ts` and `models.test.ts`, web `model-grouping.test.ts` and `protocol-path.test.ts` |
| The credential rule or a row's effective connection | core `model-connection.test.ts`, server `models.test.ts` and `models-balance.test.ts` |
| Request assembly, history rebuild, compaction, the system prompt, a tool's description or schema | core's three `prompt-cache-*` suites — read the section below before you touch what they report |
| One package's source | that package's `test`, plus `typecheck` |
| Exported core types, or anything downstream imports | `pnpm build` + `pnpm typecheck` before any test |
| Anything that opens, folds, resizes or animates in the Web App or `packages/ui` | the `ui` and `web` tests + frames captured mid-transition in every built-in theme pack (`modern`/Frost, `github`/Primer, `geek`/Console, `doodle`/Doodle; `penguin-harness-frontend`, "Motion"); a resting screenshot is not evidence |
| A remote test tree after `main` moved (a merge, a rebase) | rebuild `@prismshadow/penguin-server...` there first: a stale core `dist` reads as dozens of TS2305 "no exported member" errors in web and the gallery |
| `package.json`, the lockfile, `pnpm-workspace.yaml` | `pnpm install --frozen-lockfile` + `pnpm build` |
| Installers, `release.yml` | `sh scripts/test-installer.sh` |

Always cheap, always worth it: `git diff --check`, `pnpm lint`, and `pnpm format` + `format:check`
on any diff at all (prettier skips Markdown).

Run the whole chain in exactly three cases: the change spans the repo widely enough that nothing
narrower is credible, you are diagnosing a CI failure, or you are asked to. There are no coverage
thresholds in this repo, so nothing forces a wider run than the behavior needs.

**Tests run on this machine unless the user asks otherwise.** Moving a suite to another host is
something they request in so many words, not an optimisation to take on your own — see
`reference/verification.md` for how, and for why a difference between two machines is a finding
rather than something to paper over.

Once the evidence you chose passes, commit and push to the current branch without asking.
Force-pushes and reverting someone else's commits still need confirmation.

When a test fails in a way that does not match your diff, when CI reads green too easily, or when a
fake or an assertion looks like it proves nothing, read `reference/verification.md` before spending
a second round on it.

## A prompt-cache miss is a cost regression, and it has to be said out loud

A provider serves a cached prefix only while the next request repeats the previous one byte for byte
from the front: the model id, the tools, the fast-mode parameters, the system prompt, the remaining
prompt-affecting parameters, then the messages. Everything from the earliest divergence onward is
re-read at full price, on every request of every running conversation — not only the one in front of
you. A word added to a tool description costs far more than its own tokens.

Three suites in `packages/core/test` hold that line, and a failure means something different in each:

| Failing | What it is telling you |
| --- | --- |
| `prompt-cache-invariants.test.ts` | Your change made a request stop extending its predecessor. This is the regression itself; the diagnostic names the tier that diverged and estimates the input that falls after it. |
| `prompt-cache-lifecycle.test.ts` | The same thing counted in provider tokens. A number that went down is money. |
| `prompt-cache-simulator.test.ts` | You changed the rule engine, not the harness. Only correct when the provider's documented rules changed — go and check the documentation, not the test. |

**Never re-baseline these to green.** Editing an expected number, or adding a case to the list of
misses that are there by design, is a decision about spending the user's money — not a fix. Put the
tier that moved and what it costs in front of them and let them decide.

And say it in the reply, not only in a test log. A cache regression shows up in no other signal this
repo produces: nothing is slower, nothing is wrong on screen, and CI goes green the moment the
numbers are edited. If you do not raise it, it ships.

## Record and ship

Every change ships a changelog entry, in both languages, in `changelog/unreleased/`: a
`YYYY-MM-DD-<slug>.md` and `YYYY-MM-DD-<slug>.zh.md` pair mirroring section for section, inside the
PR that makes the change. One without the other is unfinished, **there is no index file**, and
reasoning belongs in the PR description rather than on disk.

**Always use the bundled `artspec-changelog` and `artspec-rfcs` skills** (`.agents/skills/artspec-changelog/SKILL.md` and `.agents/skills/artspec-rfcs/SKILL.md`) for changelog and RFC work:

- **Changelog**: `artspec-changelog` defines the zero-conflict per-change format (`artspec.config.json`), `changelog/README.md` is the repo-level spec, and `reference/changelog.md` covers PenguinHarness-specific traps (shared issue/PR numbering `#N`, cross-repo `MMSP [#N]` links, `RELEASE.md` tag timing). Validate with `pnpm --filter @prismshadow/penguin-landing exec artspec check-changelog --base origin/main`.
- **Design RFCs (`rfcs/PRFC-*.md`)**: `artspec-rfcs` is mandatory — RFCs record invariant design concepts (never rollout plans, full interface dumps, or GitHub `/blob/` code links), ship in their own `request-for-comments` PR separate from implementation (remember implementation can reference an open RFC before it merges), add **at most one** new SemVer heading under `## Changes` per PR, and require a checked `artspec-rfcs` box in the PR description. Validate with `pnpm --filter @prismshadow/penguin-landing exec artspec check-rfcs --base origin/main`.

**A conclusion is not a deliverable.** Do not package findings as a standalone page, artifact or
report file: it detaches them from the diff they are about and no one opens it twice. A review's
findings go in PR comments, on the lines they concern; everything else goes in the PR description
and in the reply to whoever asked.

## Backward compatibility is the user's call, not yours

When a change touches data or configuration already on disk — Traces, `system_config.yaml`,
`.project_config.toml`, installed skills, `web.db`, localStorage keys — do not pick a strategy.
State plainly what breaks if nothing is done, offer the options (permanent dual-format tolerance /
one-time migration / a documented reset path / accept the break and say so), and let the user decide.

Whatever is decided, compatibility code is a standing cost: name **how long it stays, who removes
it, and what has to be true first**, at the code site and in a dedicated
`changelog/unreleased/YYYY-MM-DD-backward-compatibility.md`. Other entries in that batch reference
that file instead of re-telling it. A batch with no compatibility handling has no such file.

## Core never special-cases a model, provider or gateway

`packages/core/src` contains no model ids, provider ids, vendor hostnames or endpoints, and no
catalog data. Model knowledge lives in `library/model/src/model-catalog/`; the server's
`packages/server/src/model-catalog/` re-exports it, and the browser-safe
`@prismshadow/penguin-server/model-catalog` subpath is the stable entry the Web App imports. It
reaches core only through the Project config the server seeds —
`[providers.<id>]`, `[[models]]`, `default_model` — or through host hooks
(`AgentAssembly`). Nor does any package keep environment or refusal logic: which variable a
keyless model reads, and which base URL is refused without a key, is MMSP's rule. Core passes the
file's key, base URL and client type to MMSP verbatim, and every preview asks MMSP's
`@prismshadow/mmsp/credentials` (the catalog's `env-keys.ts`). The one exception
is App attribution: `llm/app-attribution.ts` (`attributionHeaders`) names the gateways whose headers
`GenerativeModel` attaches. A change that wants core to know a model or a vendor belongs in the
catalog and the config it seeds instead; a core test that needs a Project writes a fixture
(`test/seeded-project.ts`), never the catalog.

## One concern per module

Logic with its own reason to change — an identification scheme (App attribution), a migration, a
derivation rule (which variable a keyless row reads), a protocol mirror (MMSP's routing table) —
gets a file of its own beside its caller, never a section appended to a large neighbour. A change that moves or
reshapes a large file splits it along its concerns, keeping the import graph acyclic: a module
cycle that reads a binding at load time fails with a TDZ `ReferenceError`. The case that set the
rule: [#1167](https://github.com/Prism-Shadow/penguin-harness/pull/1167) first put App attribution
at the top of `generative-model.ts`.

## The message protocol is closed by default

- **AMSP records are closed by default.** No new field, type or enum value unless the fact is
  unrepresentable by existing records and underivable by readers; prefer recording earlier or
  streaming an existing record over a new field. Say so in the PR. The architecture spec's
  message-format section states the rule, and `packages/amsp/src/records/types.ts` repeats it
  at its head.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.