Nav Plan logo

Nav Plan

Organization
navikt
nav-plan

Arkitekturplanlegging med beslutningstrær for auth, kommunikasjon, database og Nais-konfigurasjon

Overview

Publishernavikt
Repositorycopilot
Skill namenav-plan
Stars
60
Forks
16
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by navikt on GitHub. Read the source before you install it.

Installation

Install the Nav Plan AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/navikt/copilot/tree/main/skills/nav-plan
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/navikt/copilot.git /tmp/copilot
mkdir -p .claude/skills
cp -r /tmp/copilot/skills/nav-plan .claude/skills/nav-plan
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Nav Plan in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Nav Plan on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Nav Plan is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Nav Architecture Plan

Gå fra en vag idé til en konkret, Nav-kompatibel arkitekturplan. Bruker beslutningstrær for å velge riktig auth, kommunikasjon, database og Nais-oppsett.

Workflow

  1. Velg arketype — hva slags ting bygges
  2. Gå gjennom beslutningstrær — auth, kommunikasjon, data, observerbarhet
  3. Velg teststrategi — riktig testnivå per komponent og endringstype
  4. Generer plan — Nais-manifest, prosjektstruktur, CI/CD
  5. Generer leveransedokumenter — endringsdokument, utrullingsplan, runbook
  6. Review — verifiser at valgene henger sammen

Steg 1: Arketype

ArketypeStackNais-type
Backend APIKotlin/Ktor eller Spring BootApplication
HendelsekonsumentKotlin + Kafka + Rapids & RiversApplication
Frontend (innbygger)Next.js + ID-porten + WonderwallApplication
Frontend (saksbehandler)Next.js + Entra ID + WonderwallApplication
BatchjobbKotlin + scheduledNaisjob
BFF (Backend-for-Frontend)Next.js API routesApplication

Endringstype

I tillegg til arketype, avklar om dette er nytt eller en endring:

EndringstypeEkstra beslutninger
NybyggStandard beslutningstrær (auth, data, kommunikasjon)
ModerniseringMigreringsstrategi, bakoverkompatibilitet, utrulling, dekommisjonering
RefaktoreringKarakteriseringstester, rollback-plan, parallellkjøring

For modernisering og refaktorering — se modernization-patterns.md for konkrete mønstre og decision-trees.md for migreringsbeslutningstrær.

Steg 2: Beslutningstrær

Se decision-trees.md for alle beslutningstrær.

Autentisering

Hvem kaller tjenesten?
├── Innbygger via nettleser
│   └── ID-porten + Wonderwall
│       idporten.enabled: true
│       Nais-sidecar: Wonderwall
│       Node.js: @navikt/oasis
│       JVM: token-support
│
├── Saksbehandler via nettleser
│   └── Entra ID + Wonderwall
│       azure.application.enabled: true
│       Nais-sidecar: Wonderwall
│       Node.js: @navikt/oasis
│       JVM: token-support
│
├── Annen Nav-tjeneste (med brukerkontext)
│   └── TokenX (token exchange)
│       tokenx.enabled: true
│       Kaller: exchangeToken(subjectToken, targetAudience)
│       Mottaker: valider TokenX-token
│
├── Annen Nav-tjeneste (uten brukerkontext / batch)
│   └── Entra ID client_credentials
│       azure.application.enabled: true
│       Kaller: getClientCredentialsToken(scope)
│       ⚠️ Kun når brukerkontext ikke er tilgjengelig!
│
└── Ekstern partner
    └── Maskinporten
        maskinporten.enabled: true
        Definerer scopes for ekstern tilgang

Kommunikasjon

Hva slags kommunikasjon?
├── Synkron (kaller og venter på svar)
│   ├── REST API (standard)
│   │   Kotlin: Ktor routing eller Spring @RestController
│   │   OpenAPI: Swagger/SpringDoc
│   │
│   └── GraphQL (komplekse, fleksible queries)
│       Sjelden brukt i Nav, foretrekk REST
│
├── Asynkron (fire-and-forget, hendelsedrevet)
│   ├── Kafka (standard for Nav)
│   │   Topic: {team}.{domene}.v1
│   │   Dev: 1 partisjon, Prod: 6+
│   │   Rapids & Rivers for hendelseskoreografi
│   │
│   └── Pub/Sub (GCP-native, sjelden)
│       Bare hvis Kafka ikke passer
│
└── Sanntid (push til klient)
    └── Server-Sent Events
        Ktor: respondSse {}
        Next.js: ReadableStream

