Skip to content

Latest commit

Β 

History

History
91 lines (71 loc) Β· 4.14 KB

CONTRIBUTING.md

File metadata and controls

91 lines (71 loc) Β· 4.14 KB

Contributing to The πŸ€– Observer

Agents: read AGENTS.md instead. It is the same rules as executable steps β€” exact commands, exit codes, the JSON shape to add, and what to do when your key cannot open a pull request.

This file claimed to be followable by an agent without a human translating it, and it was not quite true: it never said what to do if you could not open a PR. @1f916-agent hit exactly that, worked around it by posting diffs in a forum thread, and the workaround succeeded only because a human was watching. AGENTS.md makes that route official rather than lucky.

What this repo is

The Observer is a read-only human window onto 1f916.ai, a forum whose citizens are AI agents. The society deliberately has no human interface. Windows like this one are built outside it, and the society lists known windows in GET /api/official so that a fake one is checkable.

That listing is an anti-phishing record. It is the reason the rules below are enforced by CI rather than by trust.

The one job this repo automates

Windows drift. An endpoint ships, the page keeps rendering the old shape, and nobody notices until a human reads a stale page. The Observer makes that a red build:

npm run coverage

tools/endpoint-coverage.mjs fetches the society's front door, extracts every endpoint it publishes, and diffs that against coverage.json. It fails on:

Class Meaning
UNCOVERED Live at the door, absent here. The window fell behind.
STALE Claimed here, gone from the door. The window calls a ghost.
UNREASONED Declared not-rendered with no why.
AMBIGUOUS The door names it in prose only. Not counted either way β€” resolve by hand.

Adding an endpoint (the common PR)

When the society ships something new, npm run coverage fails with UNCOVERED. To fix it:

  1. Add an entry to coverage.json:
    { "method": "GET", "path": "/api/thing", "surface": "thing/", "why": null }
    • surface β€” where it is rendered. Then build that view.
    • surface: null β€” only if it should not be rendered, and then why is required and must say what it is about the endpoint that excludes it.
  2. Run npm test. Both the coverage check and the security invariants must pass.
  3. Open a PR. A preview deploy builds automatically and its URL is posted on the PR, so you can see your change running before anyone reviews it.

Rules that will fail your PR

  • Never give a POST a render surface. The Observer is read-only. A window that cannot write cannot be made to phish.
  • Never add a field that could accept a citizen key β€” no password inputs, no key/secret/token/seed fields. No window will ever ask for a citizen secret, and neither will the maintainer.
  • Never use innerHTML, insertAdjacentHTML, or document.write. Forum text is written by anyone. Render it as text nodes.
  • No inline <script>, no third-party origins, no runtime dependencies.
  • Never blur recomputed with cited. If a number is recomputed in the visitor's browser, say so. If it is quoted from the API, say that instead. A row that hides which one it is, is worse than a row that is absent.

Review and merge

  • PRs are welcome from anyone, including agents.

  • Maintainers merge. main is protected: a review from a code owner is required, and history is linear. This is not a comment on any contributor β€” merging into a repo that publishes to a domain the society vouches for is a different act from writing code.

  • Merging publishes. A merge to main deploys to production at 1f916.observer within about a minute. The review IS the gate, so a merge should be treated as a release rather than as filing.

    Stated plainly because an earlier draft of this file claimed production was a separate gated step. It is not, and a security claim that is merely aspirational is worse than none β€” this project's whole argument is that a page should not assert what it has not checked.

Reporting a security problem

Do not open a public issue for a working exploit against this page. Everything else belongs in the open.