agentleFS
wesleysimpliciowesleysimplicio/x-bookmarks-panel/.github/copilot-instructions.md

x-bookmarks-panel

Copilot instructions2 starsChanged 7 months agoMITView on GitHub

Instruction file lido automaticamente pelo GitHub Copilot Chat e Copilot Workspace / Agent Mode. Espelha AGENTS.md com foco em Agent Mode workflow. Ao trabalhar em Agent Mode, o Copilot pode delegar pra custom agents em .github/copilot/*.agent.md. Lista atual: tdd.agent.md, reviewer.agent.md, architect.agent.md. Painel local single-user pra triagem de bookmarks de x.com. Bind em 127.0.0.1. macOS only por hoje. Antes de adicionar dependência nova: pergunta ao humano. Sem exceção. Sem npm, sem npx, sem dotnet. É Python + shell + SQLite. Em…

  • Reads credentials
  • Commits and pushes

The file

We split this copilot-instructions.md into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test runner: TODO — sem suíte hoje (BACKLOG #3)

    line 19
  2. Very specific:

    Before coding, read this file, PRD.md, PROGRESS.md when it exists, README.md, project manifests, tests, and the relevant source folders.

    line 213
  3. Very specific:

    Stop only when the requested work is complete, validation is documented, and GOAL_RESULT.md reflects the outcome.

    line 215
  4. Distinctive:

    Do not rewrite unrelated architecture, fake successful validation, expose secrets, or push without explicit operator instruction for the …

    line 216

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Copilot Instructions

Instruction file lido automaticamente pelo GitHub Copilot Chat e Copilot Workspace / Agent Mode. Espelha AGENTS.md com foco em Agent Mode workflow.

Ao trabalhar em Agent Mode, o Copilot pode delegar pra custom agents em .github/copilot/*.agent.md. Lista atual: tdd.agent.md, reviewer.agent.md, architect.agent.md.


Stack

Painel local single-user pra triagem de bookmarks de x.com. Bind em 127.0.0.1. macOS only por hoje.

  • Linguagem principal: Python 3.11+
  • Framework web/API: Flask 3.0+ (única dep, server/requirements.txt)
  • Banco de dados: SQLite via sqlite3 stdlib, arquivo data/bookmarks.db
  • Frontend: vanilla JS em index.html (sem build, sem bundler)
  • Runtime always-on: launchd (panel + watchdog) em scripts/launchd/*.plist.template
  • Integrações macOS: pbcopy, osascript/Terminal.app, open -a, git, gh
  • Test runner: TODO — sem suíte hoje (BACKLOG #3)
  • Linter/formatter: TODO — sem config hoje
  • CI/CD: TODO — .github/workflows/ ainda sem pipeline (BACKLOG #2)
  • Deploy: não aplicável — local-first via ./setup.sh + ./install-launchd.sh

Antes de adicionar dependência nova: pergunta ao humano. Sem exceção.


Comandos importantes

# setup (idempotente)
./setup.sh                                # venv + Flask + .env
./install-launchd.sh                      # registra panel + watchdog

# desenvolvimento
./start.sh                                # foreground em :8765
python server/app.py                      # alternativa direta
./stop.sh                                 # mata + descarrega launchd

# inspecionar dados
sqlite3 data/bookmarks.db ".tables"
sqlite3 data/bookmarks.db "SELECT id, link, status FROM oportunidades LIMIT 10;"

# logs (captura via launchd)
tail -f data/panel.out.log
tail -f data/panel.err.log
tail -f data/healthcheck.log

# always-on
launchctl list | grep com.bookmarks
./healthcheck.sh

# smoke
curl -s http://localhost:8765/api/healthz
curl -s http://localhost:8765/api/oportunidades | jq '.[] | {id, status, prioridade}'

# git/PR
git checkout -b feat/<slug>
gh pr create --fill
gh run watch

Sem npm, sem npx, sem dotnet. É Python + shell + SQLite.


Workflow loop OBRIGATÓRIO (Agent Mode)

Em Copilot Workspace/Agent Mode, todo plano de execução segue esse loop. Não pula etapa.

  1. Ler task — abre .specs/sprints/sprint-XX/<task-id>.task.md. Lê contexto + acceptance criteria + test plan + DoD.
  2. Plano explícito — Copilot Workspace gera spec/plan. Revisa antes de implementar.
  3. Carregar contexto — .specs/architecture/PATTERNS.md + ADRs relevantes em .specs/architecture/ADR-*.md. Skills aplicáveis em .skills/.
  4. Implementar (Agent Mode) — edits cirúrgicos. Só toca o que a task pede. Sem refactor extra.
  5. Lint — npm run lint. Vermelho = corrige.
  6. Unit — npm test. Vermelho = corrige. Coverage do diff >= 80%.
  7. E2E — npx playwright test. Captura screenshot/trace/video.
  8. Fix loop — falhou? Volta ao 4. Repete até verde.
  9. Commit — Conventional Commits (feat:, fix:, chore:, docs:). Mensagem em inglês.
  10. PR — gh pr create --fill. Preenche template inteiro.

Definition of Done

PR só faz merge quando todos os itens abaixo estão marcados:

  • Unit tests passam
  • Lint passa
  • E2E Playwright passa com evidência anexada (screenshot, trace, video)
  • Coverage do diff >= 80%
  • Acceptance Criteria todos marcados
  • PR template preenchido (link task + descrição + evidências)
  • Conventional commit no merge
  • ADR criado se mudou decisão arquitetural
  • Changelog atualizado se release-relevant
  • Sem warning novo, sem console.log/print deixado pra trás
  • Sem TODO sem dono e sem prazo

CI bloqueia merge se DoD falhar (.github/workflows/dod.yml).


Padrões de código

.specs/architecture/PATTERNS.md é a fonte única. Naming, estrutura, criação de endpoint/componente/teste, tratamento de erro, logging, validação — tudo lá.

Decisões irreversíveis viram ADR em .specs/architecture/ADR-XXX-*.md (template em .specs/architecture/ADR-template.md).


Onde encontrar contexto

PerguntaOnde olha
Por que esse produto existe?.specs/product/VISION.md
Quem é o usuário?.specs/product/PERSONAS.md
Quais entidades de negócio?.specs/product/DOMAIN.md
Como o sistema é desenhado?.specs/architecture/DESIGN.md
Como escrever código aqui?.specs/architecture/PATTERNS.md
Por que decidimos X?.specs/architecture/ADR-*.md
Como faço PR/branch/release?.specs/workflow/WORKFLOW.md, RELEASE.md, CONTRIBUTING.md
Backlog?.specs/sprints/BACKLOG.md
Sprint atual?.specs/sprints/sprint-XX/SPRINT.md
Skills?.skills/README.md + .skills/*/SKILL.md

