ms-ai-architect/docs/windows-clone-to-pr-ros-guide.md
Kjell Tore Guttormsen c4d434f9e9 test(ms-ai-architect): C2.4 lås K4 privat-sektor-paritet (regresjonsvakt) + omdøp feildøpt doc [skip-docs]
C2 KOMPLETT (C2.1->C2.4). C2.4 var verifikasjon, ikke nybygg: privat-greinen
i onboarding kom i 6e1fc6d (FOER C2.1), saa audit §167-onboarding-residu var
allerede lukket i kode. Denne oekta beviser + laaser det.

- tests/test-onboarding-parity.sh (NY): 14 asserts mot KILDEN
  (onboarding-agent.md Phase 1; onboarding er interaktivt AskUserQuestion ->
  ingen output-fixture). Dekker sektortype-forgrening, privat sektor-grein
  (bank slipper «Annet»), privat reg-sett (DORA/Finansforetaksloven/
  Finanstilsynets IKT-forskrift/Verdipapirhandelloven/Hvitvaskingsloven), og
  at private aldri spoerres Offentleglova/Arkivloven. TDD roed->groenn:
  strippet offentlig-only-kopi -> 13/14 FAIL; ekte fil -> 14/14 PASS.
- tests/run-e2e.sh: wiret --onboarding (med i --all).
- §167 (d) bevisst IKKE bygget: «egen dataklassifiserings-taksonomi for privat
  Fase 3» er gull-plating utenfor K4 (dagens taksonomi er alminnelig norsk
  bedrifts-klassifisering; privat fullfoerer Fase 3 uhindret).
- Omdoept feildoept docs/onboarding-ros-analysis.md ->
  docs/windows-clone-to-pr-ros-guide.md (Windows clone-to-PR-bidragsyterguide,
  ikke onboarding-analyse); plan+brief-ref oppdatert.

Verifisert: onboarding-parity 14/14 (NY) · validate 239/0/0 · e2e alle suiter ·
discovery 13/13 · test-hooks 11/11 · kb-integrity 192/192 (220 baseline-warns) ·
gitleaks 3 PRE-EKSISTERENDE (playground/vendor/).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 17:39:11 +02:00

5.4 KiB

From Clone to PR: Building ROS Analysis for ms-ai-architect

Step-by-step guide for Windows. Start at Step 1, end with a PR containing a complete ROS analysis feature.

Prerequisites

  • Node.js (LTS) — required for Claude Code and MCP servers
  • Git for Windows — includes Git Bash (needed for test scripts)
  • Claude Codenpm install -g @anthropic-ai/claude-code

Step 1: Clone and Register

Open PowerShell:

# Create the marketplace directory
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.claude\plugins\marketplaces"

# Clone
git clone https://git.fromaitochitta.com/open/ktg-plugin-marketplace.git "$env:USERPROFILE\.claude\plugins\marketplaces\ktg-plugin-marketplace"

Edit %USERPROFILE%\.claude\settings.json (create if it doesn't exist):

{
  "enabledPlugins": {
    "ms-ai-architect@ktg-plugin-marketplace": true
  },
  "mcpServers": {
    "microsoft-learn": {
      "command": "npx",
      "args": ["-y", "@nicobailey/microsoft-learn-mcp-server"]
    }
  }
}

Tip: Open the file with notepad $env:USERPROFILE\.claude\settings.json

Step 2: Verify

cd "$env:USERPROFILE\.claude\plugins\marketplaces\ktg-plugin-marketplace"
claude

You should see:

Architect: Ingen virksomhetstilpasning. Kjor /architect:onboard (~5 min).

Type /architect:help — if you see a list of commands, the plugin works.

Step 3: Create a Branch

git checkout -b feat/ros-analysis

Step 4: Read the Pattern Files

Before writing anything, ask Claude to read these files. They are the patterns your ROS implementation must follow:

Read these files:
- plugins/ms-ai-architect/commands/dpia.md
- plugins/ms-ai-architect/agents/dpia-agent.md
- plugins/ms-ai-architect/agents/security-assessment-agent.md
- plugins/ms-ai-architect/skills/ms-ai-security/references/ai-security-engineering/security-scoring-rubrics-6x5.md
- plugins/ms-ai-architect/CLAUDE.md

Key patterns to understand:

  • Command (dpia.md): collects context via dialog, then delegates to agent via Task
  • Agent (dpia-agent.md): phased methodology, KB-routing to reference files, structured output
  • Scoring (security-scoring-rubrics-6x5.md): deterministic rubrics with checkpoints per cell

Step 5: Plan the Implementation

This is the critical step. Type plan first, then your prompt:

plan Build a professional ROS analysis feature for the ms-ai-architect
plugin. It needs: a /architect:ros command, a ros-analysis-agent,
knowledge base files (threat library, scoring rubrics, sector checklists,
methodology guide, report templates, integration guide), E2E tests,
and updates to CLAUDE.md + help.md + SKILL.md.

Follow the patterns in dpia.md, dpia-agent.md, and
security-scoring-rubrics-6x5.md exactly.

Claude will explore the codebase and produce a detailed plan listing every file to create/modify. Review the plan carefully. The plan should include roughly:

  • ~10 new files: command, agent, 6 knowledge base references, test script, test fixture
  • ~5 modified files: CLAUDE.md, help.md, SKILL.md, summary-agent.md, run-e2e.sh

When satisfied, approve the plan. Claude implements exactly what was approved — nothing more.

Step 6: Verify

After implementation, run validation in Git Bash (not PowerShell — the test scripts are bash):

# Open Git Bash from Start menu, then:
cd ~/.claude/plugins/marketplaces/ktg-plugin-marketplace

# Plugin structure validation
bash plugins/ms-ai-architect/tests/validate-plugin.sh

# E2E tests (no Claude invocation needed)
bash plugins/ms-ai-architect/tests/run-e2e.sh --ros

Note: Alternatively, ask Claude to run the tests for you — Claude's built-in Bash tool handles this on Windows.

Fix any failures before proceeding.

Step 7: Commit and PR

Ask Claude:

Commit all changes and create a PR to main

Commit message convention: feat(architect): add ROS analysis command and agent

CLAUDE.md must be updated in the same commit as the new functionality.

What the Final PR Should Contain

Type Files Description
Command commands/ros.md /architect:ros with quick and full mode
Agent agents/ros-analysis-agent.md Multi-phase ROS with scoring rubrics
KB: Threats references/.../ros-ai-threat-library.md ~45 AI-specific threats
KB: Scoring references/.../ros-scoring-rubrics-7x5.md Deterministic rubrics (7 dimensions x 5 levels)
KB: Sectors references/.../ros-sector-checklists.md Health, transport, finance, justice, education
KB: Methodology references/.../ros-methodology-ns5814-iso31000.md NS 5814 / ISO 31000 process mapping
KB: Templates references/.../ros-report-templates.md Quick and full report templates
KB: Integration references/.../ros-dpia-security-integration.md When to use ROS vs DPIA vs Security
Tests tests/test-ros-output.sh + tests/fixtures/ros-analysis/ E2E structure validation
Docs CLAUDE.md, help.md, SKILL.md, summary-agent.md, run-e2e.sh Updated tables and references

Quick Reference

Action How
See all commands Type / and scroll
Plan mode Type plan before your prompt
Auto-accept tool calls Shift+Tab
Cancel Esc
New conversation /clear
Context usage /cost