Database

Trenger du persistent lagring?
├── Ja, relasjonell data
│   └── PostgreSQL via Nais (Cloud SQL)
│       gcp.sqlInstances[].type: POSTGRES_18
│       Flyway for migrasjoner
│       HikariCP pool: 3-5 (containere!)
│       
│       Primærnøkkel?
│       ├── Domene-ID (fnr, saksnummer) → VARCHAR
│       └── Systemgenerert → BIGSERIAL eller UUID
│
├── Ja, analytisk / read-heavy
│   └── BigQuery
│       Separat Nais-konfigurasjon
│       Bruk @google-cloud/bigquery
│
├── Ja, cache / sesjon
│   └── Redis via Nais
│       gcp.redis[].tier: BASIC
│       
└── Nei
    └── Stateless tjeneste (bra! enklere drift)

Steg 3: Generer plan

Basert på beslutningene, generer disse artefaktene:

Nais-manifest

Se nais-templates.md for komplette maler per arketype.

yaml
# Generert manifest basert på beslutningstrær
apiVersion: nais.io/v1alpha1
kind: Application
metadata:
  name: {app-name}
  namespace: {team}
  labels:
    team: {team}
spec:
  image: "{{ image }}"
  port: 8080
  
  # Auth — fra beslutningstre
  # [genereres basert på valgt mekanisme]
  
  # Database — fra beslutningstre  
  # [genereres hvis PostgreSQL valgt]
  
  # Kafka — fra beslutningstre
  # [genereres hvis Kafka valgt]
  
  # Alltid inkluder:
  liveness:
    path: /isalive
  readiness:
    path: /isready
  prometheus:
    enabled: true
    path: /metrics
  resources:
    requests:
      cpu: 15m
      memory: 256Mi
    limits:
      memory: 512Mi
  replicas:
    min: 2
    max: 4
  
  # accessPolicy — ALLTID eksplisitt
  accessPolicy:
    inbound:
      rules: []  # Fyll inn basert på hvem som kaller
    outbound:
      rules: []  # Fyll inn basert på avhengigheter

Prosjektstruktur

Kotlin/Ktor:

{app-name}/
├── .nais/
│   ├── nais.yaml
│   └── nais-dev.yaml
├── .github/workflows/
│   └── build-deploy.yml
├── src/main/kotlin/no/nav/{team}/{app}/
│   ├── Application.kt
│   ├── Config.kt          # Sealed class config
│   ├── api/
│   │   └── Routes.kt
│   ├── db/
│   │   └── Repository.kt  # Kotliquery
│   └── kafka/
│       └── Consumer.kt    # Rapids & Rivers
├── src/main/resources/
│   └── db/migration/
│       └── V1__initial_schema.sql
├── src/test/kotlin/
├── build.gradle.kts
└── Dockerfile

Next.js:

{app-name}/
├── .nais/
│   ├── nais.yaml
│   └── nais-dev.yaml
├── .github/workflows/
│   └── build-deploy.yml
├── src/
│   ├── app/
│   │   ├── layout.tsx
│   │   ├── page.tsx
│   │   └── api/          # BFF proxy routes
│   ├── components/
│   └── lib/
│       ├── auth.ts       # @navikt/oasis
│       └── api-client.ts
├── next.config.ts
├── package.json
└── Dockerfile

CI/CD-workflow

yaml
name: Build and deploy
on:
  push:
    branches: [main]

permissions:
  contents: read
  id-token: write

jobs:
  build:
    runs-on: ubuntu-latest
    outputs:
      image: ${{ steps.docker-build-push.outputs.image }}
    steps:
      - uses: actions/checkout@v4
      - uses: nais/docker-build-push@v0
        id: docker-build-push
        with:
          team: {team}
          identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
          project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}

  deploy-dev:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: nais/deploy/actions/deploy@v2
        env:
          CLUSTER: dev-gcp
          RESOURCE: .nais/nais-dev.yaml
          VAR: image=${{ needs.build.outputs.image }}

  deploy-prod:
    needs: [build, deploy-dev]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: nais/deploy/actions/deploy@v2
        env:
          CLUSTER: prod-gcp
          RESOURCE: .nais/nais.yaml
          VAR: image=${{ needs.build.outputs.image }}

Steg 3b: Teststrategi

Velg riktig testnivå basert på arketype og endringstype. Se Teststrategi-beslutningstre for detaljerte trær.

Minimum for alle arketyper:

ArketypeUnitIntegrasjonE2E
Backend APIForretningslogikkDB + auth—
HendelsekonsumentMeldingsbehandlingTestRapid—
FrontendKomponenter—Kritiske reiser
BFFTransformasjonerAuth-proxy—
BatchjobbBeregningerDB—

Tillegg for modernisering:

  • Karakteriseringstester før du endrer kode
  • Migreringsverifisering (gammel kode + nytt skjema og omvendt)
  • Regresjonstester for grenseflater mellom ny og gammel kode

Se Endringskonsekvensanalyse-tre for kartlegging av påvirkning.

Steg 3c: Leveransedokumenter

Generer relevante dokumenter basert på endringstype og risiko. Se dokumentasjon og leveransemaler for fullstendige maler.

DokumentNårFormål
EndringsdokumentAlltid for ikke-trivielle endringerBeslutning, påvirkning, utrulling, rollback
Runbook-oppdateringNy tjeneste eller endret driftsadferdFeilsøking, eskalering, helsesjekk
API-endringsdokumentBreaking changes eller nye API-erMigrasjonsveiledning for konsumenter
ObserverbarhetAlle endringer i produksjonsadferdSuksesskriterier, dashboards, alarmer

Minimum output for enhver plan:

  1. Endringsdokument med rollback-plan
  2. Post-deploy-verifiseringssjekkliste
  3. Observerbarhetsplan (hva måles, hva alarmeres)

Steg 4: Review-sjekkliste

Verifiser at valgene henger sammen:

  • Auth-mekanisme matcher caller-type (ikke Azure client_credentials med brukerkontext)
  • accessPolicy.inbound lister alle kallere
  • accessPolicy.outbound lister alle avhengigheter
  • Ressurser er riktige for forventet last
  • Health-endepunkter er implementert (/isalive, /isready, /metrics)
  • Database-pooling er tilpasset containere (3-5, ikke 10)
  • PII er identifisert og beskyttet (ikke logget, tilgangsstyrt)
  • Observerbarhet dekker forretningsmetrikker, ikke bare tekniske
  • CI/CD deployer til dev før prod

Ekstra for modernisering/refaktorering

  • Rollback-plan er definert og testet
  • Feature toggle er satt opp for gradvis utrulling
  • Bakoverkompatibilitet er verifisert (gammel kode + nytt skjema fungerer)
  • Karakteriseringstester låser nåværende adferd
  • Exit criteria er definert (når er migreringen ferdig?)
  • Berørte team/konsumenter er identifisert og informert
  • Dekommisjoneringsplan for gammel kode/infrastruktur

Testing og dokumentasjon

  • Teststrategi er definert per komponent/lag
  • Endringsdokument er generert med rollback-plan
  • Observerbarhetsplan definerer suksesskriterier og alarmer
  • Post-deploy-verifiseringssjekkliste er utfylt
  • API-endringsdokument er laget (hvis breaking changes)
  • Runbook er oppdatert (hvis ny tjeneste eller endret drift)

Boundaries

✅ Always

  • Gå gjennom alle beslutningstrær systematisk
  • Generer Nais-manifest med eksplisitt accessPolicy
  • Inkluder CI/CD-workflow i planen
  • Verifiser auth mot caller-type
  • Start med små ressurser (15m CPU, 256Mi memory)

⚠️ Ask First

  • Avvik fra standard arketyper
  • Introduksjon av ny teknologi (GraphQL, gRPC)
  • Komplekse multi-service arkitekturer

🚫 Never

  • Generer plan uten å ha avklart auth
  • Bruk default HikariCP pool-størrelse
  • Utelat accessPolicy fra Nais-manifest
  • Foreslå CPU-limits i Nais

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Nav Plan AI skill do?

Arkitekturplanlegging med beslutningstrær for auth, kommunikasjon, database og Nais-konfigurasjon

Why use Nav Plan on TypingMind?

Because you install it once and use it with any model. Nav Plan is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Nav Plan in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/navikt/copilot/tree/main/skills/nav-plan. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Nav Plan?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Nav Plan?

As many as you like. As long as a model supports skills, you can use Nav Plan with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Nav Plan AI skill free?

Yes. It is published on GitHub by navikt under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