Proibido

  • Pular testes — sem unit/E2E = sem merge.
  • Mockar pra fazer passar — mock só pra dep externa real (HTTP, DB), nunca pra esconder falha.
  • Commit com vermelho — lint/test falhando = não commita.
  • Ignorar ADR — decisão registrada é lei.
  • Adicionar dependência sem perguntar.
  • Editar arquivo não lido.
  • Refactor escondido em PR de feature — PR separado.
  • Force push em main/master.
  • Commitar segredo (.env, token, key, senha).
  • Reformatar arquivo inteiro num PR pequeno.

Custom agents (Copilot Workspace / Agent Mode)

Copilot pode delegar pra um custom agent quando a tarefa casa com a description do agent. Definidos em .github/copilot/:

  • tdd.agent.md — TDD Specialist. Escreve teste falhando antes do código. Loop red-green-refactor. Tools: edit, terminal, search. Aciona quando tarefa exige cobertura nova ou regression test.
  • reviewer.agent.md — Code Reviewer. Read-only. Comenta problemas e sugestões em PR. Tools: search, read. Aciona em revisão de PR aberto, sem editar arquivos.
  • architect.agent.md — Architect. Desenha arquitetura, cria ADRs, atualiza PATTERNS.md. Não escreve código de produção. Tools: edit, search, read. Aciona em decisão arquitetural, refactor amplo, integração nova.

Pra invocar explicitamente em Copilot Chat: @tdd, @reviewer, @architect.


Skills disponíveis (.skills/)

  • playwright-e2e — como escrever teste Playwright. Trigger: nova feature de UI / fluxo end-to-end.
  • conventional-commits — regras de commit (feat:, fix:, etc.). Trigger: hora de commitar.
  • _template — base pra criar skill nova.

Detalhes em .skills/README.md.


Comandos especiais

Criar nova ADR

cp .specs/architecture/ADR-template.md .specs/architecture/ADR-XXX-<slug>.md
# preenche e commita junto com a feature

Abrir PR

git push -u origin $(git branch --show-current)
gh pr create --fill

Criar task

cp .specs/sprints/task-template.md .specs/sprints/sprint-XX/<id>-<slug>.task.md

DoD local antes de push

npm run lint && npm test -- --coverage && npx playwright test

Notas finais

  • Idioma: docs em pt-BR, código em inglês, commits em inglês.
  • Sem emoji em código fonte. README/slides ok.
  • Sem resumo no final de resposta.
  • Sem estimativa de tempo.
  • Pergunta apenas em ambiguidade real.
  • Paralelismo — research + read + review independentes rodam simultâneos em Agent Mode.
<!-- codex-long-running-agent-overlay:start -->

Universal Long-Running Agent Overlay

This section complements the repository-specific guidance already in this file. If anything here conflicts with the repo-specific rules above, the repo-specific rules win.

  • PRD.md is the task source of truth for long-running sessions.
  • PROGRESS.md is the persistent checkpoint log.
  • GOAL_RESULT.md is the final execution report.
  • Before coding, read this file, PRD.md, PROGRESS.md when it exists, README.md, project manifests, tests, and the relevant source folders.
  • Work in small checkpoints, run the smallest relevant validation after each meaningful change, update PROGRESS.md, and continue until complete or genuinely blocked.
  • Stop only when the requested work is complete, validation is documented, and GOAL_RESULT.md reflects the outcome.
  • Do not rewrite unrelated architecture, fake successful validation, expose secrets, or push without explicit operator instruction for the active session.
<!-- codex-long-running-agent-overlay:end -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.