Skip to content

chore: bring the repository to core's baseline (ADR-0071) - #28

Merged
bketelsen merged 2 commits into
mainfrom
irulan/baseline
Nov 6, 2026
Merged

bketelsen merged 2 commits into
mainfrom
irulan/baseline

Conversation

@frostyard-machines

@frostyard-machines frostyard-machines commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Brings Porter to core's repository baseline (frostyard/core ADR-0071, docs/specs/repository-baseline.md, rows B1 to B17), as frostyard/lodge#49 and frostyard/frostnotes#131 do for theirs. Porter already had most of it: AGENTS.md with 3 of its 4 links, the docs shape, the gate triad, pinned actions, .svu.yml and MIT. This PR adds what was missing, guards it with Go tests in internal/workflowcheck (which make verify runs), and rewrites the README to core's README standard (ADR-0072, row B17). The test file is lodge#49's, with Porter's governed paths.

This PR changes no product code and no behaviour: git diff origin/main --stat -- '*.go' go.mod go.sum cmd api internal web packaging/lodge packaging/nfpm.yaml packaging/deb-check.py Makefile mise.toml mise.lock .github/workflows/ci.yml .github/workflows/release.yml lists only internal/workflowcheck/ (1 new _test.go file and its doc.go comment). Porter stays a lodge app; the kit, client and UI pins are unchanged, so lodge's checks are not touched.

  • B1: .cursorrules is a new relative symlink to AGENTS.md, beside CLAUDE.md, GEMINI.md and .github/copilot-instructions.md.
  • B2: .memory/corrections.jsonl, with the 2 lines of this PR's review fixes. Core's check-corrections.mjs also accepts an empty file, and so does the guard.
  • B6: .github/risk-paths.json (17 entries) and the caller .github/workflows/risk-paths.yml, byte-identical to lodge's (core's reusable workflow at 1b02a12; permissions: {}). The label risk:high now exists in this repository.
  • B7: .github/pull_request_template.md: lodge's, with Porter's gates in Verification (make check, make web-check (nsl), make race, make deb, make vulncheck, make lodge-package).
  • B13: .github/dependabot.yml: github-actions, gomod (/) and npm (/web), weekly and grouped, with ci:/build: prefixes so that svu reads them as patches.
  • B14: SECURITY.md: private vulnerability reporting at https://github.com/frostyard/porter/security; only the latest vX.Y.Z release and its .deb get fixes. Private vulnerability reporting is on (gh api repos/frostyard/porter/private-vulnerability-reporting gives enabled: true).
  • B17: README.md in the service kind (below).
  • Guard: internal/workflowcheck/baseline_test.go checks B1 (the 4 links are relative and resolve to AGENTS.md; .claude/skills), B2 (each corrections line follows core's check-corrections.mjs rules; an empty file is valid), B6 (strict parse, core's glob validator and matcher, each why names a category of core's risk-paths spec, every workflow and each release, credential, auth and migration path exists and is listed, no glob is stale, and TestRiskMarkers: every Go file with a method's callers, the unattended tool set, a file mode, the private socket or the schema matches a glob) and B13 (each go.mod, package.json, Cargo.toml or Dockerfile has its Dependabot entry).
  • AGENTS.md gets a "Repository baseline" section (with the marker guard and a rule that keeps ADR-0004's 2 modes apart in prose), the new link, the caller in the Map, and packaging/README.md as the runbook. docs/org-adrs.md lists the core ADRs that bind the repository now (0011, 0012, 0018, 0019, 0053, 0058, 0068, 0070, 0071, 0072, 0073 added), and drops a stale paragraph that said CI, mise.toml and the gates did not exist yet.

Not copied: the template's Node gate

As in lodge#49 and frostnotes#131, scripts/check-template.mjs is not copied: Porter runs no Node on the host (AGENTS.md, Gates), and make verify is a host gate that make bump also runs. The baseline rows do not ask for it. I ran core's own scripts at origin/main on the new files, in an nsl machine: node scripts/check-risk-paths.mjs --root <worktree> --caller .github/workflows/risk-paths.yml gives ok risk_paths: 17 entries, and node scripts/check-corrections.mjs --root <worktree> gives ok corrections: 2 lines.

README (B17)

Kind: service (core's README spec lists Porter under it). Checker, from core at origin/main (node .agents/skills/frostyard-readme/scripts/check-readme.mjs), in an nsl machine:

Before (--ref ef2e374, origin/main):

FAIL R1 expected exactly 1 "<!-- readme-kind: <kind> -->" line, found 0 (none)
FAIL R3 the top block has 231 words (at most 130), without the marker, images, badges and headings
FAIL R4 expected exactly 1 "**Status:**" line in the top block, found 0 (none)
FAIL R5 expected exactly 1 "**Documentation:**" line in the top block, found 0 (none)
FAIL R8 line 146: the heading "After the sysexts" is level 3 (at most level 2)
FAIL R9 there is no Develop section
FAIL R10 there is no Where to go next section
FAIL R11 the README has 1764 words (at most 1000)
FAIL R12 there are 4 dates in YYYY-MM-DD form outside fenced code (at most 2)

After: ok README.md (service, 608 words).

Old part Verdict Where
Lead ("The owner's personal assistant inside lodge…") kept Lead, shorter: what it is, who it is for, where it runs
Capabilities in the lead (reads mail, calendar, tasks, notes; drafts, never sends; memory and routines in the vault; lodge's inference) kept What it does, 6 bullets, each with its ADR, spec or design link
"Pre-release: chat, routines and reading from frostread are built…" kept The status line
App paragraph (porterd, the app socket, /app/porter/, the app contract, kit and client) kept Interface and Deploy
Path table dropped, a copy AGENTS.md's Map holds the same paths in more detail
3 make bullets kept Develop
Update, Roll back, After the sysexts, Release (the runbook) moved, text unchanged packaging/README.md, after a new table of what each packaging file installs as; only the relative links change (docs/… → ../docs/…, .github/… → ../.github/…). diff of the sections shows no other change. Deploy links each part
Limits moved, text unchanged docs/design/overview.md#limits (links rebased); the README keeps 6 short bullets and links it
(new) Interface added The JSON-RPC methods of schema/rpc
(new) Where to go next added AGENTS.md, docs/README.md, SECURITY.md, LICENSE

The links to the moved parts are updated: docs/design/overview.md (Operational notes) and docs/plans/0001-roadmap.md (the host's update). The roadmap's Deployments table rows are records and keep their text.

Inventory

Every file that is not product code, with its verdict.

File or group Verdict Why
AGENTS.md keep, edited The canonical file. Adds .cursorrules, the caller and the runbook in the Map, and a "Repository baseline" section
CLAUDE.md, GEMINI.md, .github/copilot-instructions.md keep Relative symlinks to AGENTS.md
.cursorrules add B1 symlink
.claude/skills, .agents/skills/TEMPLATE/SKILL.md keep The skills alias (ADR-0029) and the skill template
.memory/corrections.jsonl add B2; 2 lines from this PR's review fixes
docs/README.md, docs/adr/ (7 + template), docs/design/ (1 + template), docs/specs/ (1 + template), docs/plans/ (1 + template) keep Already the ADR-0025 shape, indexed
docs/design/overview.md keep, edited Takes the README's Limits, unchanged; its runbook link points at packaging/README.md
docs/plans/0001-roadmap.md keep, edited 1 link to the runbook's new place
docs/org-adrs.md keep, edited Lists the binding core ADRs (B3); drops the stale "no CI yet" paragraph
README.md keep, rewritten B17 (above)
packaging/README.md add The runbook from the README, unchanged, and a table of the packaging files
LICENSE (MIT) keep B10
SECURITY.md add B14
.github/pull_request_template.md add B7
.github/dependabot.yml add B13
.github/risk-paths.json, .github/workflows/risk-paths.yml add B6
.github/workflows/{ci,release}.yml keep Unchanged; B5 is met and TestWorkflowsFollowADR0021 holds it
Makefile, mise.toml, mise.lock, .svu.yml, .golangci.yml, .gitignore keep Unchanged; B4, B8, B11 are met
schema/rpc/ keep The API contract (AGENTS.md: API changes start there)
packaging/ (lodge/, nfpm.yaml, deb-check.py) keep Release and install files; listed in risk-paths.json
web/ config (package.json, pnpm-lock.yaml, pnpm-workspace.yaml, tsconfig.json, vite.config.ts, vitest.config.ts, index.html, public/icon.svg) keep The web bundle's build; package.json has its Dependabot entry

Counts: 9 new files (1 of them a symlink; 1 a test file), 6 edited (AGENTS.md, README.md, docs/design/overview.md, docs/org-adrs.md, docs/plans/0001-roadmap.md, internal/workflowcheck/doc.go), 0 deleted. Porter has none of the framework trees that B16 names (docs/superpowers/, .planning/, .cursor/, .gaai/, yeti/, cairn/, docs/agents/).

Baseline rows

Row Status Evidence or reason
B1 Instruction surface done 4 relative symlinks to AGENTS.md; TestInstructionAliases
B2 Corrections inbox done 2 valid lines; TestCorrectionsInbox, TestCorrectionsLines, TestCorrectionProblems follow core's line rules
B3 Docs shape met docs/README.md, the 4 categories with TEMPLATE.md, docs/org-adrs.md linked from the index; org-adrs.md brought up to date
B4 Make gate and tool pins met verify, check, ci (ci: verify race web-check); mise.toml, mise.lock
B5 Pinned, least-privilege actions met Every uses: is a 40-character SHA with a version comment; top-level permissions: {}; persist-credentials: false; TestWorkflowsFollowADR0021. The new caller follows it
B6 Risk paths done 17 entries: governance (the list, workflows, Makefile, mise pins, internal/{workflowcheck,packagecheck}), publication (release.yml, .svu.yml, nfpm.yaml, deb-check.py, packaging/lodge/**: manifest, units, system user, stage.sh), secrets and credentials (internal/config/config.go: the app tokens, their check and 0600 mode; cmd/porterd/main.go: porterd token set, the state directory's mode, the sockets' wiring), auth (cmd/porterd/main_test.go, the kittest socket rules; api/{api,rpc,thread,activity}.go and internal/rpcserver/server.go, the caller kinds and the callers each method admits; internal/tools/{classify,registry,tools}.go, what each tool may do and the unattended set; internal/agent/{agent,run,own}.go, approval cards, the unattended run, the remember tool and the card confirmation check; internal/routine/parse.go, the Porter/Routines/ check), destructive operations (internal/thread/store.go: schema, its column migration and recovery); TestRiskPaths, TestRiskMarkers, TestRiskMarker, TestMissingPaths, TestWhyCategory, TestValidGlob, TestMatchGlob
B7 PR template done Has ## Risk tier
B8 svu versions met .svu.yml, no .svu.yaml; make bump tags svu next
B9 Tool documentation site follow-up A separate PR (core ADR-0070, the frostyard-docs-site skill)
B10 License met MIT (gh api … .license.spdx_id = MIT)
B11 Go toolchain met go 1.27.0 (toolchain go1.27.3), golangci-lint = "2.15.0", as the frostyard-go-repo skill's Fleet toolchain names; no other pin. A patch bump of the go line, if wanted, is a separate PR: it can change behaviour
B12 CI entry met Separate jobs, as the row allows (core ADR-0073): ci.yml runs on pull_request each prerequisite of ci: as make verify, make race and make web-check (with IN_NSL='sh -c'); the ci recipe has no commands
B13 Dependabot done 3 entries; TestDependabotCoversManifests
B14 Security policy done SECURITY.md links /security; private vulnerability reporting is on
B15 No CODEOWNERS met None
B16 No leftover framework trees met None; .claude/ holds only skills
B17 README done Core's checker prints ok README.md (service, 608 words)

Follow-ups: B9 (docs site) and any B11 toolchain bump, each in a separate PR.

Risk tier

Risk tier: 3. The PR adds a workflow and the risk-path list. The base has no .github/risk-paths.json, so the label workflow does not run on this PR. These paths match the new list:

  • .github/risk-paths.json: the new list. Core's validator passes it.
  • .github/workflows/risk-paths.yml (also .github/workflows/**): a byte-identical copy of lodge's caller. It runs on pull_request_target with permissions: {} at the top and contents: read, pull-requests: write for the job, calls core's reusable workflow at a full SHA, and checks out no code.
  • internal/workflowcheck/**: 1 new test file and the package comment. Tests only; no existing test changes.
  • .memory/corrections.jsonl is not on the list; it gets 2 lines.

No other workflow, the Makefile, the mise pins, or any packaging, credential, auth or store file changes.

Docs housekeeping

  • No new doc under docs/; docs/org-adrs.md stays indexed. packaging/README.md is outside docs/, as lodge's is
  • Conformance alias added as a symlink; the canonical AGENTS.md is edited instead

Verification

  • make check: exit 0 (tidy, vet, gofmt, golangci-lint 2.15.0 0 issues., all tests)
  • go test -count=1 -v -run 'TestInstructionAliases|TestCorrection|TestRiskPaths|TestMissingPaths|TestMatchGlob|TestValidGlob|TestWhyCategory|TestDependabot' ./internal/workflowcheck/: pass; the tests log 2 corrections lines, 17 globs; 38 required paths listed; 124 files searched, 17 globs; 10 Go files with a marker, 2 manifests, 3 Dependabot entries
  • Each guard fails on purpose (file changed, go test run, file restored):
    1. packaging/lodge/** removed: packaging/lodge/app.json is a release, secrets, auth or governance path; .github/risk-paths.json must list it (and 4 more such lines).
    2. A glob nothing/here/** added: glob "nothing/here/**" matches no file in the repository.
    3. The npm /web entry removed: web/package.json has no Dependabot entry (package-ecosystem npm, directory /web).
    4. .cursorrules as a copy: .cursorrules is not a symlink.
    5. A sixth member in a corrections line: line 1: unknown key(s): extra.
    6. The old api and agent globs, and governedPaths without the 4 new files: TestRiskMarkers fails with api/thread.go has []CallerKind{ (an auth, credential or schema check); .github/risk-paths.json must list it (and api/activity.go, api/rpc.go).
  • Revert test of the review fix (scratch worktree at 97ccb85, .github/risk-paths.json of 7374d10, go test -count=1 -run 'TestRiskPaths|TestRiskMarkers' ./internal/workflowcheck/, worktree removed with git worktree remove): TestRiskPaths fails on api/rpc.go, api/thread.go, api/activity.go, internal/agent/own.go; TestRiskMarkers fails on api/activity.go, api/rpc.go, api/thread.go.
  • Core's check-risk-paths.mjs, check-corrections.mjs and check-readme.mjs at origin/main pass (nsl)
  • The moved runbook and limits: diff of the old README sections against the new places shows only the rebased links
  • git diff origin/main -- '*.go' go.mod go.sum shows only internal/workflowcheck/
  • CI green

Cross-review

  • Coders: deepseek/deepseek-flash and Claude Opus (github-copilot/claude-opus-5.5). Reviewer: openai/gpt-6.1-sol. Base ef2e374.
  • Initial review of 7374d10 (15 files, 2 batches): Not ready, 2 blocking points. Fixed in 97ccb85, each with its guard and 1 line in .memory/corrections.jsonl:
    1. The risk list missed caller admission and card checks (api/thread.go, api/activity.go, internal/agent/own.go): listed, with api/rpc.go; governedPaths requires them, and the new TestRiskMarkers catches the next such file by its markers.
    2. The README said any other change becomes an approval card, but in chat Porter may flag and move mail and create or complete tasks (ADR-0004); only a routine proposes approvals. The README now keeps the 2 modes apart, and an AGENTS.md rule guards it (no test can check prose).
  • Re-review 1 of 97ccb85: Ready, Blocking: none.

Add the files of frostyard/core's repository baseline (ADR-0071, rows B1
to B17) that porter lacked: the .cursorrules link, the corrections inbox,
the risk-path list and its caller, the PR template, Dependabot and
SECURITY.md. internal/workflowcheck now tests rows B1, B2, B6 and B13.

The root README follows core's README standard (ADR-0072) for the kind
service. Its runbook moves unchanged to packaging/README.md, and its
limits to the design overview. No product code changes.
…k paths, and keep ADR-0004's 2 modes apart in the README

api/rpc.go, api/thread.go and api/activity.go admit callers to each
method, and internal/agent/own.go holds the remember tool and the check
that a card can be confirmed: they join .github/risk-paths.json, and
TestRiskMarkers now fails on any Go file with an admission, unattended
tool, file-mode, socket or schema marker that no glob lists.

The README said any other change becomes an approval card; only a
routine does that (ADR-0004). AGENTS.md now says how to state it.
@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 6, 2026
@bketelsen
bketelsen merged commit 8365e29 into main Nov 6, 2026
5 checks passed
@bketelsen
bketelsen deleted the irulan/baseline branch November 6, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants