Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ procedure; read that file for the "why."
## When NOT to use

- Draft PRs — bots don't review drafts.
- As a substitute for requesting a fresh bot pass. Re-review costs money (Copilot) or burns
a rate-limited slot (CodeRabbit: 1-3/hour) — only request one (`@coderabbitai review` PR
comment, or re-request the Copilot reviewer) for fixes big/ambiguous enough to warrant a
second look. A one-line string fix doesn't need it; resolve the thread and move on.
- To get another bot pass. Never request one yourself (no `@coderabbitai review` comment,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the trigger and re-review guidance consistent throughout this skill. Immediately above, the blanket draft exclusion would make an agent skip the two Copilot threads already on this draft. CodeRabbit skips drafts here, and Copilot can review them. At the end of the skill, lines 112–113 still tell agents to ask the user before requesting a fresh bot pass, which conflicts with the maintainer-only rule here. Remove that instruction and have agents check existing threads when asked, including on drafts. GitHub’s Copilot review triggers.

no re-requesting Copilot): in the house PR flow
(<https://tikoci.dev/house/skills/tikoci-pr-flow/SKILL.md>) CodeRabbit reviews once on
ready, and any re-review is the maintainer's call.

## Procedure

Expand Down Expand Up @@ -80,8 +80,9 @@ procedure; read that file for the "why."
6. **After pushing fixes, re-check — don't assume the push resolved anything.**
- A fix push does **not** auto-resolve the thread it fixes; it may flip to `isOutdated`,
which looks handled in the UI but is not `isResolved`.
- The push also triggers a fresh CodeRabbit pass (and possibly Copilot) that can open
**new** threads. Wait for that re-review to settle, then repeat step 3.
- A push does not start a new CodeRabbit pass here (`auto_incremental_review: false` in
`.coderabbit.yaml`). Don't wait for one or ask for one. If new bot threads do appear
(for example the maintainer requested a re-review), repeat step 3 for them.
- Loop steps 3-6 until the unresolved list is empty.

7. **Confirm the gate is actually clear.**
Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "cd \"$CLAUDE_PROJECT_DIR\" 2>/dev/null || { echo \"ros-help.db grounding: NOT CHECKED (cannot cd to CLAUDE_PROJECT_DIR). Treat ros-help.db as untrusted until make db-doctor says OK.\"; exit 0; }; command -v bun >/dev/null 2>&1 || { echo \"ros-help.db grounding: NOT CHECKED (bun is not on PATH; install Bun per CONTRIBUTING.md, then run make db-doctor). Treat ros-help.db as untrusted.\"; exit 0; }; if out=$(bun run scripts/db-doctor.ts 2>&1); then echo \"ros-help.db grounding: OK ($(echo \"$out\" | grep -m1 release_tag | tr -s ' '))\"; else echo \"$out\"; echo \"ros-help.db is NOT trusted for grounding. Run make db-sync (stop the rosetta MCP server first) before making claims about shipped data.\"; fi; exit 0",
"timeout": 30
}
]
}
]
}
}
1 change: 1 addition & 0 deletions .claude/skills
1 change: 0 additions & 1 deletion .claude/skills/pick-next-task

This file was deleted.

1 change: 0 additions & 1 deletion .claude/skills/pr-review-gate

This file was deleted.

1 change: 0 additions & 1 deletion .claude/skills/promote-idea

This file was deleted.

1 change: 0 additions & 1 deletion .claude/skills/re-extract

This file was deleted.

1 change: 0 additions & 1 deletion .claude/skills/verify-task

This file was deleted.

2 changes: 1 addition & 1 deletion .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ paths-ignore:
# Archived Dude wiki HTML cached from Wayback Machine — vendored content.
- dude/**
# Root-level cached SKILL.md + reference files extracted from
# tikoci/routeros-skills. Keep this anchored so `.github/skills/` remains part
# tikoci/routeros-skills. Keep this anchored so `.agents/skills/` remains part
# of the committed workflow/instructions surface.
- /skills/**
# Committed CSV snapshots of the MikroTik product matrix.
Expand Down
37 changes: 4 additions & 33 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,6 @@
# Copilot instructions for rosetta

GitHub Copilot reads this file plus matching `.github/instructions/*.instructions.md` files. Keep this file short; put actual rules in the narrow instruction files.

## Project snapshot

- Bun + TypeScript, with Bun-native runtime APIs (`bun:sqlite`, `Bun.serve`, `bunx`).
- One core data model, exposed as MCP + browse TUI + glossary/command-tree surfaces.
- `CLAUDE.md` is now only the orientation + routing index. Rationale lives in `DESIGN.md`; operator/reference material lives in `MANUAL.md`.

## Routing map

- `CLAUDE.md` — project orientation and "where does this go?" index.
- `AGENTS.md` — Codex-specific routing note.
- `DESIGN.md` — durable rationale, data-source provenance, architecture tradeoffs.
- `MANUAL.md` — install, release/re-extraction operations, CLI/HTTP reference, schema.
- GitHub Issues — the active work queue (`agent-ready` / `umbrella` / `blocked` labels). `tasks/` is a frozen archive; `tasks/README.md` / `briefings/README.md` hold the directory-local rules.
- `.github/instructions/*.instructions.md` — narrow normative rules selected by `applyTo`.

## Start with these broad rules

- `where-does-this-go.instructions.md`
- `issue-pr-linking.instructions.md`
- `changelog-discipline.instructions.md`
- `capture-undone-work.instructions.md`
- `ci-pickup-verification.instructions.md`
- `instruction-scopes.instructions.md`

## Surface-specific rules

- MCP/query/TUI/canonicalizer → `mcp-server.instructions.md`
- Extraction/data-shape work → `extraction.instructions.md`
- Database init/schema internals → `database.instructions.md`

Prefer pointers over repetition. If you are about to add a long rule here, it probably belongs in a new scoped instruction file instead.
Read [`AGENTS.md`](../AGENTS.md) at the repo root: it is the entry point for every agent, with the
project orientation, where each kind of information lives, and an index of the
`.github/instructions/*.instructions.md` files. Copilot also applies those files automatically by
their `applyTo` scope. Do not add rules here.
2 changes: 1 addition & 1 deletion .github/instructions/changelog-discipline.instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: "Use when a change has a user-visible effect. Records exactly one CHANGELOG.md bullet under [Unreleased]."
applyTo: "src/**, bin/**, scripts/**, .github/workflows/**, README.md, MANUAL.md, DESIGN.md, CLAUDE.md, CHANGELOG.md, tasks/**, briefings/**, BACKLOG.md, VALIDATION.md"
applyTo: "src/**, bin/**, scripts/**, .github/workflows/**, README.md, MANUAL.md, DESIGN.md, AGENTS.md, CHANGELOG.md, tasks/**, briefings/**, BACKLOG.md, VALIDATION.md"
---
# Changelog discipline

Expand Down
2 changes: 1 addition & 1 deletion .github/instructions/database.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ applyTo: "src/db.ts"

## Key Rules
- Use `bun:sqlite` — never `better-sqlite3` or other drivers
- WAL mode + foreign keys enabled in `initDb()`
- Journal mode depends on who opens the file. Writable dev and extract databases run `initDb()`, which sets WAL and `foreign_keys=ON`. Package-managed databases (`DB_READONLY`, `isManagedDbPath`) are opened `{ readonly: true }` in rollback-journal mode. Opening a WAL file read-only is not reliable: it fails on macOS when the `-shm` sidecar is missing, and in a read-only directory where SQLite can't create the sidecars (it can work on Linux with a writable directory). So installs convert the downloaded file with `journal_mode=DELETE` (`src/db-lifecycle.ts`), and `src/setup.ts`'s probes open read-write. The release asset itself still ships as WAL (#265).
- `DB_PATH` env var overrides default `ros-help.db`
- Singleton pattern: one `Database` instance shared across modules

Expand Down
24 changes: 16 additions & 8 deletions .github/instructions/instruction-scopes.instructions.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
---
description: "Meta-rule for writing agent instruction files: one topic per file, smallest honest scope, and pointers instead of duplicated prose."
applyTo: ".github/copilot-instructions.md, .github/instructions/**, .github/skills/**, .github/prompts/**, CLAUDE.md, AGENTS.md"
description: "Meta-rule for agent instruction files: AGENTS.md is the one entry file, no new .github/instructions files, one home per rule, pointers instead of duplicated prose."
applyTo: ".github/copilot-instructions.md, .github/instructions/**, .agents/skills/**, .github/prompts/**, CLAUDE.md, AGENTS.md, **/AGENTS.md"
---
# Instruction scopes

When adding or editing instruction or agent-entrypoint files:
The house rule is <https://tikoci.dev/house/skills/tikoci-house/SKILL.md>. In this repo:

- Put one rule or one tightly related topic in each file.
- Use the smallest honest `applyTo` scope; broad scopes are fine when the rule is genuinely broad.
- Keep one normative home per rule. Other instruction files should point to it instead of copying the prose.
- Prefer adding a new narrow file over inflating a generic router file.
- Keep `CLAUDE.md`, `AGENTS.md`, and `.github/copilot-instructions.md` as thin routers, not competing rulebooks.
- `AGENTS.md` is the entry file for every agent. `CLAUDE.md` is only `@AGENTS.md`, and
`.github/copilot-instructions.md` only points to AGENTS.md. A directory `AGENTS.md` (e.g.
`matrix/`) gets a sibling `CLAUDE.md` containing `@AGENTS.md`.
- Do not add new `.github/instructions/*.instructions.md` files. A new repo workflow goes in
`.agents/skills/<name>/SKILL.md`, with a frontmatter `name` matching the directory. A new rule
goes in the existing file that governs it, or in AGENTS.md if it is short and repo-wide.
- When you edit, rename or retire an instruction file, update the index in AGENTS.md in the same
change. Codex and other agents ignore `applyTo` and find these files only through that index.
- Give a file the smallest honest `applyTo` scope; broad scopes are fine when the rule is
genuinely broad.
- Keep one normative home per rule. Other files point to it instead of copying the prose.
- Keep machine facts (home paths, host names, local checkouts, accounts) out of the repo. They
belong in the operator's `~/.agents/AGENTS.md`.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
description: "LLM-targeted instruction files are excluded from markdownlint so authoring rules for human docs do not distort agent-facing guidance."
applyTo: ".markdownlint.yaml, .markdownlintignore, CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, .github/instructions/**"
applyTo: ".markdownlint.yaml, .markdownlintignore, .markdownlint-cli2.yaml, CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, .github/instructions/**"
---
# Exclude LLM instruction files from markdownlint

Agent-facing instruction files are a different audience than README-style docs.

- Keep them excluded via `.markdownlintignore`.
- The exclusion set includes `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`, and `.github/instructions/**`.
- Keep them excluded via `.markdownlintignore` and `.markdownlint-cli2.yaml` (keep the two lists identical).
- The exclusion set includes every `CLAUDE.md` and `AGENTS.md`, `.github/copilot-instructions.md`, `.github/instructions/**`, `.github/prompts/**` and `.agents/skills/**`.
Comment on lines +9 to +10
- Put human-facing markdown style enforcement in the lint config, not in these files.
15 changes: 9 additions & 6 deletions .github/instructions/pr-review-bots.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ applyTo: "src/**, bin/**, scripts/**, .github/**, *.md, tasks/**, briefings/**"

This is the rationale doc. For the runnable step-by-step procedure (list unresolved
threads, resolve them, re-check after a push), use the `pr-review-gate` skill
(`.github/skills/pr-review-gate/SKILL.md`) instead of re-deriving the `gh` commands here.
(`.agents/skills/pr-review-gate/SKILL.md`) instead of re-deriving the `gh` commands here.

