feat(ms-ai-architect): v1.12.0 manuell KB-refresh — fjern launchd/cron-arkitektur
ToS-vurdering konkluderte med at autonom cron-kjøring er unødvendig kompleks for en solo-fork-and-own-plugin. Apply-fasen krever LLM-resonnering uansett, så manuell trigger fra en aktiv Claude Code-sesjon er enklere og holder pluginen klart innenfor Anthropic Consumer Terms paragraf 3 (automated access only via API key or where explicitly permitted — Claude Code CLI er eksemptert som offisielt verktøy). Lagt til: - commands/kb-update.md — ny /architect:kb-update slash-kommando som driver poll, endringsrapport, microsoft_docs_fetch-update og commit fra sesjonen. Argumenter: --skip-discover, --priorities, --dry-run, --single-commit - Catalog-entry i playground HTML for kb-update (categori: tool, 4 input-felt) Slettet (Wave 3-5 reversert, ~1500 linjer + 7 testmoduler): - scripts/install-kb-cron.mjs (cross-OS scheduler-installer) - scripts/kb-update/weekly-kb-cron.mjs (cron-orkestrator med pre-flight, lock, backup, claude -p subprocess, post-run verify, rollback) - scripts/kb-update/templates/ (4 scheduler-templates: launchd plist, systemd service+timer, Windows ps1 + README) - scripts/kb-update/lib/auth-mode.mjs (cron-spesifikk auth validation) - scripts/kb-update/lib/lock-file.mjs (PID+mtime stale-detection) - scripts/kb-update/lib/cost-estimat.mjs (pre-flight budget-cap) - 7 testmoduler under tests/kb-update/ for slettet kode - tests/test-kb-update.sh (Bash-3.2-shim, erstattet av direkte node --test) Beholdt (utility-laget fortsatt brukbart): - run-weekly-update.mjs, report-changes.mjs, build-registry.mjs, discover-new-urls.mjs (KB change-detection-pipelinen) - lib/atomic-write, lib/backup, lib/cross-platform-paths, lib/log-rotate - 4 testmoduler (42/42 tester PASS) Endret: - hooks/scripts/session-start-context.mjs: fjern kb-update-status.json-overvaaking - tests/run-e2e.sh --kb-update kaller node --test direkte i stedet for shim - README.md, CLAUDE.md: KB-vedlikehold-seksjon rewriter for manuell modell - plugin.json: 1.11.0 -> 1.12.0 - Rot README + CLAUDE.md: ms-ai-architect-versjon bumpet Schedulering er bevisst utenfor scope og overlatt til brukeren — eventuelle forks som vil ha periodisk varsling kan sette opp egen cron / launchd / GitHub Actions som kjører rapport-fasen og varsler om aa kjore /architect:kb-update i CC-sesjon. Verifisering: - bash tests/validate-plugin.sh: 219 PASS, 0 FAIL - bash tests/run-e2e.sh --kb-update: 42/42 inner + suite PASS - bash tests/run-e2e.sh --playground: 271/271 PASS (statisk + parsers) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
97d1101e91
commit
a7a334c8d1
29 changed files with 238 additions and 2708 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
*AI-generated: all code produced by Claude Code through dialog-driven development. [Full disclosure →](../../README.md#ai-generated-code-disclosure)*
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
|
@ -231,7 +231,7 @@ Norwegian public sector governance (Digdir, DFØ), EU AI Act (Annex III checklis
|
|||
BCDR planning, hybrid and edge deployment, sovereign cloud (Norway regions), network architecture, monitoring and observability.
|
||||
|
||||
> [!NOTE]
|
||||
> All reference documents are generated and verified via the Microsoft Learn MCP server. A weekly cron job (`scripts/kb-update/weekly-kb-cron.mjs`) automatically polls Microsoft Learn sitemaps for changes, updates stale files via MCP research, and commits to the repository. Last full update: April 2026. Manual refresh: `/architect:generate-skills --update`.
|
||||
> All reference documents are generated and verified via the Microsoft Learn MCP server. KB-ferskhet er manuell — kjør `/architect:kb-update` i en Claude Code-sesjon for å polle Microsoft Learn-sitemaps, sammenligne mot lokale `Last updated:`-headere, oppdatere endrede filer, og committe. Last full update: April 2026.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -581,27 +581,41 @@ bash tests/capture-fixture.sh <source-file> <section-header> <output-dir>
|
|||
|
||||
### Knowledge Base Maintenance
|
||||
|
||||
The 387 reference documents are actively maintained by the plugin author. Updated reference files are published as regular commits to the marketplace repository. If you installed via `claude plugin marketplace add`, updates are pulled automatically — no manual action needed.
|
||||
The 387+ reference documents are actively maintained by the plugin author. Updated reference files are published as regular commits to the marketplace repository. If you installed via `claude plugin marketplace add`, updates are pulled automatically — no manual action needed.
|
||||
|
||||
The plugin includes a sitemap-based change detection system that tracks when Microsoft Learn source pages are updated, ensuring the author is always aware of which reference files need refreshing.
|
||||
For forks (or if you simply want to refresh the KB yourself), the plugin ships with a sitemap-based change-detection pipeline plus a slash command that drives the apply-fasen via the active Claude Code session.
|
||||
|
||||
**Automated change detection (sitemap-based):**
|
||||
**Manuell kjøring (anbefalt):**
|
||||
|
||||
```bash
|
||||
# Weekly update: poll sitemaps → compare → generate change report
|
||||
node scripts/kb-update/run-weekly-update.mjs --force
|
||||
|
||||
# Include discovery of new relevant pages
|
||||
node scripts/kb-update/run-weekly-update.mjs --force --discover
|
||||
|
||||
# View change report only (after polling)
|
||||
node scripts/kb-update/report-changes.mjs
|
||||
```text
|
||||
/architect:kb-update # default: critical + high priorities
|
||||
/architect:kb-update --priorities critical # bare critical
|
||||
/architect:kb-update --skip-discover # hopp over new-URL-discovery
|
||||
/architect:kb-update --dry-run # rapport uten å oppdatere filer
|
||||
```
|
||||
|
||||
The session-start hook automatically triggers a background poll if >7 days since the last check.
|
||||
Kommandoen poller sitemaps, sammenligner `<lastmod>` mot lokale `Last updated:`-headere, henter ferskt innhold via `microsoft_docs_fetch`, oppdaterer relevante filer og committer endringene.
|
||||
|
||||
**Bare endringsrapporten (uten apply-fasen):**
|
||||
|
||||
```bash
|
||||
# Poll + change-report (ingen filendringer)
|
||||
node scripts/kb-update/run-weekly-update.mjs --force
|
||||
|
||||
# Med discovery av nye relevante sider
|
||||
node scripts/kb-update/run-weekly-update.mjs --force --discover
|
||||
|
||||
# Vis rapport på nytt etter polling
|
||||
node scripts/kb-update/report-changes.mjs
|
||||
|
||||
# Bygg URL-registry fra referansefiler
|
||||
node scripts/kb-update/build-registry.mjs [--merge]
|
||||
```
|
||||
|
||||
**Schedulering er brukerens valg.** Pluginen schedulerer ingenting. Hvis du vil kjøre periodisk poll + varsling, sett opp en cron-jobb / launchd-jobb / systemd-timer / GitHub Actions-workflow som kjører `node scripts/kb-update/run-weekly-update.mjs --force --discover` og varsler deg om å åpne Claude Code og kjøre `/architect:kb-update`. Apply-fasen (LLM-drevet content-update + commits) kjører kun fra en aktiv Claude Code-sesjon — det er bevisst og holder oss godt innenfor Anthropic Consumer Terms § 3 (automated access only via API key or where explicitly permitted).
|
||||
|
||||
**How it works:**
|
||||
1. `build-registry.mjs` extracts 1342 unique `learn.microsoft.com` URLs from reference files
|
||||
1. `build-registry.mjs` extracts 1342+ unique `learn.microsoft.com` URLs from reference files
|
||||
2. `poll-sitemaps.mjs` fetches Microsoft Learn sitemaps and compares `<lastmod>` dates
|
||||
3. `report-changes.mjs` generates a prioritized list of files needing update
|
||||
4. `discover-new-urls.mjs` finds relevant new pages not yet covered
|
||||
|
|
@ -624,6 +638,7 @@ Category-to-skill routing is defined in `scripts/skill-gen/category-skill-map.js
|
|||
|
||||
| Version | Date | Highlights |
|
||||
|---------|------|-----------|
|
||||
| **1.12.0** | 2026-05-05 | Manuell KB-refresh-arbeidsflyt — ny `/architect:kb-update` slash-kommando som driver poll → endringsrapport → `microsoft_docs_fetch`-oppdatering → commit fra en aktiv Claude Code-sesjon. Schedulering er bevisst utenfor scope og overlatt til brukeren. Tidligere launchd/cron-arkitektur (Wave 3-5: install-kb-cron, weekly-kb-cron, plist/systemd/Windows-templates, auth-mode-validation, lock-file, cost-cap, kb-update-status surfacing i session-start-hook) fjernet — ~1500 linjer kode + 7 testmoduler ut. Holder pluginen klart innenfor Anthropic Consumer Terms § 3 (automated access only via API key or where explicitly permitted). Beholdte utilities (atomic-write, backup, cross-platform-paths, log-rotate) + run-weekly-update + report-changes + build-registry + discover-new-urls fortsatt fullt funksjonelle for change-detection-fasen. 42/42 KB-update-tester PASS. |
|
||||
| **1.11.0** | 2026-05-04 | Design-system 100%-adoption — 13 generic components hoisted to shared playground-design-system v0.3.0, all PARALLEL CSS names migrated to DS conventions, inline `<style>` block trimmed 37% (202 → 127 lines), severity-coded card borders on report cards, app-header restructure with breadcrumb, `.stack-lg` body spacing across home/project/catalog, AI Act pyramide width fix. Demo state renamed to "Acme Kommune" + "Acme: Kunde-chatbot" for cross-fixture consistency. 24 v1.11.0 screenshots regenerated. 278/278 playground E2E PASS. |
|
||||
| **1.6.0** | 2026-02-19 | ROS analysis command and agent (`/architect:ros`) — 7-dimension risk assessment with NS 5814/ISO 31000 methodology, 49-threat AI threat library, sector-specific checklists (health, transport, finance, justice, education), MAESTRO multi-agent security model, 7 new KB reference documents (3,131 lines), E2E test suite (24 checks), summary-agent integration |
|
||||
| **1.5.0** | 2025-02-13 | E2E regression tests (43 checks across 3 suites), auto onboarding detection at session start, systematic KB update process with staleness policy and `--json` output |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue