Files
piik/AGENTS.md
T
AAA b406a086b9 docs: separate current contracts from investigation history
Condense collaboration procedures, protocol field inventories and repeated audit or experiment narration into their existing owners. Keep accepted decisions, unresolved work, primary sources and measurement limits. Detailed historical trials remain accessible at their measured Git revision without a second archive tree.

Align both language guides with the existing contribution value criteria. Keep local operating instructions out of public contributor guidance. Independent reviews preserved closed baseline choices and single-run evidence limits. Documentation and repository hygiene checks pass; this phase changes no runtime code.
2026-11-28 10:29:52 -05:00

7.7 KiB

Project Instructions

System and developer instructions take precedence. Within those bounds, the user's latest explicit decision governs the task. An explicit change to a project invariant or to the canon takes effect when the owner gives it.

  1. Project invariants and the canon set the boundaries below.
  2. Principles guide choices within those boundaries.
  3. Domain standards and CONTRIBUTING own their requirements.
  4. Skills describe how to carry out authorized work.

Research, examples, audit findings and other agents' proposals provide evidence. The task determines the authority to act. Apply each standard in its domain and bring proposed departures from the canon to the owner before implementation.

Invariants

  • Secrets and user data stay out of the repository. Never commit credentials, TLS private keys, raw access tokens or real user data. Commit placeholders and document local injection. A leaked secret cannot be recalled.
  • Private media paths stay private. Do not log, persist or upload private media-path identifiers beyond their accepted owner, and keep media credentials short-lived and narrowly authorized.
  • A task carries only its own authority. Review, research, implementation, deployment and cleanup each permit what that kind of task needs. A skill, an example or an audit cannot widen it.
  • Publication is the owner's. Follow the applicable merge and release authorization in CONTRIBUTING.
  • Shared history is not rewritten. No force-push and no rewrite of pushed history without the owner's approval, and no commit to a branch another agent owns.
  • Published promises hold. Preserve the compatibility published for 2.x. Private 3.0 experiments carry none: replace them without aliases, dual readers or writers, or migrations for stale private clients.
  • Durable state is not rolled back silently. No automatic downgrade or database rollback. Define recovery before touching persistent or irreversible state. Recreating a resource never renews expired authority.
  • Phase blockers. Block the current phase on P0 security, privacy, authorization, irreversible-data, generation, bounded-resource or rollback failures, and on P1 failure of that phase's core path.

Product

Piik is a free, self-hosted place for friends to talk and share their screens, P2P first. The canon states its founding design: read it before design work. This worktree develops isolated 3.0, whose architecture ADR-0016 records. The network model and room-data model describe the current prototype. The forwarding design and hosting and moderation design own the target boundaries, and status indexes the implementation. Published 2.x promises remain with the maintenance line's standards and status.

The canon is not repeated here. One working default follows from it: media adaptation belongs to Browser WebRTC, the Native RTC SDK and accepted encoder policies, and a media mechanism of our own takes an accepted decision backed by primary evidence.

Principles

  • One owner. Every fact has one writer, and every lifetime has one owner that retires it. A meaning repeated across code, interface, copy, configuration and lifecycle follows one contextual contract.
  • Fail at the owner. Report an operation's failure to its waiting owner and reuse existing recovery where it gives the required outcome. Apply the failure boundary when proposing additional recovery.
  • Reuse before adding. Find the existing owner, helper or mature approach first, then choose the simplest coherent design that meets the need. Simplicity does not remove requested function, visual quality or safety.
  • Nothing is protected by its age or its author. When a defect, a repeated repair or an awkward boundary traces to the shape of a design, question it, propose the one that would be chosen today, and supersede the record that accepted it. Path dependence and sunk cost are not reasons.
  • Evidence first. Use primary sources for non-trivial design and bugs, and verify in proportion to the change through the standard entry points.
  • One place per rule. Each durable fact has one owner in the documentation map. TODO is the only work ledger, and Git and pull requests own completed history. A disputed meaning is recorded there as a hold on the work that depends on it. It is not written down as settled.

Where Rules Live

Topic Owner
Module boundaries, lifecycle, failure handling, review Engineering
Interface, colour, motion and the shared cast Visual language
Build identity, wire, storage and compatibility Versioning
Branches, checks, pull requests, releases, work between two agents CONTRIBUTING
Everything else Standards index

Start substantial work by reading project memory, status, TODO and only the standard, ADR or research document the task needs. Then inspect the branch, HEAD, status and worktrees, and fetch the review queue when a second agent is working. Before finishing material work, inspect status, report untracked artifacts and stage the requested files.

Skills

Read an applicable skill completely before using it, and reuse that understanding until the task or the instructions change. Use the repository's version when a global skill has the same name. A skill is a method. It adds no authority and overrides none of the layers above.

When Skill and responsibility
Coding, code review, or implementation design Ponytail: smallest coherent implementation and reuse
Implementation, debugging, or review Stop That Shit: proportionate investigation, verification and complete delivery
Cross-surface consistency, recurring sibling-path defects, or standardization audits Context consistency: trace shared meanings and ownership; ordinary changes check only their affected family
Writing or reviewing requirement levels in specifications, API contracts or project rules RFC 2119: precise obligations, recommendations and options; preserve the rule owner's intent
Material UI visual design, redesign or polish Unslop: product-specific hierarchy, semantic grouping, shared visual consistency and rendered review
Browser APIs, accessibility, responsive interaction or Web performance Modern Web Guidance: current platform patterns, supported-browser behavior and focused verification; complements Unslop
The review queue or a mailbox changed, or you want the other agent's review Cross review: sync, judge each item on the code, answer in your own mailbox