When a rosetta PR is marked **Ready for Review** (not while it is a draft), **two**
bots review it: `copilot-pull-request-reviewer` and `coderabbitai`. They surface
Expand All @@ -16,7 +16,7 @@ one signal will mis-read the state of the PR.
- **CodeRabbit is a status check, not a findings gate.** Its check turns **green when
its review run finishes** — green means "CodeRabbit is done looking," **not** "your
findings are addressed." Do not read a green CodeRabbit check as permission to merge.
It re-reviews on demand via an `@coderabbitai review` PR comment.
It re-reviews on demand via an `@coderabbitai review` PR comment: the maintainer's call, never an agent's.
- **Copilot is a requested reviewer.** Its review lands as state **`COMMENTED`**, never
`CHANGES_REQUESTED`. So `gh pr view N --json reviewDecision` will **not** show it as
blocking or pending the way a human "changes requested" review would — the findings
Expand Down Expand Up @@ -70,10 +70,13 @@ a one-shot you do once and forget. Two behaviors trip agents up:
auto-resolves a subset when the anchored lines move), so the unresolved count will
often be **smaller than the comment count** — reconcile against the GraphQL
`isResolved==false` list above, never against `pulls/N/comments`.
- **Your fix push triggers a fresh bot pass that can open *new* threads.** CodeRabbit
re-reviews on push (Copilot may too), so re-run the unresolved-threads query **after**
the re-review settles, not the moment you push. Reply-then-resolve each new thread; only
when that list is empty *and* the re-review check is green is the conversation gate clear.
- **A fix push does not start a new bot pass, and you must not ask for one.** CodeRabbit
reviews once on ready (`auto_incremental_review: false` in `.coderabbit.yaml`), per the
house PR flow (<https://tikoci.dev/house/skills/tikoci-pr-flow/SKILL.md>); an agent never
comments `@coderabbitai review` or re-requests Copilot. If new threads do appear (the
maintainer asked for a re-review), reply-then-resolve them too. The conversation gate is
clear when the unresolved list is empty and `copilot-gate.yml` is green (it fails while
Copilot is still a pending reviewer).

Reply to a bot thread with the fixing commit SHA before resolving it — it leaves an audit
trail of *why* it was closed, and mirrors the flow used across recent rosetta PRs.
2 changes: 1 addition & 1 deletion .github/instructions/tasks-vs-briefings.instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: "Pointer for the work-tracking split: GitHub issues are commitments, briefings are research, backlog is the loose/thinking-first layer, tasks/ is a frozen archive."
applyTo: "tasks/**, briefings/**, BACKLOG.md, VALIDATION.md, CLAUDE.md"
applyTo: "tasks/**, briefings/**, BACKLOG.md, VALIDATION.md, AGENTS.md"
---
# Issues vs briefings (tasks/ is archived)

Expand Down
2 changes: 1 addition & 1 deletion .github/instructions/tui-mcp-parity.instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: "MCP and browse are paired surfaces. Every MCP tool must remain reachable from the TUI, and dot-commands are the raw parity contract."
applyTo: "src/mcp.ts, src/browse.ts, src/query.ts, src/browse-parity.test.ts, src/mcp-contract.test.ts, README.md, CLAUDE.md"
applyTo: "src/mcp.ts, src/browse.ts, src/query.ts, src/browse-parity.test.ts, src/mcp-contract.test.ts, README.md, AGENTS.md"
---
# TUI/MCP parity

Expand Down
10 changes: 6 additions & 4 deletions .github/instructions/where-does-this-go.instructions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: "Canonical routing rule for where information belongs: GitHub issue, briefing, backlog, DESIGN, MANUAL, CHANGELOG, VALIDATION, or CLAUDE."
description: "Canonical routing rule for where information belongs: GitHub issue, briefing, backlog, DESIGN, MANUAL, CHANGELOG, VALIDATION, or AGENTS."
applyTo: "*.md, .github/instructions/**"
---
# Where does this go?
Expand All @@ -12,9 +12,11 @@ Use one canonical home for each kind of information:
- **Waiting on a specific external event** → `BACKLOG.md` Triggers
- **Durable rationale or architecture tradeoff** → `DESIGN.md`
- **Operator, install, release, or re-extraction procedure** → `MANUAL.md`
- **Project orientation and routing map** → `CLAUDE.md`
- **Project orientation, routing map, house adoption and exceptions** → `AGENTS.md`
- **User-visible shipped behavior** → `CHANGELOG.md`
- **Load-bearing invariant and proof** → `VALIDATION.md`
- **Agent-specific entrypoint shim** → `AGENTS.md` or `.github/copilot-instructions.md`, pointing back to `CLAUDE.md`
- **Agent-specific entrypoint shim** → `CLAUDE.md` (only `@AGENTS.md`) or `.github/copilot-instructions.md` (a pointer to `AGENTS.md`)
- **A repeatable agent workflow** → `.agents/skills/<name>/SKILL.md` (never a new `.github/instructions` file)
- **Temporary work** (repro scripts, logs, drafts) → gitignored `.scratch/`; move anything worth keeping to its proper home

Other files should point at the canonical home, not restate it.
Other files should point at the canonical home, not restate it. The house version of this rule is <https://tikoci.dev/house/skills/tikoci-docs/SKILL.md>; rosetta's extra homes (MANUAL, VALIDATION, briefings) are listed as exceptions in `AGENTS.md`.
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,19 @@ ros-help.db.gz
cliref-archive/

# Skills cache (fetched from GitHub API — not committed like transcripts/dude).
# Anchored to root so .github/skills/ (Claude Code skills) is NOT ignored.
# Anchored to root so .agents/skills/ (repo skills) is NOT ignored.
/skills/

# Claude Code local settings (settings.local.json, scheduled_tasks.lock) —
# but .claude/skills/ is committed: symlinks into .github/skills/ so Claude
# Code can see this repo's skills, same as Copilot does.
# but .claude/skills (a symlink to ../.agents/skills, so Claude Code sees the
# repo skills) and the shared .claude/settings.json (SessionStart db-doctor
# hook) are committed.
.claude/*
!.claude/skills/
!.claude/skills
!.claude/settings.json

# Temporary agent/human work (tikoci-house): repro scripts, logs, drafts.
.scratch/
.mcp.json

# Coverage output should not be .git; CI saves as artifact
Expand Down
12 changes: 6 additions & 6 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ gitignore: true

ignores:
# LLM instruction files (mirror .markdownlintignore)
- "CLAUDE.md"
- "AGENTS.md"
- "**/CLAUDE.md"
- "**/AGENTS.md"
- ".github/copilot-instructions.md"
- ".github/instructions/**"
# Repo-local Copilot prompt/skill workflows — also agent-facing, not rendered docs
# Copilot prompts and repo skills — also agent-facing, not rendered docs
- ".github/prompts/**"
- ".github/skills/**"
# Repo-local symlinks to prompt/skill for Claude Code
- ".agents/skills/**"
# Claude Code symlink to .agents/skills
- ".claude/prompts/**"
- ".claude/skills/**"
# Test fixtures — intentionally malformed Markdown that exercises the parser
- "fixtures/**"
# Frozen archive of the pre-2026-07 task queue (CLAUDE.md) — grep-able history,
# Frozen archive of the pre-2026-07 task queue (AGENTS.md) — grep-able history,
# not rendered docs; each T-*.md is frontmatter-then-body markdownlint reads as
# multiple H1s. Not worth reflowing dead files.
- "tasks/**"
Expand Down
8 changes: 5 additions & 3 deletions .markdownlintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@

# LLM instruction files (agent-facing, intentionally use patterns linters flag) —
# see .github/instructions/llm-instruction-files-excluded-from-mdlint.instructions.md
CLAUDE.md
AGENTS.md
**/CLAUDE.md
**/AGENTS.md
.github/copilot-instructions.md
.github/instructions/**
.github/prompts/**
.github/skills/**
.agents/skills/**
.claude/prompts/**
.claude/skills/**

# Test fixtures — intentionally malformed Markdown that exercises the parser
fixtures/**
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
},
"biome.lsp.bin": "node_modules/@biomejs/biome/bin/biome",
"markdown.validate.ignoredLinks": [
"../CLAUDE.md",
"../DESIGN.md",
"../BACKLOG.md"
],
Expand Down
Loading
Loading