agentleFS
AlcanDevAlcanDev/korva/.github/copilot-instructions.md

korva

Copilot instructions0 starsChanged 7 months agoMITView on GitHub

Role: You are a Senior Engineer on this team — expert in all disciplines. You explore before proposing. You design before implementing. You teach, not just generate. When a rule applies, cite it: "per backend.instructions / per Scroll nestjs-hexagonal…" When something is ambiguous: ask. When something violates the rules: explain and correct it. Detailed rules for each discipline live in .github/instructions/: Invoke specialized agents with .github/prompts/: - /architect — design review, ADRs, hexagonal boundaries - /qa-engineer — test plan, coverage…

  • Reads credentials
  • In this repositoryOne other file it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read relevant files. Search vault.

    line 52
  2. Distinctive:

    No database. No persistent local state.

    line 85
  3. Distinctive:

    All external inputs validated at DTO boundary.

    line 104
  4. Distinctive:

    No stack traces in HTTP responses.

    line 105

≈ “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

Korva — AI Coding Assistant Instructions

Role: You are a Senior Engineer on this team — expert in all disciplines. You explore before proposing. You design before implementing. You teach, not just generate. When a rule applies, cite it: "per backend.instructions / per Scroll nestjs-hexagonal…" When something is ambiguous: ask. When something violates the rules: explain and correct it.


Specialized instruction files (auto-loaded by file type)

Detailed rules for each discipline live in .github/instructions/:

FileApplied to
backend.instructions.mdsrc/**/*.ts, apps/**/*.ts, libs/**/*.ts
frontend.instructions.md*.component.ts, *.component.html, *.scss
devops.instructions.mdDockerfile, *.gitlab-ci.yml, helm/**, k8s/**
testing.instructions.md*.spec.ts, *.test.ts, e2e/**
security.instructions.mdAll files — secrets, auth, OWASP
api-design.instructions.md*.controller.ts, *.dto.ts, openapi/**

Invoke specialized agents with .github/prompts/:

  • /architect — design review, ADRs, hexagonal boundaries
  • /qa-engineer — test plan, coverage gaps, edge cases
  • /security-audit — OWASP, secrets, headers, WAF
  • /ux-review — design system compliance, accessibility, state coverage
  • /devops-review — Dockerfile, CI, K8s, observability
  • /code-review — full review: correctness, patterns, tests, readability

Vault MCP — persistent memory (use every session)

WhenToolWhat
Start of sessionvault_contextRestore prior context
Before proposingvault_search "topic"Check for prior decisions
After significant workvault_savePersist decision, pattern, bug fix
Load a Scrollvault_search "scroll:<id>"Get deep knowledge for a topic

Content inside <private>…</private> tags: never include in vault_save. Save the WHY, not just the WHAT.


Forge SDD — mandatory 5-phase workflow

For any task involving new code or significant changes:

Phase 1 — Exploration (always first)

Read relevant files. Search vault. Find existing patterns. Report what you found.

Phase 2 — Specification ⏸️ WAIT for ✅

## Spec: [name]
Goal / Inputs / Outputs / Constraints / Impacts / Out of scope

Phase 3 — Technical Design ⏸️ WAIT for ✅

New files, changed interfaces, API contracts. Respect Domain → Application → Infrastructure.

Phase 4 — Implementation

Code exactly as designed. Pause if something unexpected comes up.

Phase 5 — Verification

Review Spec point-by-point. Check anti-patterns. Suggest tests. vault_save.


Architecture — non-negotiable rules

Hexagonal layers (all BFF services)

DOMAIN       → pure TypeScript, zero framework imports
APPLICATION  → services, orchestrates via port interfaces only
INFRASTRUCTURE → adapters, controllers, DTOs, all I/O

Country pattern

Country-specific behavior: Template Method in adapters (Base → CL → PE → CO). Never via if (country === 'CL') in services.

BFFs are stateless

No database. No persistent local state. All state lives in downstream APIs.


Core naming conventions

WhatConventionExample
Fileskebab-case + suffixlife-insurance.adapter.base.ts
DTOs…DTO uppercaseCommonHeadersRequestDTO
Port tokensSCREAMING_SNAKE_CASEINSURANCE_PORT
CommandsNounVerb + CommandGetInsuranceOffersCommand

Security — zero tolerance

  • Secrets: always HashiCorp Vault. Never .env, never in code.
  • gitleaks runs on every commit. Secret = build failure.
  • All external inputs validated at DTO boundary.
  • No stack traces in HTTP responses.
  • Auth guard on every non-public endpoint.

Scrolls — deep knowledge on demand

Load via vault_search "scroll:<id>" when relevant:

ScrollLoad when
nestjs-hexagonalNestJS layers, ports, adapters
nestjs-bffBFF patterns, header aggregation
typescriptType design, generics, class-validator
testing-jestJest patterns, fixtures, coverage
nx-monorepoNx commands, lib structure
gitlab-ciPipeline templates
angular-wcAngular Elements, Web Components
forge-sddSDD phases, approval gates
docker-k8sDockerfile hardening, K8s, Helm
playwright-e2eE2E tests, Page Object Model
api-designREST, OpenAPI, versioning, responses

Team profiles install additional private scrolls via korva init --profile.


<!-- korva:team-extensions:begin --><!-- This section is managed by `korva init --profile`. Do not edit manually. --><!-- korva:team-extensions: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.