From d3f606715de4b51af1b1076a98d519eee4e68cbd Mon Sep 17 00:00:00 2001 From: Okiki Ojo Date: Thu, 5 Feb 2026 05:51:09 -0500 Subject: [PATCH] docs(agents): add comprehensive guidelines for PRs, RFCs, and task management Introduce structured templates for pull requests, RFC-style writing, and task tracking to enhance clarity and consistency in contributions. These documents provide clear instructions on how to articulate changes, motivations, and verification steps, reducing ambiguity in the development process. The addition of checklists for PRs and releases ensures that critical aspects are not overlooked. Should verify by reviewing the new documents for completeness and clarity. Signed-off-by: Okiki Ojo --- .../copilot/endpoint-examples.md | 0 .../docs/bundlejs-utilities.md | 0 .../docs/endpoint-deep-dive.md | 0 {.agent => .agents}/docs/endpoint-summary.md | 0 .../docs/endpoint-utility-signature.md | 0 {.agent => .agents}/guides/ascii-diagrams.md | 0 {.agent => .agents}/guides/code-review.md | 0 {.agent => .agents}/guides/commit-messages.md | 0 .../guides/endpoint-architecture.md | 0 {.agent => .agents}/guides/pull-requests.md | 0 .../guides/rfc-style-writing.md | 0 .../guides/stack-and-conventions.md | 0 .agents/memory/ACTIVE/PLAN.md | 21 +++++++++++++++++++ .agents/memory/ACTIVE/PROGRESS.md | 18 ++++++++++++++++ .agents/memory/ACTIVE/RISKS.md | 10 +++++++++ .agents/memory/ACTIVE/TASKS.md | 21 +++++++++++++++++++ .agents/memory/CHECKLISTS/pr-checklist.md | 16 ++++++++++++++ .../memory/CHECKLISTS/release-checklist.md | 13 ++++++++++++ .agents/memory/CHECKLISTS/review-checklist.md | 16 ++++++++++++++ .agents/memory/CONVENTIONS.md | 21 +++++++++++++++++++ .agents/memory/DECISIONS/ADR-0001-template.md | 16 ++++++++++++++ .agents/memory/GLOSSARY.md | 5 +++++ .agents/memory/INDEX.md | 18 ++++++++++++++++ .agents/memory/PROJECT.md | 18 ++++++++++++++++ .agents/memory/README.md | 17 +++++++++++++++ .../research/codebase-patterns.md | 0 .github/copilot-instructions.md | 8 +++++++ .gitignore | 7 ++++++- .vscode/settings.json | 6 +++--- 29 files changed, 227 insertions(+), 4 deletions(-) rename {.agent => .agents}/copilot/endpoint-examples.md (100%) rename {.agent => .agents}/docs/bundlejs-utilities.md (100%) rename {.agent => .agents}/docs/endpoint-deep-dive.md (100%) rename {.agent => .agents}/docs/endpoint-summary.md (100%) rename {.agent => .agents}/docs/endpoint-utility-signature.md (100%) rename {.agent => .agents}/guides/ascii-diagrams.md (100%) rename {.agent => .agents}/guides/code-review.md (100%) rename {.agent => .agents}/guides/commit-messages.md (100%) rename {.agent => .agents}/guides/endpoint-architecture.md (100%) rename {.agent => .agents}/guides/pull-requests.md (100%) rename {.agent => .agents}/guides/rfc-style-writing.md (100%) rename {.agent => .agents}/guides/stack-and-conventions.md (100%) create mode 100644 .agents/memory/ACTIVE/PLAN.md create mode 100644 .agents/memory/ACTIVE/PROGRESS.md create mode 100644 .agents/memory/ACTIVE/RISKS.md create mode 100644 .agents/memory/ACTIVE/TASKS.md create mode 100644 .agents/memory/CHECKLISTS/pr-checklist.md create mode 100644 .agents/memory/CHECKLISTS/release-checklist.md create mode 100644 .agents/memory/CHECKLISTS/review-checklist.md create mode 100644 .agents/memory/CONVENTIONS.md create mode 100644 .agents/memory/DECISIONS/ADR-0001-template.md create mode 100644 .agents/memory/GLOSSARY.md create mode 100644 .agents/memory/INDEX.md create mode 100644 .agents/memory/PROJECT.md create mode 100644 .agents/memory/README.md rename {.agent => .agents}/research/codebase-patterns.md (100%) diff --git a/.agent/copilot/endpoint-examples.md b/.agents/copilot/endpoint-examples.md similarity index 100% rename from .agent/copilot/endpoint-examples.md rename to .agents/copilot/endpoint-examples.md diff --git a/.agent/docs/bundlejs-utilities.md b/.agents/docs/bundlejs-utilities.md similarity index 100% rename from .agent/docs/bundlejs-utilities.md rename to .agents/docs/bundlejs-utilities.md diff --git a/.agent/docs/endpoint-deep-dive.md b/.agents/docs/endpoint-deep-dive.md similarity index 100% rename from .agent/docs/endpoint-deep-dive.md rename to .agents/docs/endpoint-deep-dive.md diff --git a/.agent/docs/endpoint-summary.md b/.agents/docs/endpoint-summary.md similarity index 100% rename from .agent/docs/endpoint-summary.md rename to .agents/docs/endpoint-summary.md diff --git a/.agent/docs/endpoint-utility-signature.md b/.agents/docs/endpoint-utility-signature.md similarity index 100% rename from .agent/docs/endpoint-utility-signature.md rename to .agents/docs/endpoint-utility-signature.md diff --git a/.agent/guides/ascii-diagrams.md b/.agents/guides/ascii-diagrams.md similarity index 100% rename from .agent/guides/ascii-diagrams.md rename to .agents/guides/ascii-diagrams.md diff --git a/.agent/guides/code-review.md b/.agents/guides/code-review.md similarity index 100% rename from .agent/guides/code-review.md rename to .agents/guides/code-review.md diff --git a/.agent/guides/commit-messages.md b/.agents/guides/commit-messages.md similarity index 100% rename from .agent/guides/commit-messages.md rename to .agents/guides/commit-messages.md diff --git a/.agent/guides/endpoint-architecture.md b/.agents/guides/endpoint-architecture.md similarity index 100% rename from .agent/guides/endpoint-architecture.md rename to .agents/guides/endpoint-architecture.md diff --git a/.agent/guides/pull-requests.md b/.agents/guides/pull-requests.md similarity index 100% rename from .agent/guides/pull-requests.md rename to .agents/guides/pull-requests.md diff --git a/.agent/guides/rfc-style-writing.md b/.agents/guides/rfc-style-writing.md similarity index 100% rename from .agent/guides/rfc-style-writing.md rename to .agents/guides/rfc-style-writing.md diff --git a/.agent/guides/stack-and-conventions.md b/.agents/guides/stack-and-conventions.md similarity index 100% rename from .agent/guides/stack-and-conventions.md rename to .agents/guides/stack-and-conventions.md diff --git a/.agents/memory/ACTIVE/PLAN.md b/.agents/memory/ACTIVE/PLAN.md new file mode 100644 index 0000000..5613038 --- /dev/null +++ b/.agents/memory/ACTIVE/PLAN.md @@ -0,0 +1,21 @@ +# Plan: + +## Outcome +What "done" looks like in one sentence. + +## Motivation +What problem this solves and why it matters. + +## Constraints +- Runtime and infra constraints +- Compatibility constraints +- Security and privacy constraints + +## Non-goals +What is explicitly out of scope. + +## Approach +A short narrative of the design at a high level. + +## Key decisions +Link to ADRs in ../DECISIONS when needed. diff --git a/.agents/memory/ACTIVE/PROGRESS.md b/.agents/memory/ACTIVE/PROGRESS.md new file mode 100644 index 0000000..a49c5c0 --- /dev/null +++ b/.agents/memory/ACTIVE/PROGRESS.md @@ -0,0 +1,18 @@ +# Progress + +## Current status +- Today's focus: +- Next task: T0X +- Blockers: + +## Completed +- [x] T01: (commit: <sha or PR link if known>) +- [x] T02: <title> + +## Notes for the next agent +- Assumptions made: + - <assumption> +- Files touched: + - <path> +- Verification to run: + - <command> diff --git a/.agents/memory/ACTIVE/RISKS.md b/.agents/memory/ACTIVE/RISKS.md new file mode 100644 index 0000000..25a2af1 --- /dev/null +++ b/.agents/memory/ACTIVE/RISKS.md @@ -0,0 +1,10 @@ +# Risks + +## Known risks +- <risk and why it matters> + +## Mitigations +- <how to validate or reduce the risk> + +## Follow-ups +- <future check or improvement> diff --git a/.agents/memory/ACTIVE/TASKS.md b/.agents/memory/ACTIVE/TASKS.md new file mode 100644 index 0000000..7ae4df1 --- /dev/null +++ b/.agents/memory/ACTIVE/TASKS.md @@ -0,0 +1,21 @@ +# Tasks + +Rules: +- Each task is small enough to complete in one iteration. +- Each task has clear acceptance checks. + +## Queue + +- [ ] T01: <task title> + - Why: <one sentence> + - Done when: + - [ ] <verifiable condition> + - [ ] <verifiable condition> + +- [ ] T02: <task title> + - Why: <one sentence> + - Done when: + - [ ] <verifiable condition> + +## Parking lot +- [ ] P01: <deferred idea> diff --git a/.agents/memory/CHECKLISTS/pr-checklist.md b/.agents/memory/CHECKLISTS/pr-checklist.md new file mode 100644 index 0000000..6fa8ce2 --- /dev/null +++ b/.agents/memory/CHECKLISTS/pr-checklist.md @@ -0,0 +1,16 @@ +# PR Checklist + +## Intent +- [ ] The PR title and description explain outcome, problem, and intent. + +## Changes +- [ ] Changes are scoped to the stated intent. +- [ ] Risky behavior changes are called out. + +## Verification +- [ ] Tests or manual checks are listed and reproducible. +- [ ] Failure modes and error paths were considered. + +## Documentation +- [ ] User-facing behavior is documented when needed. +- [ ] Decisions are captured in ADRs when they affect contracts. diff --git a/.agents/memory/CHECKLISTS/release-checklist.md b/.agents/memory/CHECKLISTS/release-checklist.md new file mode 100644 index 0000000..84e7d29 --- /dev/null +++ b/.agents/memory/CHECKLISTS/release-checklist.md @@ -0,0 +1,13 @@ +# Release Checklist + +## Scope +- [ ] Release intent is documented. +- [ ] Backwards compatibility risks are identified. + +## Artifacts +- [ ] Versioning and changelog are updated when applicable. +- [ ] Release notes summarize user-visible changes. + +## Validation +- [ ] Key flows are verified in the target environment. +- [ ] Rollback plan is clear if needed. diff --git a/.agents/memory/CHECKLISTS/review-checklist.md b/.agents/memory/CHECKLISTS/review-checklist.md new file mode 100644 index 0000000..024d670 --- /dev/null +++ b/.agents/memory/CHECKLISTS/review-checklist.md @@ -0,0 +1,16 @@ +# Review Checklist + +## Correctness +- [ ] Behavior matches the stated intent. +- [ ] Edge cases and error paths are handled explicitly. + +## Safety +- [ ] Secrets are not logged or stored. +- [ ] Trust boundaries are clear. + +## Maintainability +- [ ] Naming is clear and consistent. +- [ ] Complex logic is explained with comments or diagrams. + +## Verification +- [ ] Tests or verification steps are adequate. diff --git a/.agents/memory/CONVENTIONS.md b/.agents/memory/CONVENTIONS.md new file mode 100644 index 0000000..34db05a --- /dev/null +++ b/.agents/memory/CONVENTIONS.md @@ -0,0 +1,21 @@ +# Conventions + +## Intent +Capture conventions that agents should follow when working in this repo. + +## Context +This repo values small, verifiable changes and file-based progress that survives context resets. + +## Constraints +- Keep notes brief and actionable. +- Do not store secrets or customer data. +- Prefer explicit configuration and clear error handling. + +## Approach +- Read ACTIVE/PLAN and ACTIVE/TASKS before starting multi-step work. +- Update ACTIVE/PROGRESS after meaningful progress. +- Mark tasks done only when acceptance checks pass. +- Promote architectural decisions to ADRs in DECISIONS. + +## Edge cases +If work spans multiple iterations, capture risks in ACTIVE/RISKS to avoid context loss. diff --git a/.agents/memory/DECISIONS/ADR-0001-template.md b/.agents/memory/DECISIONS/ADR-0001-template.md new file mode 100644 index 0000000..082cf96 --- /dev/null +++ b/.agents/memory/DECISIONS/ADR-0001-template.md @@ -0,0 +1,16 @@ +# ADR-0001: <decision title> + +## Context +What prompted the decision. + +## Decision +What we chose. + +## Rationale +Why this choice over alternatives. + +## Consequences +Trade-offs, risks, follow-ups. + +## Alternatives considered +What we did not pick and why. diff --git a/.agents/memory/GLOSSARY.md b/.agents/memory/GLOSSARY.md new file mode 100644 index 0000000..3dd1caa --- /dev/null +++ b/.agents/memory/GLOSSARY.md @@ -0,0 +1,5 @@ +# Glossary + +- **RFC 7807** - Problem Details JSON format for API errors. +- **SQM** - Smart Queue Management. Traffic shaping to reduce bufferbloat. +- **Bufferbloat** - Latency spikes caused by oversized queues in network equipment. diff --git a/.agents/memory/INDEX.md b/.agents/memory/INDEX.md new file mode 100644 index 0000000..1468ee4 --- /dev/null +++ b/.agents/memory/INDEX.md @@ -0,0 +1,18 @@ +# Memory Index + +This index provides quick links into the durable memory files. + +## Core references +- [PROJECT](PROJECT.md) +- [CONVENTIONS](CONVENTIONS.md) +- [GLOSSARY](GLOSSARY.md) + +## Active work +- [PLAN](ACTIVE/PLAN.md) +- [TASKS](ACTIVE/TASKS.md) +- [PROGRESS](ACTIVE/PROGRESS.md) +- [RISKS](ACTIVE/RISKS.md) + +## Decisions and checklists +- [DECISIONS](DECISIONS/) +- [CHECKLISTS](CHECKLISTS/) diff --git a/.agents/memory/PROJECT.md b/.agents/memory/PROJECT.md new file mode 100644 index 0000000..7078052 --- /dev/null +++ b/.agents/memory/PROJECT.md @@ -0,0 +1,18 @@ +# Project Summary + +## Outcome +Provide a concise, shared description of what this repository delivers. + +## Context +This repo hosts bundlejs-api, a Deno v2 + TypeScript service for bundle size analysis, backed by esbuild (WASM) and Hono on Supabase Edge Functions. + +## Constraints +- Edge runtime constraints apply to API endpoints. +- Avoid hidden global state and top-level side effects. +- Keep public APIs well-documented and verifiable. + +## Non-goals +This file is not a full architecture spec or onboarding guide. + +## Approach +Keep this summary short and update it only when the product shape changes. diff --git a/.agents/memory/README.md b/.agents/memory/README.md new file mode 100644 index 0000000..3179910 --- /dev/null +++ b/.agents/memory/README.md @@ -0,0 +1,17 @@ +# Agent Memory + +This directory stores file-based state for agent work so progress survives context resets. The intent is to keep durable, commit-worthy notes separate from scratch data while staying readable in git. + +## What lives here +Durable notes that teammates can rely on live in the top-level files and the ACTIVE, DECISIONS, and CHECKLISTS folders. Scratch notes live under SESSIONS and are usually gitignored. + +## Constraints +- Do not store secrets, tokens, private URLs, or customer data. +- Keep ACTIVE short and current; archive completed work into ATTIC. +- Prefer small, verifiable tasks that can be completed in one iteration. + +## Approach +Use ACTIVE as the control panel for ongoing work, DECISIONS for long-lived architectural choices, and CHECKLISTS for repeatable quality gates. + +## Edge cases +If TASKS grows too large, split into multiple files or an epic folder. If a decision affects contracts or architecture, promote it to an ADR. diff --git a/.agent/research/codebase-patterns.md b/.agents/research/codebase-patterns.md similarity index 100% rename from .agent/research/codebase-patterns.md rename to .agents/research/codebase-patterns.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 22ffb5c..e211f17 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -68,6 +68,14 @@ When networking/infra is involved: - Avoid unsafe patterns (string-built SQL, unsafe eval, weak crypto). - Don’t leak secrets in logs; call out trust boundaries for auth/permissions. +## Agent memory (file-based) +When acting as an agent on multi-step work: +- Read: `.agents/memory/ACTIVE/PLAN.md`, `TASKS.md`, `PROGRESS.md` +- Update `PROGRESS.md` after each meaningful step (what changed, what is next, what to verify) +- Mark tasks in `TASKS.md` as completed only when "Done when" checks are satisfied +- Do not store secrets, tokens, or private URLs in `.agents/memory/` +- Keep scratch notes in `.agents/memory/SESSIONS/` (gitignored) + ## Where to look for more targeted rules This repo uses path-specific instructions under `.github/instructions/`. Follow the applicable file-based rules when working in: diff --git a/.gitignore b/.gitignore index 1c9a88d..276366a 100644 --- a/.gitignore +++ b/.gitignore @@ -157,4 +157,9 @@ packages/edge/@types/ packages/edge/deno.lock repomix-output.xml.txt -.vscode/mise-tools \ No newline at end of file +.vscode/mise-tools + +# Agent memory scratch +.agents/memory/SESSIONS/ +.agents/memory/**/*.log +.agents/memory/**/*.tmp diff --git a/.vscode/settings.json b/.vscode/settings.json index fa77c62..5c15671 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,16 +3,16 @@ "deno.enable": true, // Code review (review selection) "github.copilot.chat.reviewSelection.instructions": [ - { "file": ".agent/guides/code-review.md" } + { "file": ".agents/guides/code-review.md" } ], // Commit message generation "github.copilot.chat.commitMessageGeneration.instructions": [ - { "file": ".agent/guides/commit-messages.md" } + { "file": ".agents/guides/commit-messages.md" } ], // PR title + description generation "github.copilot.chat.pullRequestDescriptionGeneration.instructions": [ - { "file": ".agent/guides/pull-requests.md" } + { "file": ".agents/guides/pull-requests.md" } ] } \ No newline at end of file -- knotmirror 0.0.1