diff --git a/.agents/docs/README.md b/.agents/docs/README.md new file mode 100644 index 000000000..5b6b469d9 --- /dev/null +++ b/.agents/docs/README.md @@ -0,0 +1,196 @@ +# NetScript — Agent Docs + +Agent-facing documentation for the NetScript repo. These docs explain the system architecture, +conventions, and operating procedures that an AI agent needs to work effectively in this codebase. + +> **Complement, don't duplicate.** The public-facing docs live in `docs/` (architecture doctrine, +> standards, public-surface patterns). The agent docs here focus on _how to operate_ the codebase — +> harness workflows, skill routing, package conventions, and gotchas. + +--- + +## Start here + +| Doc | Why you'd read this | +| ----------------------------------------------- | ----------------------------------------------------------- | +| [Architecture Overview](#architecture-overview) | High-level design, layering, and how the repo is organized. | +| [Getting Started](#getting-started) | Build, test, and validation commands. | +| [Skill Router](#skill-router) | Which skill to load for which task. | + +--- + +## Architecture Overview + +NetScript is a modular framework for building Deno/TypeScript services with a doctrine-enforced +package structure. It is organized around three concerns: + +1. **Framework core** — The harness, doctrine, and archetypes that govern how packages are shaped. +2. **Packages** — The 23 publishable units (`packages/*`) that provide runtime capabilities (KV, + queues, sagas, workers, triggers, CLI, etc.). +3. **Plugins** — The 4 first-party plugins (`plugins/*`) that extend the framework. + +### Guiding Principles + +- **Doctrine-first** — Every package follows the 10-file architecture doctrine. New decisions become + ADRs; existing doctrine is append-only. +- **Archetype-driven** — Each package selects one of six archetypes (Small Contract, Integration, + Runtime/Behavior, DSL/Builder, Plugin, CLI/Tooling). The archetype determines the minimum viable + shape and gate set. +- **Composition over inheritance** — Base classes are stub-only contracts; concrete classes + delegate. Extension axes are named before abstraction. +- **Thin core, fat targets** — The harness and doctrine are the stable core; packages carry their + own dialect-specific logic. +- **Feedback before execution** — The harness Plan-Gate catches planning errors before code is + written; fitness gates catch structural violations before merge. + +### Repo Layout + +``` +packages/ + shared/ # Foundation types, schemas, invariants + contracts/ # Contract primitives, schemas, CRUD/query/transform helpers + config/ # Typed project configuration schemas and loaders + runtime-config/ # Runtime configuration resolution + logger/ # Logging + telemetry/ # OpenTelemetry instrumentation + aspire/ # .NET Aspire integration + kv/ # Key-value storage + database/ # Database ports and adapters + prisma-adapter-mysql/ # Prisma MySQL adapter + queue/ # Message queuing + cron/ # Job scheduling + plugin/ # Plugin runner and authoring SDK + plugin-streams-core/ # Streams plugin core + plugin-workers-core/ # Workers plugin core + plugin-sagas-core/ # Sagas plugin core + plugin-triggers-core/ # Triggers plugin core + watchers/ # Resource watchers + sdk/ # SDK surface + service/ # Service runtime + fresh/ # Fresh 2.x framework integration + fresh-ui/ # Fresh UI components + cli/ # Command-line interface +plugins/ + streams/ # Streams plugin + workers/ # Workers plugin + sagas/ # Sagas plugin + triggers/ # Triggers plugin +docs/ + architecture/ # Public-facing architecture docs and doctrine +.agents/ + skills/ # Agent skills (doctrine, harness, JSR audit, etc.) + rules/ # .mdc rule files + docs/ # This directory — agent-facing docs +.llm/ + harness/ # Harness v2 (workflows, gates, evaluator protocols) +``` + +### Subsystems Index + +| Subsystem | Path | What it covers | +| ----------------- | -------------------------- | ------------------------------------------ | +| Foundation | `packages/shared/` | Foundation types, schemas, invariants | +| Contracts | `packages/contracts/` | Contract primitives, CRUD/query/transform | +| Configuration | `packages/config/` | Schema-driven config with validation | +| Runtime config | `packages/runtime-config/` | Runtime configuration resolution | +| Logging | `packages/logger/` | Structured logging | +| Telemetry | `packages/telemetry/` | OpenTelemetry instrumentation | +| KV store | `packages/kv/` | Key-value storage with TTL and namespacing | +| Database | `packages/database/` | Database ports and adapters | +| Queuing | `packages/queue/` | Message queue abstractions | +| Scheduling | `packages/cron/` | Cron expression parsing and job scheduling | +| Plugin SDK | `packages/plugin/` | Plugin runner and authoring SDK | +| Plugin cores | `packages/plugin-*-core/` | Streams, workers, sagas, triggers cores | +| CLI | `packages/cli/` | Command-line scaffolding and tooling | +| Fresh integration | `packages/fresh/` | Fresh 2.x framework bindings | + +--- + +## Getting Started + +### Prerequisites + +- [Deno](https://deno.land/) v2.x +- Git + +### Build and test + +```bash +# Format and lint +deno fmt +deno lint + +# Type check all packages and plugins +deno task check + +# Run tests +deno task test + +# Run CLI E2E tests (expensive — run before merge) +deno task e2e:cli +``` + +### Working with the harness + +```bash +# Start a harnessed run +# (say "use harness" to the agent, or load .agents/skills/netscript-harness/SKILL.md) +``` + +The harness uses an 8-phase model: Bootstrap → Research → Plan & Design → **Plan-Gate** → Implement +→ Gate → Evaluate → Close. + +See `.llm/harness/workflow/run-loop.md` for the full specification. + +--- + +## Skill Router + +When a prompt is vague, route it to the narrowest skill: + +| Task | Skill | +| -------------------------------------- | --------------------- | +| `packages/` or `plugins/` architecture | `netscript-doctrine` | +| `use harness` or run orchestration | `netscript-harness` | +| JSR readiness or publish audit | `jsr-audit` | +| Fresh/Deno frontend | `deno-fresh` | +| Anything else | Ask for clarification | + +See `.agents/skills/README.md` for the full scope table. + +--- + +## Working with AI Agents + +| Doc | Why you'd read this | +| ---------------------------------------------------------------- | ----------------------------------------------------- | +| [Harness Activation](../../.llm/harness/workflow/activation.md) | Bootstrap reading list and mandatory artifacts. | +| [Run Loop](../../.llm/harness/workflow/run-loop.md) | The 8-phase model with Plan-Gate and dual evaluators. | +| [Plan-Gate](../../.llm/harness/gates/plan-gate.md) | Checklist for the PLAN-EVAL pass. | +| [Supervisor Workflow](../../.llm/harness/workflow/supervisor.md) | Multi-group supervisor runs. | +| [Skill Authoring](../skills/DEVELOPING.md) | How to write a new skill. | + +--- + +## Reference + +| Doc | Why you'd read this | +| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | +| [Architecture Doctrine](../../docs/architecture/doctrine/) | The 10-file specification (A1–A14, archetypes, AP-1..AP-20, F-1..F-18). | +| [Public Surface Patterns](../../docs/architecture/PUBLIC-SURFACE-PATTERNS.md) | How to design exports, `mod.ts`, and READMEs for JSR. | +| [Agent Rules](../rules/) | `.mdc` rule files for CLI, architecture, public surface, JSR, platform, and harness. | +| [Archetype Gate Matrix](../../.llm/harness/gates/archetype-gate-matrix.md) | Required gates per archetype. | +| [Architecture Debt](../../.llm/harness/debt/arch-debt.md) | Persistent debt entries with owners and closing gates. | + +--- + +## OSS Posture + +| Doc | Why you'd read this | +| ------------ | ---------------------------------------------------------- | +| Governance | _(stub)_ Decision-making and contribution policies. | +| Supply Chain | _(stub)_ License validation, provenance, dependency audit. | +| Versioning | _(stub)_ Release procedure and supported versions. | +| Telemetry | _(stub)_ What the CLI collects and how to opt out. | + +> OSS posture docs are stubs. Expand only when real policy is ratified. diff --git a/.agents/skills/DEVELOPING.md b/.agents/skills/DEVELOPING.md new file mode 100644 index 000000000..eab4da692 --- /dev/null +++ b/.agents/skills/DEVELOPING.md @@ -0,0 +1,129 @@ +# Developing NetScript Skills + +Authoring rules, cluster conventions, and the worked example for concepts-over-procedures. Read this +before adding or rewriting a `SKILL.md`. + +--- + +## Skill shape + +Every `SKILL.md` in this cluster follows the same sections, in order: + +### 1. Preamble (YAML frontmatter) + +```yaml +--- +name: +description: > + One-line description that an agent runtime matches against the user's prompt. +--- +``` + +- `name` — kebab-case, matches the folder name. +- `description` — the matching string for agent runtimes. Be specific; vague descriptions cause + routing errors. + +### 2. Canonical mental-model headline + +One sentence that captures the skill's core idea. This is the first paragraph after the frontmatter. +It should be memorable enough that an agent can recall it when the skill is not loaded. + +Example: + +> This skill is a navigator. The doctrine remains authoritative; read the relevant doctrine file +> before changing or evaluating package/plugin code. + +### 3. When to Use + +Bullet list of specific triggers. Be concrete: + +- Good: "Creating a new Fresh web application" +- Bad: "Working with code" + +### 4. When Not to Use + +Boundaries prevent routing errors. State what this skill does not cover and which skill (if any) +does. + +Example: + +> For app, service, frontend, or infrastructure work, use this skill only when the work changes or +> evaluates package/plugin surfaces. + +### 5. Key Concepts + +The vocabulary an agent needs to reason about this domain. Use tables for quick reference. + +### 6. Workflow + +The typical sequence of actions when this skill is active. Numbered list, not prose narrative. + +### 7. Common Pitfalls + +Mistakes LLMs commonly make in this domain. Each pitfall names the mistake, why it happens, and how +to avoid it. + +### 8. What NetScript doesn't do yet + +**Status: draft — pending user approval before becoming mandatory.** + +This section names features the framework does not implement, along with: + +- the workaround available today, +- the skill or doc to route the request to, +- a note that the feature is tracked (or not yet tracked). + +This prevents agents from confabulating plausible-looking API calls against something that does not +exist. + +Example shape: + +```markdown +## What NetScript doesn't do yet + +- **Feature X** — Not implemented. Workaround: use Y. Track via a GitHub issue (or + `.llm/harness/debt/arch-debt.md` for framework-level gaps). +``` + +### 9. Reference Files + +Canonical files this skill points to. Use a table with "Load when" column. + +### 10. Checklist + +Quick verification steps before handing off. 3–5 items. + +--- + +## Router convention + +One skill in the cluster acts as the router. Currently `netscript-harness` catches `use harness` +prompts, and `netscript-doctrine` catches package/plugin work. If you add a skill that overlaps with +an existing one, update the router skill's description or add an explicit routing table. + +--- + +## Versioning in lockstep + +Skills ship with the repo, not as a separate package. The skill surface must match the code surface. +When the codebase changes: + +1. Update the affected skill's content. +2. Update the skills cluster `README.md` scope table if the skill's scope changed. +3. Run `deno fmt` on the skill file. + +Do not version skills independently of the repo. + +--- + +## Review checklist for new skills + +Before committing a new skill: + +- [ ] Follows the 10-section shape above. +- [ ] Has a specific, non-vague `description` in YAML frontmatter. +- [ ] Includes "When Not to Use" boundaries. +- [ ] All referenced files exist in the repo. +- [ ] `deno fmt` clean. +- [ ] Added to `.agents/skills/README.md` scope table. +- [ ] Router skill updated if needed. diff --git a/.agents/skills/README.md b/.agents/skills/README.md new file mode 100644 index 000000000..f35f61242 --- /dev/null +++ b/.agents/skills/README.md @@ -0,0 +1,69 @@ +# NetScript Skills + +Agent skills for the NetScript repo. A small set of `SKILL.md` files that teach an LLM agent how to +operate this codebase end-to-end without re-deriving the API from documentation each time. + +> **Install the version that matches your NetScript version.** Skills ship in lockstep with the +> codebase. Keep the git ref aligned with the branch you are working on. + +--- + +## What's in the box + +| Skill | Scope | Status | +| --------------------- | ----------------------------------------------------------------------------------------------- | ------ | +| `netscript-doctrine` | **CORE** — Navigate the architecture doctrine for `packages/` and `plugins/`. | active | +| `netscript-harness` | **CORE** — Orchestrate harness-mode runs (8-phase model, Plan-Gate, dual evaluators). | active | +| `jsr-audit` | **CORE** — Audit packages for JSR readiness. Required Plan-Gate input for package/plugin waves. | active | +| `deno-fresh` | Frontend development with Fresh 2.x, Preact, and Tailwind CSS in Deno. | active | +| `netscript-standards` | **LEGACY** — Superseded by `netscript-doctrine`. Do not use for new work. | legacy | + +> **Not yet in this repo.** These skills exist in the broader NetScript toolkit but are not present +> in this repository yet — do not assume their guidance is loadable here: `deno-expert`, +> `frontend-design`, `ux-patterns`, `tailwind`, `web-design`, `aspire`, `rtk`. + +--- + +## Router + +If a prompt is vague, route it to the narrowest skill that fits: + +- `packages/` or `plugins/` work → `netscript-doctrine` +- `use harness` or run orchestration → `netscript-harness` +- JSR readiness or publish audit → `jsr-audit` +- Fresh/Deno frontend → `deno-fresh` +- Anything else → ask for clarification rather than guess + +--- + +## Skill shape + +Every skill follows the same shape: + +1. **Preamble** — YAML frontmatter with `name`, `description`, and optional metadata. +2. **Canonical mental-model headline** — One sentence that captures the skill's core idea. +3. **When to Use** — Specific triggers that activate this skill. +4. **When Not to Use** — Boundaries; what this skill does not cover. +5. **Key Concepts** — The vocabulary an agent needs to reason about this domain. +6. **Workflow** — The typical sequence of actions when this skill is active. +7. **Common Pitfalls** — Mistakes LLMs commonly make in this domain. +8. **What NetScript doesn't do yet** — _(draft — pending user approval)_ Features the framework does + not implement, with workarounds. +9. **Reference Files** — Canonical files this skill points to. +10. **Checklist** — Quick verification steps before handing off. + +See [`DEVELOPING.md`](DEVELOPING.md) for the full authoring guide. + +--- + +## Versioning + +Skills are versioned in lockstep with the NetScript codebase. The skill surface (commands it +references, exit codes it expects, capability claims it makes) tracks the repo's current branch. Pin +per-branch to keep skills, harness, and doctrine coherent. + +--- + +## Contributing + +Read [`DEVELOPING.md`](DEVELOPING.md) before adding or rewriting a `SKILL.md`. diff --git a/.agents/skills/deno-fresh/SKILL.md b/.agents/skills/deno-fresh/SKILL.md index c1034bad1..bbea89b03 100644 --- a/.agents/skills/deno-fresh/SKILL.md +++ b/.agents/skills/deno-fresh/SKILL.md @@ -4,14 +4,16 @@ description: Use when working with Fresh framework, creating routes or handlers license: MIT metadata: author: denoland - version: "2.4" + version: '2.4' --- # Deno Frontend Development ## Overview -This skill covers frontend development in Deno using Fresh 2.x (Deno's web framework), Preact (a lightweight React alternative), and Tailwind CSS. Fresh uses "island architecture" where pages render on the server and only interactive parts ship JavaScript to the browser. +This skill covers frontend development in Deno using Fresh 2.x (Deno's web framework), Preact (a +lightweight React alternative), and Tailwind CSS. Fresh uses "island architecture" where pages +render on the server and only interactive parts ship JavaScript to the browser. ## When to Use This Skill @@ -28,17 +30,25 @@ Apply these practices when building web applications in Deno. This skill applies **only** to Fresh/Deno frontend questions. Follow these rules: -- If the user asks about **Next.js, React Native, Vue, Svelte, Angular, or any other framework**, answer using that framework directly. Do not suggest Fresh alternatives. -- Do not include Fresh imports, `useSignal`, island patterns, or Fresh project structure in responses about other frameworks. -- Only recommend Fresh when the user explicitly asks about Fresh or is working in a Fresh/Deno project. +- If the user asks about **Next.js, React Native, Vue, Svelte, Angular, or any other framework**, + answer using that framework directly. Do not suggest Fresh alternatives. +- Do not include Fresh imports, `useSignal`, island patterns, or Fresh project structure in + responses about other frameworks. +- Only recommend Fresh when the user explicitly asks about Fresh or is working in a Fresh/Deno + project. ## CRITICAL: Never Show Deprecated Syntax -When helping users migrate from Fresh 1.x, describe old patterns generically and ONLY show correct Fresh 2.x code. Never write out old dollar-sign import paths or deprecated syntax, even in "before/after" comparisons. +When helping users migrate from Fresh 1.x, describe old patterns generically and ONLY show correct +Fresh 2.x code. Never write out old dollar-sign import paths or deprecated syntax, even in +"before/after" comparisons. -- Say "Replace the old dollar-sign import paths with stable Fresh 2.x imports" — then show only the correct `from "fresh"` approach -- Do NOT write `❌ Old: import { App } from "$fresh/server.ts"` — this is never acceptable, even as a negative example -- The strings `_404.tsx` and `_500.tsx` must never appear in your response, even when comparing Fresh 2.x to 1.x. Say "the old separate error pages" instead. +- Say "Replace the old dollar-sign import paths with stable Fresh 2.x imports" — then show only the + correct `from "fresh"` approach +- Do NOT write `❌ Old: import { App } from "$fresh/server.ts"` — this is never acceptable, even as + a negative example +- The strings `_404.tsx` and `_500.tsx` must never appear in your response, even when comparing + Fresh 2.x to 1.x. Say "the old separate error pages" instead. Only demonstrate Fresh 2.x patterns. @@ -54,17 +64,19 @@ Only demonstrate Fresh 2.x patterns. - Fresh 2.x uses a unified `_error.tsx` — the old separate error pages are replaced **Always use Fresh 2.x stable imports:** + ```typescript // ✅ CORRECT - Fresh 2.x stable -import { App, staticFiles } from "fresh"; -import { define } from "./utils/state.ts"; // Project-local define helpers +import { App, staticFiles } from 'fresh'; +import { define } from './utils/state.ts'; // Project-local define helpers ``` ## Fresh Framework Reference: https://fresh.deno.dev/docs -Fresh is Deno's web framework. It uses **island architecture** - pages are rendered on the server, and only interactive parts ("islands") get JavaScript on the client. +Fresh is Deno's web framework. It uses **island architecture** - pages are rendered on the server, +and only interactive parts ("islands") get JavaScript on the client. ### Creating a Fresh Project @@ -97,19 +109,20 @@ my-project/ └── state.ts # Define helpers for type safety ``` -**Note:** Fresh 2.x does not use a manifest file, a separate dev entry point, or a separate config file. +**Note:** Fresh 2.x does not use a manifest file, a separate dev entry point, or a separate config +file. ### main.ts (Fresh 2.x Entry Point) ```typescript -import { App, fsRoutes, staticFiles, trailingSlashes } from "fresh"; +import { App, fsRoutes, staticFiles, trailingSlashes } from 'fresh'; const app = new App() .use(staticFiles()) - .use(trailingSlashes("never")); + .use(trailingSlashes('never')); await fsRoutes(app, { - dir: "./", + dir: './', loadIsland: (path) => import(`./islands/${path}`), loadRoute: (path) => import(`./routes/${path}`), }); @@ -122,9 +135,9 @@ if (import.meta.main) { ### vite.config.ts ```typescript -import { defineConfig } from "vite"; -import { fresh } from "@fresh/plugin-vite"; -import tailwindcss from "@tailwindcss/vite"; +import { defineConfig } from 'vite'; +import { fresh } from '@fresh/plugin-vite'; +import tailwindcss from '@tailwindcss/vite'; export default defineConfig({ plugins: [ @@ -168,22 +181,23 @@ deno add npm:@tailwindcss/vite # npm packages ```typescript // Core Fresh imports -import { App, staticFiles, fsRoutes } from "fresh"; -import { trailingSlashes, cors, csp } from "fresh"; -import { createDefine, HttpError } from "fresh"; -import type { PageProps, Middleware, RouteConfig } from "fresh"; +import { App, fsRoutes, staticFiles } from 'fresh'; +import { cors, csp, trailingSlashes } from 'fresh'; +import { createDefine, HttpError } from 'fresh'; +import type { Middleware, PageProps, RouteConfig } from 'fresh'; // Runtime imports (for client-side checks) -import { IS_BROWSER } from "fresh/runtime"; +import { IS_BROWSER } from 'fresh/runtime'; // Preact -import { useSignal, signal, computed } from "@preact/signals"; -import { useState, useEffect, useRef } from "preact/hooks"; +import { computed, signal, useSignal } from '@preact/signals'; +import { useEffect, useRef, useState } from 'preact/hooks'; ``` ### Key Concepts **Routes (`routes/` folder)** + - File-based routing: `routes/about.tsx` → `/about` - Dynamic routes: `routes/blog/[slug].tsx` → `/blog/my-post` - Optional segments: `routes/docs/[[version]].tsx` → `/docs` or `/docs/v2` @@ -191,15 +205,16 @@ import { useState, useEffect, useRef } from "preact/hooks"; - Route groups: `routes/(marketing)/` for shared layouts without URL path changes **Layouts (`_app.tsx`)** + ```tsx -import type { PageProps } from "fresh"; +import type { PageProps } from 'fresh'; export default function App({ Component }: PageProps) { return ( - - + + My App @@ -211,6 +226,7 @@ export default function App({ Component }: PageProps) { ``` **Async Server Components** + ```tsx export default async function Page() { const data = await fetchData(); // Runs on server only @@ -220,15 +236,19 @@ export default async function Page() { ## Data Fetching Patterns -Fresh 2.x provides two approaches for fetching data on the server. The handler pattern is the recommended default because it demonstrates the full Fresh 2.x architecture and provides the most flexibility. +Fresh 2.x provides two approaches for fetching data on the server. The handler pattern is the +recommended default because it demonstrates the full Fresh 2.x architecture and provides the most +flexibility. ### Approach A: Handler with Data Object (Recommended) -Use this as the default for data fetching. It uses the full Fresh 2.x handler pattern with typed data passing. Always show the complete setup including `utils/state.ts` when demonstrating this pattern. +Use this as the default for data fetching. It uses the full Fresh 2.x handler pattern with typed +data passing. Always show the complete setup including `utils/state.ts` when demonstrating this +pattern. ```tsx // utils/state.ts - one-time setup for type-safe handlers -import { createDefine } from "fresh"; +import { createDefine } from 'fresh'; export interface State { user?: { id: string; name: string }; @@ -239,11 +259,11 @@ export const define = createDefine(); ```tsx // routes/posts.tsx -import { define } from "@/utils/state.ts"; +import { define } from '@/utils/state.ts'; // Handler fetches data and returns it via { data: {...} } export const handler = define.handlers(async (ctx) => { - const response = await fetch("https://jsonplaceholder.typicode.com/posts"); + const response = await fetch('https://jsonplaceholder.typicode.com/posts'); const posts = await response.json(); return { data: { posts } }; }); @@ -270,7 +290,7 @@ For the simplest cases where you just need to fetch and display data with no aut ```tsx // routes/servers.tsx export default async function ServersPage() { - const servers = await db.query("SELECT * FROM servers"); + const servers = await db.query('SELECT * FROM servers'); return (
@@ -295,9 +315,12 @@ Need to fetch data on server? ## Handlers and Define Helpers (Fresh 2.x) -Fresh 2.x uses a **single context parameter** pattern for handlers. Always use `(ctx)` as the only parameter. +Fresh 2.x uses a **single context parameter** pattern for handlers. Always use `(ctx)` as the only +parameter. -**Important:** When demonstrating any handler pattern (data fetching, form handling, API routes, auth), always show or reference the `utils/state.ts` setup which imports `createDefine` from `"fresh"`. This ensures the complete Fresh 2.x architecture is visible. +**Important:** When demonstrating any handler pattern (data fetching, form handling, API routes, +auth), always show or reference the `utils/state.ts` setup which imports `createDefine` from +`"fresh"`. This ensures the complete Fresh 2.x architecture is visible. ### Route Handlers @@ -305,7 +328,7 @@ Always use `define.handlers()` for type-safe route handlers in file-based routes ```tsx // routes/api/users.ts -import { define } from "@/utils/state.ts"; +import { define } from '@/utils/state.ts'; // Single function handles all methods export const handler = define.handlers((ctx) => { @@ -324,7 +347,8 @@ export const handler = define.handlers({ }); ``` -Note: Bare handler exports (`export const handler = (ctx) => {...}`) also work but lose TypeScript type safety. Prefer `define.handlers()`. +Note: Bare handler exports (`export const handler = (ctx) => {...}`) also work but lose TypeScript +type safety. Prefer `define.handlers()`. ### The Context Object @@ -355,7 +379,7 @@ Create a `utils/state.ts` file for type-safe handlers: ```tsx // utils/state.ts -import { createDefine } from "fresh"; +import { createDefine } from 'fresh'; // Define your app's state type export interface State { @@ -370,13 +394,13 @@ Use in routes: ```tsx // routes/profile.tsx -import { define } from "@/utils/state.ts"; -import type { PageProps } from "fresh"; +import { define } from '@/utils/state.ts'; +import type { PageProps } from 'fresh'; // Typed handler with data export const handler = define.handlers((ctx) => { if (!ctx.state.user) { - return ctx.redirect("/login"); + return ctx.redirect('/login'); } return { data: { user: ctx.state.user } }; }); @@ -391,7 +415,7 @@ export default define.page(({ data }) => { ```tsx // routes/_middleware.ts -import { define } from "@/utils/state.ts"; +import { define } from '@/utils/state.ts'; export const handler = define.middleware(async (ctx) => { // Before route handler @@ -409,8 +433,8 @@ export const handler = define.middleware(async (ctx) => { ```tsx // routes/api/posts/[id].ts -import { define } from "@/utils/state.ts"; -import { HttpError } from "fresh"; +import { define } from '@/utils/state.ts'; +import { HttpError } from 'fresh'; export const handler = define.handlers({ async GET(ctx) { @@ -433,7 +457,8 @@ export const handler = define.handlers({ ## Islands (Interactive Components) -Islands are components that get hydrated (made interactive) on the client. Place them in the `islands/` folder or `(_islands)` folder within routes. +Islands are components that get hydrated (made interactive) on the client. Place them in the +`islands/` folder or `(_islands)` folder within routes. ### When to Use Islands @@ -445,7 +470,7 @@ Islands are components that get hydrated (made interactive) on the client. Place ```tsx // islands/Counter.tsx -import { useSignal } from "@preact/signals"; +import { useSignal } from '@preact/signals'; export default function Counter() { const count = useSignal(0); @@ -465,8 +490,8 @@ export default function Counter() { ```tsx // islands/LocalStorageCounter.tsx -import { IS_BROWSER } from "fresh/runtime"; -import { useSignal } from "@preact/signals"; +import { IS_BROWSER } from 'fresh/runtime'; +import { useSignal } from '@preact/signals'; export default function LocalStorageCounter() { // Return placeholder during SSR @@ -475,14 +500,16 @@ export default function LocalStorageCounter() { } // Client-only code - const stored = localStorage.getItem("count"); + const stored = localStorage.getItem('count'); const count = useSignal(stored ? parseInt(stored) : 0); return ( - ); @@ -492,6 +519,7 @@ export default function LocalStorageCounter() { ### Island Props (Serializable Types) Islands can receive these prop types: + - Primitives: string, number, boolean, bigint, undefined, null - Special values: Infinity, -Infinity, NaN, -0 - Collections: Array, Map, Set @@ -514,23 +542,23 @@ Preact is a 3KB alternative to React. Fresh uses Preact instead of React. ### Preact vs React Differences -| Preact | React | -|--------|-------| -| `class` works | `className` required | -| `@preact/signals` | `useState` | -| 3KB bundle | ~40KB bundle | +| Preact | React | +| ----------------- | -------------------- | +| `class` works | `className` required | +| `@preact/signals` | `useState` | +| 3KB bundle | ~40KB bundle | ### Hooks (Same as React) ```tsx -import { useState, useEffect, useRef } from "preact/hooks"; +import { useEffect, useRef, useState } from 'preact/hooks'; function MyComponent() { const [value, setValue] = useState(0); const inputRef = useRef(null); useEffect(() => { - console.log("Component mounted"); + console.log('Component mounted'); }, []); return ; @@ -542,7 +570,7 @@ function MyComponent() { Signals are Preact's more efficient alternative to useState: ```tsx -import { signal, computed } from "@preact/signals"; +import { computed, signal } from '@preact/signals'; const count = signal(0); const doubled = computed(() => count.value * 2); @@ -559,13 +587,16 @@ function Counter() { ``` Benefits of signals: + - More granular updates (only re-renders what changed) - Can be defined outside components - Cleaner code for shared state ## Tailwind CSS in Fresh (Optional) -Tailwind CSS is optional—you don't need it to build a great Fresh app. However, many developers prefer it for rapid styling. Fresh 2.x uses Vite for builds, so Tailwind integrates via the Vite plugin. +Tailwind CSS is optional—you don't need it to build a great Fresh app. However, many developers +prefer it for rapid styling. Fresh 2.x uses Vite for builds, so Tailwind integrates via the Vite +plugin. ### Setup @@ -575,12 +606,14 @@ Install both Tailwind packages: deno add npm:@tailwindcss/vite npm:tailwindcss ``` -**Important:** You need both packages. `@tailwindcss/vite` is the Vite plugin, and `tailwindcss` is the core library it depends on. +**Important:** You need both packages. `@tailwindcss/vite` is the Vite plugin, and `tailwindcss` is +the core library it depends on. Configure Vite in `vite.config.ts`: + ```typescript -import { defineConfig } from "vite"; -import tailwindcss from "@tailwindcss/vite"; +import { defineConfig } from 'vite'; +import tailwindcss from '@tailwindcss/vite'; export default defineConfig({ plugins: [tailwindcss()], @@ -588,13 +621,15 @@ export default defineConfig({ ``` Add the Tailwind import to your CSS file (e.g., `assets/styles.css`): + ```css -@import "tailwindcss"; +@import 'tailwindcss'; ``` Then import this CSS file in your `client.ts`: + ```typescript -import "./assets/styles.css"; +import './assets/styles.css'; ``` ### Usage @@ -602,7 +637,7 @@ import "./assets/styles.css"; ```tsx export default function Button({ children }) { return ( - ); @@ -616,9 +651,9 @@ export default function Button({ children }) { 3. **Dark mode**: Use `class` strategy in tailwind.config.js ```tsx -
-

Hello

-
+
+

Hello

+
; ``` ## Building and Deploying @@ -645,15 +680,15 @@ deno deploy --prod # Deploy to production ## Quick Reference -| Task | Command/Pattern | -|------|-----------------| -| Create Fresh project | `deno run -Ar jsr:@fresh/init` | -| Start dev server | `deno task dev` (port 5173) | -| Build for production | `deno task build` | -| Add a page | Create `routes/pagename.tsx` | -| Add an API route | Create `routes/api/endpoint.ts` | -| Add interactive component | Create `islands/ComponentName.tsx` | -| Add static component | Create `components/ComponentName.tsx` | +| Task | Command/Pattern | +| ------------------------- | ------------------------------------- | +| Create Fresh project | `deno run -Ar jsr:@fresh/init` | +| Start dev server | `deno task dev` (port 5173) | +| Build for production | `deno task build` | +| Add a page | Create `routes/pagename.tsx` | +| Add an API route | Create `routes/api/endpoint.ts` | +| Add interactive component | Create `islands/ComponentName.tsx` | +| Add static component | Create `components/ComponentName.tsx` | ## Common Mistakes @@ -661,12 +696,13 @@ deno deploy --prod # Deploy to production **Using old import specifiers** -The old dollar-sign Fresh import paths and alpha version imports are deprecated. Always use the stable `fresh` package: +The old dollar-sign Fresh import paths and alpha version imports are deprecated. Always use the +stable `fresh` package: ```tsx // ✅ CORRECT - Fresh 2.x stable imports -import { App, staticFiles } from "fresh"; -import type { PageProps } from "fresh"; +import { App, staticFiles } from 'fresh'; +import type { PageProps } from 'fresh'; ``` **Using two-parameter handlers** @@ -676,15 +712,16 @@ The old two-parameter handler signature is deprecated. Fresh 2.x uses a single c ```tsx // ✅ CORRECT - Fresh 2.x uses single context parameter export const handler = { - GET(ctx) { // Single ctx param + GET(ctx) { // Single ctx param return ctx.render(); - } + }, }; ``` **Creating legacy files** -Fresh 2.x does not use a manifest file, a separate dev entry point, or a separate config file. The correct Fresh 2.x file structure is: +Fresh 2.x does not use a manifest file, a separate dev entry point, or a separate config file. The +correct Fresh 2.x file structure is: ``` main.ts # Server entry @@ -694,24 +731,26 @@ vite.config.ts # Vite config **Using deprecated context methods** -The old `renderNotFound()`, bare `render()` without JSX, and `basePath` patterns are deprecated. Use these Fresh 2.x patterns instead: +The old `renderNotFound()`, bare `render()` without JSX, and `basePath` patterns are deprecated. Use +these Fresh 2.x patterns instead: ```tsx // ✅ CORRECT - Fresh 2.x patterns -throw new HttpError(404) -ctx.render() -ctx.config.basePath +throw new HttpError(404); +ctx.render(); +ctx.config.basePath; ``` **Passing data from handlers to pages (VERY COMMON MISTAKE)** -This is a frequent error. In Fresh 2.x, you cannot pass data through `ctx.render()`. Instead, return an object with a `data` property from the handler: +This is a frequent error. In Fresh 2.x, you cannot pass data through `ctx.render()`. Instead, return +an object with a `data` property from the handler: ```tsx // ✅ CORRECT - Return object with data property from handler export const handler = define.handlers(async (ctx) => { const servers = await getServers(); - return { data: { servers } }; // Return { data: {...} } object + return { data: { servers } }; // Return { data: {...} } object }); // ✅ CORRECT - Link page to handler type with typeof @@ -744,6 +783,7 @@ The old task commands that reference `dev.ts` are deprecated. Use the Vite-based ### Island Mistakes **Putting too much JavaScript in islands** + ```tsx // ❌ Wrong - entire page as an island (ships all JS to client) // islands/HomePage.tsx @@ -759,7 +799,7 @@ export default function HomePage() { // ✅ Correct - only interactive parts are islands // routes/index.tsx (server component) -import Counter from "../islands/Counter.tsx"; +import Counter from '../islands/Counter.tsx'; export default function HomePage() { return ( @@ -774,6 +814,7 @@ export default function HomePage() { ``` **Passing non-serializable props to islands** + ```tsx // ❌ Wrong - functions can't be serialized console.log(val)} /> @@ -785,6 +826,7 @@ export default function HomePage() { ### Other Common Mistakes **Using `className` instead of `class`** + ```tsx // ❌ Works but unnecessary in Preact
@@ -794,6 +836,7 @@ export default function HomePage() { ``` **Forgetting to build before deploying Fresh 2.x** + ```bash # ❌ Wrong - Fresh 2.x requires a build step deno deploy --prod @@ -804,17 +847,28 @@ deno deploy --prod ``` **Creating islands for non-interactive content** + ```tsx // ❌ Wrong - this doesn't need to be an island (no interactivity) // islands/StaticCard.tsx export default function StaticCard({ title, body }) { - return

{title}

{body}

; + return ( +
+

{title}

+

{body}

+
+ ); } // ✅ Correct - use a regular component (no JS shipped) // components/StaticCard.tsx export default function StaticCard({ title, body }) { - return

{title}

{body}

; + return ( +
+

{title}

+

{body}

+
+ ); } ``` @@ -824,10 +878,11 @@ The old Fresh 1.x Tailwind plugin is deprecated. Fresh 2.x uses the Vite Tailwin ```typescript // ✅ CORRECT - Fresh 2.x uses Vite Tailwind plugin -import tailwindcss from "@tailwindcss/vite"; +import tailwindcss from '@tailwindcss/vite'; ``` **Missing tailwindcss package** + ```sh # Error: Can't resolve 'tailwindcss' in '/path/to/assets' @@ -842,20 +897,24 @@ The `@tailwindcss/vite` plugin requires the core `tailwindcss` package to be ins ## Fresh Alpha Versions (2.0.0-alpha.*) -Some projects use Fresh 2.x alpha releases (e.g., `@fresh/core@2.0.0-alpha.29`). These are **not Fresh 1.x** but use a different setup than stable Fresh 2.x: +Some projects use Fresh 2.x alpha releases (e.g., `@fresh/core@2.0.0-alpha.29`). These are **not +Fresh 1.x** but use a different setup than stable Fresh 2.x: -| Alpha pattern | Stable 2.x pattern | -|---|---| -| `dev.ts` entry point | `vite.config.ts` | -| `@fresh/plugin-tailwind` | `@tailwindcss/vite` | -| `deno run -A --watch dev.ts` | `vite` | -| Dev server on port 8000 | Dev server on port 5173 | -| No `client.ts` | Requires `client.ts` | -| `deno run -A dev.ts build` | `vite build` | +| Alpha pattern | Stable 2.x pattern | +| ---------------------------- | ----------------------- | +| `dev.ts` entry point | `vite.config.ts` | +| `@fresh/plugin-tailwind` | `@tailwindcss/vite` | +| `deno run -A --watch dev.ts` | `vite` | +| Dev server on port 8000 | Dev server on port 5173 | +| No `client.ts` | Requires `client.ts` | +| `deno run -A dev.ts build` | `vite build` | -**IMPORTANT:** If you see `dev.ts` in a project with `@fresh/core@2.0.0-alpha.*` in `deno.json`, do NOT treat it as a Fresh 1.x artifact. It is the correct entry point for alpha versions. Check the `deno.json` imports to determine which version is in use before suggesting changes. +**IMPORTANT:** If you see `dev.ts` in a project with `@fresh/core@2.0.0-alpha.*` in `deno.json`, do +NOT treat it as a Fresh 1.x artifact. It is the correct entry point for alpha versions. Check the +`deno.json` imports to determine which version is in use before suggesting changes. -Alpha projects also use the handler pattern `define.handlers({ GET(ctx) { ... } })` which returns `{ data: {...} }` - this is the same as stable 2.x. +Alpha projects also use the handler pattern `define.handlers({ GET(ctx) { ... } })` which returns +`{ data: {...} }` - this is the same as stable 2.x. ## Migrating from Fresh 1.x to 2.x @@ -866,6 +925,7 @@ deno run -Ar jsr:@fresh/update ``` This tool automatically: + - Converts old import paths to the new `fresh` package - Updates handler signatures to use the single `(ctx)` parameter - Removes legacy generated and config files @@ -884,3 +944,28 @@ If the tool misses anything: 4. **Tasks**: Update to `vite`, `vite build`, `deno serve -A _fresh/server.js` 5. **Error pages**: Use a single unified `_error.tsx` 6. **Tailwind**: Use `@tailwindcss/vite` (the Vite plugin) + +--- + +## What NetScript does not do yet + +> **Status: draft — pending user approval before becoming mandatory.** + +- **Fresh 1.x support** — Fresh 1.x is deprecated; only Fresh 2.x patterns are supported. + Workaround: migrate using `deno run -Ar jsr:@fresh/update`. +- **React/Vue/Svelte/Angular integration** — This skill is Fresh/Preact only. Workaround: use the + relevant framework docs and tooling. +- **Mobile app development** — Fresh is web-only. Workaround: use React Native, Flutter, or similar + for mobile. +- **Server-side rendering outside Fresh** — No standalone SSR utilities. Use Fresh built-in SSR or + Preact `render-to-string` directly. + +--- + +## Checklist + +- [ ] Fresh 2.x stable imports are used (`from "fresh"`, not `$fresh`). +- [ ] Handler signature uses single `(ctx)` parameter. +- [ ] Islands are used only for interactive components; server-only code stays in `components/`. +- [ ] `IS_BROWSER` guard wraps all client-only code in islands. +- [ ] Tailwind CSS uses `@tailwindcss/vite` (not legacy plugin). diff --git a/.agents/skills/jsr-audit/SKILL.md b/.agents/skills/jsr-audit/SKILL.md index ab911cf66..98f790859 100644 --- a/.agents/skills/jsr-audit/SKILL.md +++ b/.agents/skills/jsr-audit/SKILL.md @@ -6,50 +6,69 @@ version: 1.0.0 # JSR Publishing Audit -Comprehensive audit guide for JSR (JavaScript Registry) compliance and scoring optimization. +Comprehensive audit guide for JSR (JavaScript Registry) compliance and scoring optimization. This +skill is a **required Plan-Gate input** for package/plugin waves — apply it to the planned public +surface before slicing. + +## When to Use + +- Auditing a package for JSR readiness. +- Preparing a package for JSR publishing. +- Reviewing JSR config (`deno.json` or `jsr.json`). +- Checking for slow types before publish. +- Verifying documentation quality for JSR score. + +## When Not to Use + +- For package architecture decisions — use `netscript-doctrine`. +- For harness run orchestration — use `netscript-harness`. +- For non-JSR publishing (npm-only, private registries) — this skill is JSR-specific. --- ## Understanding the JSR Score JSR assigns packages a quality score from 0-100%, displayed with color coding: + - **Red**: Below 60% - **Orange**: 60-90% - **Green**: 90%+ (target this) -The score directly influences search ranking. View any package's breakdown at `jsr.io/@scope/package/score`. +The score directly influences search ranking. View any package's breakdown at +`jsr.io/@scope/package/score`. ### The 9 Scoring Factors -| Category | Factor | Impact | -|----------|--------|--------| -| **Documentation** | Has README or module doc | High | -| | Has examples in README/module doc | High | -| | Has module docs in all entrypoints | High | -| | Has docs for most symbols | High | -| **Best Practices** | No slow types | Medium | -| | Has provenance (SLSA attestation) | Medium | -| **Discoverability** | Has description (≤250 chars) | Low | -| **Compatibility** | At least one runtime marked compatible | Low | -| | At least two runtimes compatible | Low | - -**Key insight**: Documentation carries the heaviest weight. Comprehensive JSDoc + README + `@module` tags will score higher than perfect types with minimal docs. +| Category | Factor | Impact | +| ------------------- | -------------------------------------- | ------ | +| **Documentation** | Has README or module doc | High | +| | Has examples in README/module doc | High | +| | Has module docs in all entrypoints | High | +| | Has docs for most symbols | High | +| **Best Practices** | No slow types | Medium | +| | Has provenance (SLSA attestation) | Medium | +| **Discoverability** | Has description (≤250 chars) | Low | +| **Compatibility** | At least one runtime marked compatible | Low | +| | At least two runtimes compatible | Low | + +**Key insight**: Documentation carries the heaviest weight. Comprehensive JSDoc + README + `@module` +tags will score higher than perfect types with minimal docs. --- ## Audit Checklist -| Check | Command/Location | What to Look For | -|-------|------------------|------------------| -| Required metadata | `deno.json` | `name`, `version`, `exports` fields | -| Scoped package name | `name` field | Format: `@scope/package-name` | -| Package description | `description` field | ≤250 characters for discoverability | -| Valid exports | `exports` field | Entry points exist and are correct | -| No slow types | `deno publish --dry-run` | No slow type warnings | -| Clean file list | `deno publish --dry-run` | Only intended files included | -| ESM only | Source files | No CommonJS (`module.exports`, `require()`) | -| Module documentation | Entry point files | `@module` JSDoc tag present | -| Symbol documentation | Exported symbols | JSDoc with `@param`, `@returns`, `@example` | +| Check | Command/Location | What to Look For | +| -------------------- | ------------------------ | ------------------------------------------- | +| Required metadata | `deno.json` | `name`, `version`, `exports` fields | +| Scoped package name | `name` field | Format: `@scope/package-name` | +| Package description | `description` field | ≤250 characters for discoverability | +| Valid exports | `exports` field | Entry points exist and are correct | +| No slow types | `deno publish --dry-run` | No slow type warnings | +| Clean file list | `deno publish --dry-run` | Only intended files included | +| ESM only | Source files | No CommonJS (`module.exports`, `require()`) | +| Module documentation | Entry point files | `@module` JSDoc tag present | +| Symbol documentation | Exported symbols | JSDoc with `@param`, `@returns`, `@example` | --- @@ -69,11 +88,13 @@ Read `deno.json` (or `jsr.json`) and verify: ``` **Package name rules:** + - Must start with `@scope/` - Lowercase letters, numbers, hyphens only - 2-40 characters (excluding scope) **Config file choice:** + - Deno projects: Use `deno.json` - Node/Bun/other: Use `jsr.json` - Never split config between both files @@ -92,6 +113,7 @@ Check all entry points exist: ``` For each entry point, confirm: + - File exists at specified path - Exports are properly defined - Type annotations are explicit (no slow types) @@ -101,7 +123,7 @@ For each entry point, confirm: **Module-level documentation** (top of entry points): -```typescript +````typescript /** * A module providing string utilities for common transformations. * @@ -113,11 +135,11 @@ For each entry point, confirm: * * @module */ -``` +```` **Symbol documentation**: -```typescript +````typescript /** * Converts a string to camelCase format. * @@ -133,9 +155,10 @@ For each entry point, confirm: export function camelCase(input: string): string { // ... } -``` +```` **JSDoc tags reference:** + - `@param name - description` - Document parameters - `@returns description` - Document return value - `@example` - Runnable code examples (use triple backticks) @@ -152,6 +175,7 @@ deno publish --dry-run --allow-dirty ``` This reveals: + - **Slow types**: Exports without explicit type annotations - **File list**: Everything that would be published - **Metadata errors**: Invalid name, version, etc. @@ -161,6 +185,7 @@ This reveals: Review dry-run output for files that should NOT be published: **Common offenders:** + - `.claude/`, `.zed/`, `.vscode/` - IDE settings - `.github/`, `.gitlab/` - CI/CD configs - `.mise.toml`, `.tool-versions` - Local tooling @@ -194,6 +219,7 @@ Use `include` (whitelist) + `exclude` (filter): ``` **Why both?** + - `include` whitelists only intended files - `exclude` filters test files from `src/**/*.ts` glob - `exclude` takes precedence when both match @@ -201,6 +227,7 @@ Use `include` (whitelist) + `exclude` (filter): ### Step 7: Verify Clean Output Run dry-run again. Only these should appear: + - `LICENSE` - `README.md` - `deno.json` @@ -211,19 +238,20 @@ Run dry-run again. Only these should appear: ## Fixing Slow Types -Slow types are exports without explicit type annotations. They prevent JSR from generating `.d.ts` files efficiently and degrade npm compatibility by 1.5-2x slower type checking. +Slow types are exports without explicit type annotations. They prevent JSR from generating `.d.ts` +files efficiently and degrade npm compatibility by 1.5-2x slower type checking. ### Function Return Types ```typescript // SLOW - inferred return type export function greet(name: string) { - return "Hello, " + name + "!"; + return 'Hello, ' + name + '!'; } // FIXED - explicit return type export function greet(name: string): string { - return "Hello, " + name + "!"; + return 'Hello, ' + name + '!'; } ``` @@ -261,7 +289,8 @@ deno publish --dry-run deno doc --lint ``` -**Note**: TypeScript 5.5's `isolatedDeclarations` mode produces code that automatically satisfies JSR's no-slow-types requirement. +**Note**: TypeScript 5.5's `isolatedDeclarations` mode produces code that automatically satisfies +JSR's no-slow-types requirement. --- @@ -269,13 +298,13 @@ deno doc --lint JSR enforces ESM-only architecture: -| Prohibited | Alternative | -|------------|-------------| -| `require()` | `import` | -| `module.exports` | `export` | -| `declare global` | Module-scoped types | -| `declare module` | Module-scoped types | -| HTTP imports | `jsr:`, `npm:`, `node:` specifiers only | +| Prohibited | Alternative | +| ---------------- | --------------------------------------- | +| `require()` | `import` | +| `module.exports` | `export` | +| `declare global` | Module-scoped types | +| `declare module` | Module-scoped types | +| HTTP imports | `jsr:`, `npm:`, `node:` specifiers only | --- @@ -294,10 +323,11 @@ For packages with multiple exports: ``` Users import as: + ```typescript -import { main } from "@scope/pkg"; -import { OpenAI } from "@scope/pkg/providers"; -import { helper } from "@scope/pkg/utils"; +import { main } from '@scope/pkg'; +import { OpenAI } from '@scope/pkg/providers'; +import { helper } from '@scope/pkg/utils'; ``` Each entry point should have its own `@module` JSDoc tag. @@ -318,6 +348,7 @@ Declare in `imports`: ``` Supported specifiers: + - `jsr:@scope/pkg@version` - JSR packages - `npm:package@version` - npm packages - `node:module` - Node.js built-ins @@ -339,7 +370,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - id-token: write # Required for OIDC and provenance + id-token: write # Required for OIDC and provenance steps: - uses: actions/checkout@v5 @@ -350,6 +381,7 @@ jobs: ``` **Requirements for provenance:** + 1. Link package to GitHub repo in JSR settings 2. Include `id-token: write` permission 3. Provenance generated automatically @@ -365,31 +397,35 @@ After completing the audit: ```markdown ## JSR Publishing Audit Results -| Check | Status | -|-------|--------| -| Required metadata | ✓ / ✗ | -| Scoped package name | ✓ / ✗ | -| Package description | ✓ / ✗ | -| Valid exports | ✓ / ✗ | -| No slow types | ✓ / ✗ | -| Clean file list | ✓ / ✗ | -| ESM only | ✓ / ✗ | -| Module documentation | ✓ / ✗ | -| Symbol documentation | ✓ / ✗ | +| Check | Status | +| -------------------- | ------ | +| Required metadata | ✓ / ✗ | +| Scoped package name | ✓ / ✗ | +| Package description | ✓ / ✗ | +| Valid exports | ✓ / ✗ | +| No slow types | ✓ / ✗ | +| Clean file list | ✓ / ✗ | +| ESM only | ✓ / ✗ | +| Module documentation | ✓ / ✗ | +| Symbol documentation | ✓ / ✗ | ### Estimated Score Impact + - Documentation: X/4 factors - Best Practices: X/2 factors - Discoverability: X/1 factors - Compatibility: X/2 factors ### Files Published + [List from dry-run] ### Issues Found + [List any problems] ### Recommendations + [Suggested fixes prioritized by score impact] ``` @@ -425,3 +461,17 @@ deno publish - **JSX publishing**: Not supported - **HTTP imports**: Prohibited - **Complex inference**: Libraries like Zod/ArkType may require `--allow-slow-types` + +--- + +## What NetScript doesn't do yet + +> **Status: draft — pending user approval before becoming mandatory.** + +- **Automated JSR score monitoring** — No CI gate enforces a minimum score. Workaround: manual audit + before publish. +- **Cross-package JSR workspace publishing** — Each package publishes independently. Workaround: + publish in dependency order. +- **JSR badge generation** — No automated badge for README. Workaround: manual badge from `jsr.io`. +- **Private JSR packages** — Not yet available. Workaround: public scoped packages with internal + documentation. Tracked by JSR. diff --git a/.agents/skills/netscript-doctrine/SKILL.md b/.agents/skills/netscript-doctrine/SKILL.md index f3df426c6..64011b7f5 100644 --- a/.agents/skills/netscript-doctrine/SKILL.md +++ b/.agents/skills/netscript-doctrine/SKILL.md @@ -11,87 +11,71 @@ description: > # NetScript Doctrine Skill -This skill is a navigator. The doctrine remains authoritative; read the relevant -doctrine file before changing or evaluating package/plugin code. +This skill is a navigator. The doctrine remains authoritative; read the relevant doctrine file +before changing or evaluating package/plugin code. -## Activation +## When to Use -Use this skill when work touches or describes: +- Work touches or describes `packages/` or `plugins/`. +- Public `@netscript/*` exports need design or review. +- Package READMEs or JSR readiness need evaluation. +- Architecture debt entries need creation or closure. +- Harness plans/evaluations for package or plugin work. -- `packages/` -- `plugins/` -- public `@netscript/*` exports -- package READMEs or JSR readiness -- architecture debt entries -- harness plans/evaluations for package or plugin work +## When Not to Use -For app, service, frontend, or infrastructure work, use this skill only when the -work changes or evaluates package/plugin surfaces. +- For app, service, frontend, or infrastructure work that does **not** change or evaluate + package/plugin surfaces — use the relevant scope overlay or domain skill instead. +- For JSR publishability audits — use `jsr-audit`. +- For harness orchestration — use `netscript-harness`. -## Doctrine Files +## Key Concepts -| File | Load when | -|------|-----------| -| `.llm/research/architecture-doctrine-docs-v2/doctrine/01-thesis-and-axioms.md` | Starting any doctrine-aware run | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/02-public-surface.md` | Exports, `mod.ts`, README, JSR docs | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/03-base-and-derived-classes.md` | Classes, inheritance, runners | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/04-modules-and-helpers.md` | Helpers, adapters, `@std/*`, Web Platform | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/05-folder-structure.md` | Folder shape, layering, naming | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/06-archetypes.md` | Archetype selection | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/07-composition-and-extension.md` | Composition root, DI, extension axes | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/08-runtime-state-failure.md` | Stateful runtimes, sagas, workers, triggers | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/09-anti-patterns-and-fitness-functions.md` | AP catalog and F gates | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/10-codebase-verdict-and-handoff.md` | Current verdicts and remediation priorities | +| Concept | Meaning | +| --------------------- | -------------------------------------------------------------------------------------------------- | +| **Doctrine** | The 10-file architecture specification under `docs/architecture/doctrine/`. Append-only. | +| **Archetype** | One of six package shapes (1 Small Contract … 6 CLI/Tooling). Determines minimum viable structure. | +| **Axiom** | A1–A14: foundational assumptions every package must respect. | +| **Anti-Pattern (AP)** | AP-1..AP-20: common mistakes the evaluator checks for. | +| **Fitness Gate (F)** | F-1..F-18: automated checks per archetype. | +| **Layering** | `domain` → `ports` → `application` → `adapters` → `presentation`. | +| **Debt** | Recorded violations in `.llm/harness/debt/arch-debt.md` with owner, target, and closing gate. | -## Archetype Selection +### Archetype Selection Use `.llm/harness/archetypes/README.md` for the run-time decision tree. -| Archetype | Use | -|-----------|-----| -| 1 Small Contract | types, schemas, invariants, little runtime | -| 2 Integration | external systems, ports, adapters | -| 3 Runtime/Behavior | long-running behavior, state, lifecycle, supervision | -| 4 Public DSL/Builder | fluent builders and definition APIs | -| 5 Plugin Package | first-party `plugins/*` packages | -| 6 CLI/Tooling | binaries, commands, scaffold/deploy flows | - -If two archetypes apply, choose the larger one and fold the smaller concern -inside it. - -## Axiom Quick Reference - -| Axiom | Summary | -|-------|---------| -| A1 | Public types first. | -| A2 | Simple over easy at published boundaries. | -| A3 | 80 percent path is one chained call. | -| A4 | Base classes are stub-only contracts. | -| A5 | Composition over inheritance. | -| A6 | Helpers must be justified. | -| A7 | Web Platform and `@std/*` first. | -| A8 | One concern per folder; one reason per file. | -| A9 | Archetype drives package shape. | -| A10 | Composition root over container. | -| A11 | Name extension axes before abstraction. | -| A12 | Durable workflows are state machines. | -| A13 | Crash boundaries are explicit. | -| A14 | Tests and gates preserve doctrine. | - -## Anti-Pattern Quick Reference - -Use `.llm/harness/evaluator/anti-pattern-catalog.md` for evaluator wording. -Use doctrine file 09 for full definitions and examples. - -## Fitness Gates - -Gate definitions live in `.llm/harness/gates/fitness-gates.md`; the matrix -lives in `.llm/harness/gates/archetype-gate-matrix.md`. - -Phase A note: script files are not implemented yet. Record gates as -`PENDING_SCRIPT` with manual evidence until later phases add scripts. - -## Layering Quick Reference +| Archetype | Use | +| -------------------- | ---------------------------------------------------- | +| 1 Small Contract | types, schemas, invariants, little runtime | +| 2 Integration | external systems, ports, adapters | +| 3 Runtime/Behavior | long-running behavior, state, lifecycle, supervision | +| 4 Public DSL/Builder | fluent builders and definition APIs | +| 5 Plugin Package | first-party `plugins/*` packages | +| 6 CLI/Tooling | binaries, commands, scaffold/deploy flows | + +If two archetypes apply, choose the larger one and fold the smaller concern inside it. + +### Axiom Quick Reference + +| Axiom | Summary | +| ----- | -------------------------------------------- | +| A1 | Public types first. | +| A2 | Simple over easy at published boundaries. | +| A3 | 80 percent path is one chained call. | +| A4 | Base classes are stub-only contracts. | +| A5 | Composition over inheritance. | +| A6 | Helpers must be justified. | +| A7 | Web Platform and `@std/*` first. | +| A8 | One concern per folder; one reason per file. | +| A9 | Archetype drives package shape. | +| A10 | Composition root over container. | +| A11 | Name extension axes before abstraction. | +| A12 | Durable workflows are state machines. | +| A13 | Crash boundaries are explicit. | +| A14 | Tests and gates preserve doctrine. | + +### Layering Quick Reference Source: doctrine file 05. @@ -102,25 +86,71 @@ Source: doctrine file 05. - `presentation/` imports `application/` and `domain/`; not `adapters/`. - `testing/` imports public surface and testing adapters only. -## Folder Vocabulary +### Folder Vocabulary Use doctrine file 05 for definitions. Allowed role names include: -`domain`, `ports`, `application`, `adapters`, `runtime`, `state`, -`middleware`, `presets`, `registry`, `diagnostics`, `presentation`, `testing`, -`internal`, `tests`, and `examples`. - -Generic `utils`, `helpers`, `common`, `lib`, and `interfaces` folders are -doctrine findings unless a migration plan and debt entry explicitly cover them. - -## Debt Handling - -Use `.llm/harness/debt/arch-debt.md` and -`.llm/harness/templates/debt-entry.md`. - -Rules: - -- record violations that cannot be fixed in the current run, -- require owner, target, reason, linked plan, status, and closing gate, -- do not deepen existing debt without updating its entry, -- close entries only with gate evidence. +`domain`, `ports`, `application`, `adapters`, `runtime`, `state`, `middleware`, `presets`, +`registry`, `diagnostics`, `presentation`, `testing`, `internal`, `tests`, and `examples`. + +Generic `utils`, `helpers`, `common`, `lib`, and `interfaces` folders are doctrine findings unless a +migration plan and debt entry explicitly cover them. + +## Workflow + +1. Identify the affected package/plugin surfaces. +2. Select the smallest archetype that fits (use `.llm/harness/archetypes/README.md`). +3. Read the relevant doctrine file(s) from the table below. +4. Apply the axiom and anti-pattern checks. +5. Verify layering and folder vocabulary. +6. Record any new or deepened debt. + +## Common Pitfalls + +- **Treating archetype as a folder template** — The archetype is a design constraint, not a + checklist of folders to create. Every file must trace back to a concept named in the design + checkpoint. +- **Duplicating doctrine into skills** — Skills point to doctrine files; they do not copy passages. + The doctrine is the single source of truth. +- **Ignoring debt registry** — New violations must be recorded with a closing gate and owner. + Unrecorded violations are `FAIL_DEBT`. + +## What NetScript doesn't do yet + +> **Status: draft — pending user approval before becoming mandatory.** + +- **Private JSR packages** — Not yet available. Workaround: use public packages with scoped names + and internal documentation. Tracked by JSR. +- **Automated fitness gate scripts** — Phase A; gates are run manually or reported as + `PENDING_SCRIPT`. Workaround: manual evidence in `worklog.md`. +- **Cross-package refactoring assistant** — No automated tool renames symbols across packages. + Workaround: `grep` + manual refactor. +- **Visual architecture diagram generation** — No tool generates diagrams from the doctrine. + Workaround: maintain diagrams manually in `docs/`. + +## Reference Files + +| File | Load when | +| ---------------------------------------------------------------------- | ------------------------------------------- | +| `docs/architecture/doctrine/01-thesis-and-axioms.md` | Starting any doctrine-aware run | +| `docs/architecture/doctrine/02-public-surface.md` | Exports, `mod.ts`, README, JSR docs | +| `docs/architecture/doctrine/03-base-and-derived-classes.md` | Classes, inheritance, runners | +| `docs/architecture/doctrine/04-modules-and-helpers.md` | Helpers, adapters, `@std/*`, Web Platform | +| `docs/architecture/doctrine/05-folder-structure.md` | Folder shape, layering, naming | +| `docs/architecture/doctrine/06-archetypes.md` | Archetype selection | +| `docs/architecture/doctrine/07-composition-and-extension.md` | Composition root, DI, extension axes | +| `docs/architecture/doctrine/08-runtime-state-failure.md` | Stateful runtimes, sagas, workers, triggers | +| `docs/architecture/doctrine/09-anti-patterns-and-fitness-functions.md` | AP catalog and F gates | +| `docs/architecture/doctrine/10-codebase-verdict-and-handoff.md` | Current verdicts and remediation priorities | +| `.llm/harness/archetypes/README.md` | Run-time archetype decision tree | +| `.llm/harness/gates/archetype-gate-matrix.md` | Required gates per archetype | +| `.llm/harness/evaluator/anti-pattern-catalog.md` | Evaluator wording for AP findings | +| `.llm/harness/debt/arch-debt.md` | Persistent architecture debt registry | + +## Checklist + +- [ ] The correct archetype is selected and justified. +- [ ] Relevant doctrine file(s) were read before making changes. +- [ ] Layering rules are respected (no forbidden imports). +- [ ] Folder vocabulary uses allowed role names only. +- [ ] New or deepened debt is recorded in `arch-debt.md`. diff --git a/.agents/skills/netscript-harness/SKILL.md b/.agents/skills/netscript-harness/SKILL.md index ddc030a0c..715707478 100644 --- a/.agents/skills/netscript-harness/SKILL.md +++ b/.agents/skills/netscript-harness/SKILL.md @@ -12,74 +12,92 @@ description: > This skill coordinates harness-mode runs. The authoritative harness docs live under `.llm/harness/`; this skill tells you what to load and in what order. -## 1. Activation - -The harness activates on any prompt containing `use harness` or an equivalent request for a -harnessed run. - -On activation, read: - -1. `.llm/harness/workflow/activation.md` -2. `.llm/harness/workflow/run-loop.md` -3. `.llm/tmp/run//context-pack.md` if resuming -4. `.llm/harness/archetypes/README.md` -5. selected `ARCHETYPE-*` profile and any `SCOPE-*` overlays -6. `.llm/harness/gates/archetype-gate-matrix.md` -7. `.llm/harness/gates/plan-gate.md` and `.llm/harness/evaluator/plan-protocol.md` - -For package/plugin work, also use `.claude/skills/netscript-doctrine/SKILL.md`. - -For a **supervisor run** (two or more capability-scoped phase groups), also read -`.llm/harness/workflow/supervisor.md` and `.llm/harness/workflow/escalation.md`, and track the -groups in `phase-registry.md`. - -## 2. From Prompt Profile to v2 Profile - -The user may still write `profile: package`, `profile: docs`, or similar. In v2 that field is an -intent hint, not the final profile. - -| User hint | v2 selection | -| -------------------------- | ----------------------------------------------------------- | -| `package` | identify `ARCHETYPE-1` through `ARCHETYPE-6` | -| `plugin` | normally `ARCHETYPE-5`, unless sibling packages also change | -| `frontend` | affected archetype(s) plus `SCOPE-frontend.md` | -| `service` | affected archetype(s) plus `SCOPE-service.md` | -| `docs` or `knowledge-base` | `SCOPE-docs.md` plus any described archetypes | - -If no package/plugin is touched, an overlay-only run is valid. - -## 3. Run ID - -`` is the current branch name with `/` replaced by `-`, followed by `--`. - -Example: - -```text -feat/frontend-rfc-implementation -> feat-frontend-rfc-implementation--package-kv-refactor -``` - -## 4. Run Artifacts +## When to Use + +- The user says `use harness` or asks for a harnessed run. +- Selecting archetypes, scope overlays, or gate sets. +- Tracking run artifacts, commits, or drift. +- Understanding evaluator protocol (PLAN-EVAL or IMPL-EVAL). +- Deciding where a lesson or doctrine update should live. + +## When Not to Use + +- For package/plugin architecture decisions — use `netscript-doctrine`. +- For JSR readiness audits — use `jsr-audit`. +- For frontend/framework-specific questions — use `deno-fresh` or the relevant domain skill. + +## Key Concepts + +| Concept | Meaning | +| ----------------- | --------------------------------------------------------------------------------------- | +| **8-phase model** | Bootstrap → Research → Plan & Design → Plan-Gate → Implement → Gate → Evaluate → Close. | +| **PLAN-EVAL** | First evaluator pass, before implementation. Hard stop. | +| **IMPL-EVAL** | Final evaluator pass, after implementation. | +| **Plan-Gate** | Checklist (`gates/plan-gate.md`) that PLAN-EVAL enforces. | +| **Archetype** | Package/plugin shape profile from `archetypes/ARCHETYPE-*.md`. | +| **Scope overlay** | `SCOPE-frontend.md`, `SCOPE-service.md`, `SCOPE-docs.md`. | +| **Run artifact** | File in `.llm/tmp/run//` that preserves state across sessions. | +| **Debt** | Recorded in `.llm/harness/debt/arch-debt.md`. | + +## Workflow + +1. Read `workflow/activation.md` and `workflow/run-loop.md`. +2. If resuming, read `.llm/tmp/run//context-pack.md`. +3. Identify the target surface and select archetype + overlays. +4. Read `gates/archetype-gate-matrix.md` and `gates/plan-gate.md`. +5. Scaffold run artifacts from `templates/`. +6. Produce `research.md`, then `plan.md` with locked decisions. +7. Record Design checkpoint in `worklog.md`. +8. **Run PLAN-EVAL (separate session). No implementation before PASS.** +9. Implement one commit slice at a time; append `commits.md` after each. +10. Run gates; record results in `worklog.md`. +11. **Run IMPL-EVAL (separate session).** +12. Close: update `context-pack.md`, `arch-debt.md`, and promote lessons if warranted. + +## Common Pitfalls + +- **Skipping Plan & Design** — The Plan-Gate is a hard stop. Implementation before PLAN-EVAL `PASS` + is a process failure. +- **Self-evaluation** — The evaluator must be a separate session. The generator does not + self-certify. +- **Carried-in plans as ground truth** — Re-baseline against current `main` before locking the plan. +- **Monolithic commits** — Commit by slice, not by monolith. Each slice has its own gate. + +## What NetScript doesn't do yet + +> **Status: draft — pending user approval before becoming mandatory.** + +- **Automated fitness gate scripts** — Phase A; most gates are manual or `PENDING_SCRIPT`. + Workaround: manual evidence in `worklog.md`. +- **Parallel group execution** — Supervisor runs launch groups sequentially. Workaround: design + groups to be independent; merge order matters. +- **Automatic archetype detection** — The agent must select the archetype manually. Workaround: use + the decision tree in `archetypes/README.md`. +- **Real-time drift monitoring** — Drift is logged manually in `drift.md`. Workaround: append after + significant steps. + +## Run Artifacts Run artifacts live under `.llm/tmp/run//` and use templates from `.llm/harness/templates/`. -| File | Purpose | -| ------------------- | -------------------------------------------------------------- | -| `research.md` | deep findings, re-baseline of carried-in plans | -| `plan.md` | approved scope, archetype, gates, debt implications | -| `implement.md` | generator prompt when needed | -| `worklog.md` | implementation evidence and gate results | -| `plan-eval.md` | PLAN-EVAL verdict (separate session, before implementation) | -| `evaluate.md` | IMPL-EVAL verdict (separate session, after implementation) | -| `context-pack.md` | resumable summary | -| `drift.md` | append-only drift log | -| `commits.md` | append-only commit list | -| `phase-registry.md` | supervisor runs only: phase-group map + live status (template) | +| File | Purpose | +| ------------------- | ----------------------------------------------------------- | +| `research.md` | deep findings, re-baseline of carried-in plans | +| `plan.md` | approved scope, archetype, gates, debt implications | +| `implement.md` | generator prompt when needed | +| `worklog.md` | implementation evidence and gate results | +| `plan-eval.md` | PLAN-EVAL verdict (separate session, before implementation) | +| `evaluate.md` | IMPL-EVAL verdict (separate session, after implementation) | +| `context-pack.md` | resumable summary | +| `drift.md` | append-only drift log | +| `commits.md` | append-only commit list | +| `phase-registry.md` | supervisor runs only: phase-group map + live status | Append `commits.md` immediately after every commit. Supervisor runs additionally keep `phase-registry.md`, `final-pr-handoff.md`, and an `escalations/` folder; brief each group agent with `templates/agent-briefing.md`. -## 5. `.llm/tmp` Path Caveat +## `.llm/tmp` Path Caveat Some search/index tools may skip or lag on `.llm/tmp/`. Verify run paths with a direct filesystem listing when needed: @@ -88,7 +106,7 @@ listing when needed: dir /s /b ".llm\tmp\run\" 2>&1 ``` -## 6. Resource Aggregation +## Resource Aggregation When external docs or examples matter: @@ -98,7 +116,7 @@ When external docs or examples matter: 4. save useful extracts to `.llm/tmp/docs/-.md`, 5. cite the extract in the run artifact. -## 7. Evaluator Separation +## Evaluator Separation There are **two** separate-session evaluator passes. @@ -118,7 +136,7 @@ There are **two** separate-session evaluator passes. - Evaluator writes `evaluate.md` with `PASS`, `FAIL_FIX`, `FAIL_RESCOPE`, or `FAIL_DEBT`. - Eval loop limit is two failures before escalation. -## 8. Commit Tracking +## Commit Tracking When a run requires commits: @@ -133,21 +151,21 @@ Commit log format: - : ``` -## 9. Rescoping +## Rescoping Rescope when the real work is materially larger than the approved plan or when the selected archetype is wrong. Confirm with the user before expanding scope. Record rescope evidence in `drift.md` with severity `significant` or `architectural`. -## 10. Where Lessons Belong +## Where Lessons Belong | Content type | Destination | | --------------------------------------------- | ------------------------------------ | | Generic run mechanics | `.llm/harness/workflow/` | | Archetype-specific gates or false-done states | `.llm/harness/archetypes/` | | Stable repeated cross-run lessons | `.llm/harness/lessons/` | -| Package/plugin doctrine navigation | `.claude/skills/netscript-doctrine/` | +| Package/plugin doctrine navigation | `.agents/skills/netscript-doctrine/` | | Deep domain expertise | a focused skill | | Deferred doctrine violations | `.llm/harness/debt/arch-debt.md` | @@ -167,3 +185,28 @@ User says "use harness" -> discovered violation not fixed? update arch-debt.md -> evaluator is separate session ``` + +## Reference Files + +| File | Load when | +| ----------------------------------------------- | --------------------------- | +| `.llm/harness/workflow/activation.md` | Every harness run | +| `.llm/harness/workflow/run-loop.md` | Every harness run | +| `.llm/harness/workflow/supervisor.md` | Multi-group supervisor runs | +| `.llm/harness/gates/plan-gate.md` | Plan-Gate checklist | +| `.llm/harness/evaluator/plan-protocol.md` | PLAN-EVAL instructions | +| `.llm/harness/evaluator/protocol.md` | IMPL-EVAL instructions | +| `.llm/harness/evaluator/verdict-definitions.md` | Verdict meanings | +| `.llm/harness/gates/archetype-gate-matrix.md` | Gate selection | +| `.llm/harness/archetypes/README.md` | Archetype selection | +| `.llm/harness/templates/` | Run artifact scaffolding | +| `.llm/harness/debt/arch-debt.md` | Debt registry | + +## Checklist + +- [ ] `workflow/activation.md` and `workflow/run-loop.md` were read. +- [ ] Archetype and overlays are selected and justified. +- [ ] Plan-Gate checklist (`gates/plan-gate.md`) was reviewed. +- [ ] PLAN-EVAL returned `PASS` before any implementation slice. +- [ ] Commits are appended to `commits.md` immediately after creation. +- [ ] IMPL-EVAL is a separate session from the generator. diff --git a/.agents/skills/netscript-standards/SKILL.md b/.agents/skills/netscript-standards/SKILL.md index 2e2da96a1..6a7d9cf43 100644 --- a/.agents/skills/netscript-standards/SKILL.md +++ b/.agents/skills/netscript-standards/SKILL.md @@ -10,14 +10,27 @@ description: > This skill has been superseded by the doctrine-aligned skill: -- `.claude/skills/netscript-doctrine/SKILL.md` +- `.agents/skills/netscript-doctrine/SKILL.md` Authoritative sources now live at: -- `.llm/research/architecture-doctrine-docs-v2/doctrine/` +- `docs/architecture/doctrine/` - `.llm/harness/archetypes/` - `.llm/harness/gates/` - `.llm/harness/debt/arch-debt.md` -Do not use this file as a source of standards. Load `netscript-doctrine` -instead. +Do not use this file as a source of standards. Load `netscript-doctrine` instead. + +## When to Use + +Never. Use `netscript-doctrine` for all package/plugin architecture work. + +## When Not to Use + +Always. This skill is legacy and retained only for historical reference. + +## What NetScript doesn't do yet + +> **Status: draft — pending user approval before becoming mandatory.** + +- This skill does not provide current guidance. The doctrine supersedes it entirely. diff --git a/.llm/harness/DOCTRINE-REF.md b/.llm/harness/DOCTRINE-REF.md index 165c0dff3..3a4e4fd71 100644 --- a/.llm/harness/DOCTRINE-REF.md +++ b/.llm/harness/DOCTRINE-REF.md @@ -22,18 +22,18 @@ it. ## Doctrine Primary Files -| File | Use | -| ------------------------------------------------------------------------------------------------ | -------------------------------------------------------- | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/01-thesis-and-axioms.md` | Thesis and A1-A14 | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/02-public-surface.md` | Public exports, `mod.ts`, README and JSR surface | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/03-base-and-derived-classes.md` | Stub-only bases, inheritance limits | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/04-modules-and-helpers.md` | Helpers, adapters, Web Platform and `@std/*` first | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/05-folder-structure.md` | Role vocabulary, layering, file shape | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/06-archetypes.md` | Six package archetypes and selection order | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/07-composition-and-extension.md` | Composition roots, constructor injection, extension axes | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/08-runtime-state-failure.md` | Stateful runtime, supervision, cancellation, failure | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/09-anti-patterns-and-fitness-functions.md` | AP-1..AP-20 and F-1..F-15 | -| `.llm/research/architecture-doctrine-docs-v2/doctrine/10-codebase-verdict-and-handoff.md` | Current verdict per package and debt seed | +| File | Use | +| ---------------------------------------------------------------------- | -------------------------------------------------------- | +| `docs/architecture/doctrine/01-thesis-and-axioms.md` | Thesis and A1-A14 | +| `docs/architecture/doctrine/02-public-surface.md` | Public exports, `mod.ts`, README and JSR surface | +| `docs/architecture/doctrine/03-base-and-derived-classes.md` | Stub-only bases, inheritance limits | +| `docs/architecture/doctrine/04-modules-and-helpers.md` | Helpers, adapters, Web Platform and `@std/*` first | +| `docs/architecture/doctrine/05-folder-structure.md` | Role vocabulary, layering, file shape | +| `docs/architecture/doctrine/06-archetypes.md` | Six package archetypes and selection order | +| `docs/architecture/doctrine/07-composition-and-extension.md` | Composition roots, constructor injection, extension axes | +| `docs/architecture/doctrine/08-runtime-state-failure.md` | Stateful runtime, supervision, cancellation, failure | +| `docs/architecture/doctrine/09-anti-patterns-and-fitness-functions.md` | AP-1..AP-20 and F-1..F-15 | +| `docs/architecture/doctrine/10-codebase-verdict-and-handoff.md` | Current verdict per package and debt seed | ## Axiom Digest diff --git a/.llm/harness/README.md b/.llm/harness/README.md index 8fb8e0a54..be8a0924d 100644 --- a/.llm/harness/README.md +++ b/.llm/harness/README.md @@ -6,7 +6,7 @@ Architecture Doctrine. Authoritative doctrine: -- `.llm/research/architecture-doctrine-docs-v2/doctrine/` +- `docs/architecture/doctrine/` Do not copy doctrine passages into harness files. Harness files point to the doctrine and explain how an agent uses it during a run. diff --git a/.llm/harness/archetypes/ARCHETYPE-1-small-contract.md b/.llm/harness/archetypes/ARCHETYPE-1-small-contract.md index 8166545cc..1eaa03716 100644 --- a/.llm/harness/archetypes/ARCHETYPE-1-small-contract.md +++ b/.llm/harness/archetypes/ARCHETYPE-1-small-contract.md @@ -4,11 +4,11 @@ - Axioms: A1, A2, A6, A7, A8, A9, A14. - Primary sections: - - `doctrine/02-public-surface.md` - - `doctrine/04-modules-and-helpers.md` - - `doctrine/05-folder-structure.md` - - `doctrine/06-archetypes.md#archetype-1--small-contract` - - `doctrine/09-anti-patterns-and-fitness-functions.md` + - `docs/architecture/doctrine/02-public-surface.md` + - `docs/architecture/doctrine/04-modules-and-helpers.md` + - `docs/architecture/doctrine/05-folder-structure.md` + - `docs/architecture/doctrine/06-archetypes.md#archetype-1--small-contract` + - `docs/architecture/doctrine/09-anti-patterns-and-fitness-functions.md` - Anti-patterns: AP-1, AP-2, AP-7, AP-9, AP-13, AP-14, AP-15, AP-16, AP-20. - Fitness functions: F-1, F-5, F-6, F-7, F-8, F-10, F-11, F-12, F-14, F-15. @@ -18,12 +18,12 @@ Use this profile for packages whose value is a clear public contract: types, sch identifiers, parse/validation helpers, and small invariants. If the work introduces adapters, runtime lifecycle, state, or a fluent API as the main product, select a larger archetype. -Current examples are listed in `doctrine/06-archetypes.md` under "Archetype assignments for current +Current examples are listed in `docs/architecture/doctrine/06-archetypes.md` under "Archetype assignments for current packages." ## Minimum Folder Shape -Use the canonical shape in `doctrine/06-archetypes.md#archetype-1--small-contract`. The review +Use the canonical shape in `docs/architecture/doctrine/06-archetypes.md#archetype-1--small-contract`. The review question is not whether every folder exists; it is whether the package stayed small and avoided invented layers. @@ -36,8 +36,8 @@ invented layers. 1. This profile. 2. `../gates/archetype-gate-matrix.md`. -3. `doctrine/06-archetypes.md#archetype-1--small-contract`. -4. `doctrine/02-public-surface.md`. +3. `docs/architecture/doctrine/06-archetypes.md#archetype-1--small-contract`. +4. `docs/architecture/doctrine/02-public-surface.md`. 5. The package README, `mod.ts`, `deno.json`, and tests. 6. Relevant debt entries in `../debt/arch-debt.md`. diff --git a/.llm/harness/archetypes/ARCHETYPE-2-integration.md b/.llm/harness/archetypes/ARCHETYPE-2-integration.md index d214f9a93..c7f019ab3 100644 --- a/.llm/harness/archetypes/ARCHETYPE-2-integration.md +++ b/.llm/harness/archetypes/ARCHETYPE-2-integration.md @@ -4,11 +4,11 @@ - Axioms: A1, A2, A4, A5, A6, A7, A8, A9, A10, A11, A14. - Primary sections: - - `doctrine/04-modules-and-helpers.md` - - `doctrine/05-folder-structure.md` - - `doctrine/06-archetypes.md#archetype-2--integration` - - `doctrine/07-composition-and-extension.md` - - `doctrine/09-anti-patterns-and-fitness-functions.md` + - `docs/architecture/doctrine/04-modules-and-helpers.md` + - `docs/architecture/doctrine/05-folder-structure.md` + - `docs/architecture/doctrine/06-archetypes.md#archetype-2--integration` + - `docs/architecture/doctrine/07-composition-and-extension.md` + - `docs/architecture/doctrine/09-anti-patterns-and-fitness-functions.md` - Anti-patterns: AP-1, AP-2, AP-3, AP-4, AP-5, AP-7, AP-8, AP-9, AP-11, AP-13, AP-14, AP-16, AP-17, AP-19, AP-20. - Fitness functions: F-1, F-2, F-3, F-4, F-5, F-6, F-7, F-8, F-9, F-10, F-11, F-12, F-14, F-15. @@ -21,7 +21,7 @@ package has a real external dependency axis or more than one credible adapter. ## Minimum Folder Shape -Use the canonical shape in `doctrine/06-archetypes.md#archetype-2--integration`. The important +Use the canonical shape in `docs/architecture/doctrine/06-archetypes.md#archetype-2--integration`. The important boundary is package-owned ports plus named adapters. A one-adapter package does not invent a port unless the doctrine criteria are met. @@ -33,9 +33,9 @@ unless the doctrine criteria are met. ## Read First -1. `doctrine/06-archetypes.md#archetype-2--integration`. -2. `doctrine/04-modules-and-helpers.md` adapter and port sections. -3. `doctrine/07-composition-and-extension.md`. +1. `docs/architecture/doctrine/06-archetypes.md#archetype-2--integration`. +2. `docs/architecture/doctrine/04-modules-and-helpers.md` adapter and port sections. +3. `docs/architecture/doctrine/07-composition-and-extension.md`. 4. The package README, exports, `deno.json`, and existing adapters. 5. Direct consumers that import the port or adapter. 6. Relevant debt entries. diff --git a/.llm/harness/archetypes/ARCHETYPE-3-runtime-behavior.md b/.llm/harness/archetypes/ARCHETYPE-3-runtime-behavior.md index e05309407..438de664b 100644 --- a/.llm/harness/archetypes/ARCHETYPE-3-runtime-behavior.md +++ b/.llm/harness/archetypes/ARCHETYPE-3-runtime-behavior.md @@ -4,11 +4,11 @@ - Axioms: A1, A2, A4, A5, A8, A9, A10, A11, A12, A13, A14. - Primary sections: - - `doctrine/03-base-and-derived-classes.md` - - `doctrine/05-folder-structure.md` - - `doctrine/06-archetypes.md#archetype-3--runtimebehavior` - - `doctrine/08-runtime-state-failure.md` - - `doctrine/09-anti-patterns-and-fitness-functions.md` + - `docs/architecture/doctrine/03-base-and-derived-classes.md` + - `docs/architecture/doctrine/05-folder-structure.md` + - `docs/architecture/doctrine/06-archetypes.md#archetype-3--runtimebehavior` + - `docs/architecture/doctrine/08-runtime-state-failure.md` + - `docs/architecture/doctrine/09-anti-patterns-and-fitness-functions.md` - Anti-patterns: AP-1, AP-3, AP-4, AP-5, AP-6, AP-8, AP-10, AP-11, AP-12, AP-13, AP-16, AP-17, AP-19, AP-20. - Fitness functions: F-1, F-2, F-3, F-4, F-5, F-6, F-7, F-8, F-9, F-10, F-11, F-12, F-13, F-14, @@ -20,11 +20,11 @@ Use this profile when the package owns long-running behavior: workers, triggers, runtimes, supervisors, dispatch loops, retry, delivery, or stateful lifecycle. Sagas use this profile with the state-machine specialization described in -`doctrine/08-runtime-state-failure.md`. +`docs/architecture/doctrine/08-runtime-state-failure.md`. ## Minimum Folder Shape -Use the canonical shape in `doctrine/06-archetypes.md#archetype-3--runtimebehavior`. The package +Use the canonical shape in `docs/architecture/doctrine/06-archetypes.md#archetype-3--runtimebehavior`. The package needs named state, lifecycle, ports, runtime/application split, diagnostics, and tests that prove cancellation and failure behavior. @@ -36,9 +36,9 @@ cancellation and failure behavior. ## Read First -1. `doctrine/06-archetypes.md#archetype-3--runtimebehavior`. -2. `doctrine/08-runtime-state-failure.md`. -3. `doctrine/03-base-and-derived-classes.md` if classes or inheritance change. +1. `docs/architecture/doctrine/06-archetypes.md#archetype-3--runtimebehavior`. +2. `docs/architecture/doctrine/08-runtime-state-failure.md`. +3. `docs/architecture/doctrine/03-base-and-derived-classes.md` if classes or inheritance change. 4. The runtime README, definitions/builders, state model, runner, supervisor, adapters, and diagnostics. 5. Existing tests around retries, cancellation, delivery, and errors. diff --git a/.llm/harness/archetypes/ARCHETYPE-4-dsl-builder.md b/.llm/harness/archetypes/ARCHETYPE-4-dsl-builder.md index c70f556a2..3a355f862 100644 --- a/.llm/harness/archetypes/ARCHETYPE-4-dsl-builder.md +++ b/.llm/harness/archetypes/ARCHETYPE-4-dsl-builder.md @@ -4,11 +4,11 @@ - Axioms: A1, A2, A3, A6, A8, A9, A10, A11, A14. - Primary sections: - - `doctrine/02-public-surface.md` - - `doctrine/05-folder-structure.md` - - `doctrine/06-archetypes.md#archetype-4--public-dsl--builder` - - `doctrine/07-composition-and-extension.md` - - `doctrine/09-anti-patterns-and-fitness-functions.md` + - `docs/architecture/doctrine/02-public-surface.md` + - `docs/architecture/doctrine/05-folder-structure.md` + - `docs/architecture/doctrine/06-archetypes.md#archetype-4--public-dsl--builder` + - `docs/architecture/doctrine/07-composition-and-extension.md` + - `docs/architecture/doctrine/09-anti-patterns-and-fitness-functions.md` - Anti-patterns: AP-1, AP-2, AP-7, AP-8, AP-9, AP-11, AP-13, AP-14, AP-15, AP-16, AP-19, AP-20. - Fitness functions: F-1, F-2, F-3, F-4, F-5, F-6, F-7, F-8, F-9, F-10, F-11, F-12, F-14, F-15. @@ -20,7 +20,7 @@ materializes a long-running runtime, add the relevant runtime gates. ## Minimum Folder Shape -Use the canonical shape in `doctrine/06-archetypes.md#archetype-4--public-dsl--builder`. The builder +Use the canonical shape in `docs/architecture/doctrine/06-archetypes.md#archetype-4--public-dsl--builder`. The builder must be split by concern: entry function, builder class, state, validation, definition factory, and runtime only when needed. @@ -32,9 +32,9 @@ runtime only when needed. ## Read First -1. `doctrine/06-archetypes.md#archetype-4--public-dsl--builder`. -2. `doctrine/02-public-surface.md`. -3. `doctrine/07-composition-and-extension.md`. +1. `docs/architecture/doctrine/06-archetypes.md#archetype-4--public-dsl--builder`. +2. `docs/architecture/doctrine/02-public-surface.md`. +3. `docs/architecture/doctrine/07-composition-and-extension.md`. 4. The README quick start, `mod.ts`, builders, definition types, and tests. 5. Consumers that call the builder chain. 6. Relevant debt entries. diff --git a/.llm/harness/archetypes/ARCHETYPE-5-plugin.md b/.llm/harness/archetypes/ARCHETYPE-5-plugin.md index f580d6af0..4fac5e610 100644 --- a/.llm/harness/archetypes/ARCHETYPE-5-plugin.md +++ b/.llm/harness/archetypes/ARCHETYPE-5-plugin.md @@ -4,11 +4,11 @@ - Axioms: A1, A2, A5, A7, A8, A9, A10, A11, A12, A13, A14. - Primary sections: - - `doctrine/05-folder-structure.md` - - `doctrine/06-archetypes.md#archetype-5--plugin-package` - - `doctrine/07-composition-and-extension.md#plugin-discovery-and-loading` - - `doctrine/08-runtime-state-failure.md` when plugin contributes runtime work - - `doctrine/09-anti-patterns-and-fitness-functions.md` + - `docs/architecture/doctrine/05-folder-structure.md` + - `docs/architecture/doctrine/06-archetypes.md#archetype-5--plugin-package` + - `docs/architecture/doctrine/07-composition-and-extension.md#plugin-discovery-and-loading` + - `docs/architecture/doctrine/08-runtime-state-failure.md` when plugin contributes runtime work + - `docs/architecture/doctrine/09-anti-patterns-and-fitness-functions.md` - Anti-patterns: AP-1, AP-3, AP-8, AP-9, AP-10, AP-11, AP-13, AP-14, AP-16, AP-19, AP-20. - Fitness functions: F-1, F-3, F-5, F-6, F-7, F-8, F-9, F-10, F-11, F-12, F-13 when runtime declarations require it, F-14, F-15. @@ -20,7 +20,7 @@ database/schema pieces, jobs, sagas, triggers, streams, or verification to the N ## Minimum Folder Shape -Use the canonical shape in `doctrine/06-archetypes.md#archetype-5--plugin-package`. The package +Use the canonical shape in `docs/architecture/doctrine/06-archetypes.md#archetype-5--plugin-package`. The package reuses sibling package contracts instead of redefining them and exposes explicit service/background entrypoints. @@ -32,8 +32,8 @@ entrypoints. ## Read First -1. `doctrine/06-archetypes.md#archetype-5--plugin-package`. -2. `doctrine/07-composition-and-extension.md#plugin-discovery-and-loading`. +1. `docs/architecture/doctrine/06-archetypes.md#archetype-5--plugin-package`. +2. `docs/architecture/doctrine/07-composition-and-extension.md#plugin-discovery-and-loading`. 3. Sibling package contracts the plugin re-exports or consumes. 4. Plugin `contracts.ts`, `mod.ts`, `deno.json`, verification file, services, database files, and runtime declarations. diff --git a/.llm/harness/archetypes/ARCHETYPE-6-cli-tooling.md b/.llm/harness/archetypes/ARCHETYPE-6-cli-tooling.md index b4a273e78..3983eec2f 100644 --- a/.llm/harness/archetypes/ARCHETYPE-6-cli-tooling.md +++ b/.llm/harness/archetypes/ARCHETYPE-6-cli-tooling.md @@ -9,12 +9,12 @@ - Axioms: A1, A2, A4, A5, A6, A7, A8, A9, A10, A11, A13, A14. - Primary sections: - - `doctrine/02-public-surface.md` - - `doctrine/03-base-and-derived-classes.md` (incl. R-BASE-L2) - - `doctrine/05-folder-structure.md` (incl. R-FOLD-CARD, R-FOLD-LAYERING-MODE, R-FOLD-AD-COLOC) - - `doctrine/06-archetypes.md#archetype-6--cli--tooling-package` - - `doctrine/07-composition-and-extension.md` (incl. R-COMP-DECL, R-COMP-EXT-MANIFEST) - - `doctrine/09-anti-patterns-and-fitness-functions.md` + - `docs/architecture/doctrine/02-public-surface.md` + - `docs/architecture/doctrine/03-base-and-derived-classes.md` (incl. R-BASE-L2) + - `docs/architecture/doctrine/05-folder-structure.md` (incl. R-FOLD-CARD, R-FOLD-LAYERING-MODE, R-FOLD-AD-COLOC) + - `docs/architecture/doctrine/06-archetypes.md#archetype-6--cli--tooling-package` + - `docs/architecture/doctrine/07-composition-and-extension.md` (incl. R-COMP-DECL, R-COMP-EXT-MANIFEST) + - `docs/architecture/doctrine/09-anti-patterns-and-fitness-functions.md` - Anti-patterns: AP-1, AP-2, AP-3, AP-4, AP-5, AP-6, AP-7, AP-8, AP-9, AP-11, AP-13, AP-14, AP-15, AP-16, AP-18, AP-19, AP-20, AP-21, AP-22, AP-23, AP-24, AP-25. - Universal fitness functions: F-1, F-2, F-3, F-4, F-5, F-6, F-7, F-8, F-9, F-10, F-11, F-12, F-15, @@ -244,10 +244,10 @@ Implementation lives in `.llm/tools/fitness/check-cli-*.ts`. Phase A runs may re ## Read First -1. `doctrine/06-archetypes.md#archetype-6--cli--tooling-package`. -2. `doctrine/05-folder-structure.md` (incl. R-FOLD-CARD, R-FOLD-LAYERING-MODE, R-FOLD-AD-COLOC). -3. `doctrine/03-base-and-derived-classes.md` (incl. R-BASE-L2). -4. `doctrine/07-composition-and-extension.md` (incl. R-COMP-DECL, R-COMP-EXT-MANIFEST). +1. `docs/architecture/doctrine/06-archetypes.md#archetype-6--cli--tooling-package`. +2. `docs/architecture/doctrine/05-folder-structure.md` (incl. R-FOLD-CARD, R-FOLD-LAYERING-MODE, R-FOLD-AD-COLOC). +3. `docs/architecture/doctrine/03-base-and-derived-classes.md` (incl. R-BASE-L2). +4. `docs/architecture/doctrine/07-composition-and-extension.md` (incl. R-COMP-DECL, R-COMP-EXT-MANIFEST). 5. The CLI's `mod.ts`, `maintainer.ts`, both `bin/*.ts`, both `/composition.ts`, the kernel `extension-points.ts`. 6. The current feature most relevant to the slice (one folder under diff --git a/.llm/harness/archetypes/README.md b/.llm/harness/archetypes/README.md index a8ade26c3..a0128cd92 100644 --- a/.llm/harness/archetypes/README.md +++ b/.llm/harness/archetypes/README.md @@ -4,7 +4,7 @@ Archetype profiles replace v1 task-category profiles for package and plugin work archetype defines the validation shape; scope overlays add frontend, service, or docs-specific checks. -Doctrine source: `.llm/research/architecture-doctrine-docs-v2/doctrine/06-archetypes.md`. +Doctrine source: `docs/architecture/doctrine/06-archetypes.md`. ## Decision Order diff --git a/.llm/harness/debt/arch-debt.md b/.llm/harness/debt/arch-debt.md index 64099b019..ba3844e13 100644 --- a/.llm/harness/debt/arch-debt.md +++ b/.llm/harness/debt/arch-debt.md @@ -1,7 +1,7 @@ # Architecture Debt Registry Seeded from -`.llm/research/architecture-doctrine-docs-v2/doctrine/10-codebase-verdict-and-handoff.md` on +`docs/architecture/doctrine/10-codebase-verdict-and-handoff.md` on 2026-04-29. Entries track packages with `Refactor`, `Restructure`, or `Rewrite` doctrine verdicts. `Keep` and `Defer` verdicts are not seeded here. diff --git a/.llm/harness/evaluator/anti-pattern-catalog.md b/.llm/harness/evaluator/anti-pattern-catalog.md index 1dd3d08ff..0b981b7aa 100644 --- a/.llm/harness/evaluator/anti-pattern-catalog.md +++ b/.llm/harness/evaluator/anti-pattern-catalog.md @@ -1,7 +1,7 @@ # Anti-Pattern Catalog Quick evaluator reference. Doctrine source: -`.llm/research/architecture-doctrine-docs-v2/doctrine/09-anti-patterns-and-fitness-functions.md#anti-pattern-catalog`. +`docs/architecture/doctrine/09-anti-patterns-and-fitness-functions.md#anti-pattern-catalog`. | AP | Summary | Typical evidence | | ----- | ---------------------------------------------------- | --------------------------------------------------------------------------- | diff --git a/.llm/harness/gates/archetype-gate-matrix.md b/.llm/harness/gates/archetype-gate-matrix.md index a395d58b9..464f900e2 100644 --- a/.llm/harness/gates/archetype-gate-matrix.md +++ b/.llm/harness/gates/archetype-gate-matrix.md @@ -1,7 +1,7 @@ # Archetype Gate Matrix This matrix is the source of truth for required gates per archetype. It mirrors the Phase A plan and -points back to `doctrine/09-anti-patterns-and-fitness-functions.md`. +points back to `docs/architecture/doctrine/09-anti-patterns-and-fitness-functions.md`. Legend: diff --git a/.llm/harness/gates/fitness-gates.md b/.llm/harness/gates/fitness-gates.md index f8137f395..4d2b81a3b 100644 --- a/.llm/harness/gates/fitness-gates.md +++ b/.llm/harness/gates/fitness-gates.md @@ -1,7 +1,7 @@ # Fitness Gates Fitness gates are the executable form of the doctrine. Doctrine source: -`.llm/research/architecture-doctrine-docs-v2/doctrine/09-anti-patterns-and-fitness-functions.md`. +`docs/architecture/doctrine/09-anti-patterns-and-fitness-functions.md`. Phase A does not implement scripts. This file defines the run contract, expected script names, and evaluator reporting shape. diff --git a/.llm/harness/templates/agent-briefing.md b/.llm/harness/templates/agent-briefing.md index 2925d9af7..96c0535c7 100644 --- a/.llm/harness/templates/agent-briefing.md +++ b/.llm/harness/templates/agent-briefing.md @@ -26,7 +26,7 @@ You are implementing Phase Group () of the supervisor run ### Harness mode Use harness. Read workflow/activation.md + workflow/run-loop.md. -For package/plugin work also load .claude/skills/netscript-doctrine/SKILL.md and +For package/plugin work also load .agents/skills/netscript-doctrine/SKILL.md and select your archetype from archetypes/README.md; apply scope overlays; read gates/archetype-gate-matrix.md and debt/arch-debt.md. diff --git a/.llm/harness/templates/plan.md b/.llm/harness/templates/plan.md index f99367e6a..dcbc86258 100644 --- a/.llm/harness/templates/plan.md +++ b/.llm/harness/templates/plan.md @@ -19,7 +19,7 @@ archetypes could apply.> ## Current Doctrine Verdict ## Axioms in Play diff --git a/.llm/harness/workflow/run-loop.md b/.llm/harness/workflow/run-loop.md index 4eae1a9db..6c43be9e1 100644 --- a/.llm/harness/workflow/run-loop.md +++ b/.llm/harness/workflow/run-loop.md @@ -13,7 +13,7 @@ implementation slice, and the full **IMPL-EVAL** at Evaluate. The Plan-Gate is a 2. Select the smallest doctrine archetype that fits. 3. Apply any scope overlay for frontend, service, or docs work. 4. Read `debt/arch-debt.md` for relevant open debt. -5. Read the current doctrine verdict in `doctrine/10-codebase-verdict-and-handoff.md`. +5. Read the current doctrine verdict in `docs/architecture/doctrine/10-codebase-verdict-and-handoff.md`. 6. Seed `plan.md`. ## 2. Research diff --git a/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/commits.md b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/commits.md new file mode 100644 index 000000000..d667966bc --- /dev/null +++ b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/commits.md @@ -0,0 +1,19 @@ +# Commits: Wave 0b·B — .agents/docs + skills cluster + +Append every commit created during the run immediately after creating it. + +Format: + +```md +- : +``` + +## Log + +- b656a85: plan(wave0b): Group B Plan & Design artifacts for docs and skills +- 62214f8: eval(wave0b): Group B PLAN-EVAL PASS (first true dogfood of Plan-Gate) +- db4701a: feat(docs): add curated agent-facing docs index (.agents/docs/README.md) +- 6ac14da: feat(skills): add skills cluster README and DEVELOPING.md authoring guide +- b43c281: fix(docs): restore jsr-audit content, enhance agent docs to Prisma bar +- 1fdc4b0: fix(skills): restore critical tables to doctrine and harness skills +- 944c097: feat(skills): standardize all skills with shape + D4 draft diff --git a/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/context-pack.md b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/context-pack.md new file mode 100644 index 000000000..c1b8f2802 --- /dev/null +++ b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/context-pack.md @@ -0,0 +1,90 @@ +# Context Pack: Wave 0b·B — .agents/docs + skills cluster + +## Run Metadata + +| Field | Value | +|-------|-------| +| Run ID | `feat-package-quality-wave0b-docs--agents-docs-and-skills` | +| Branch | `feat/package-quality-wave0b-docs` | +| Current phase | `implement` | +| Archetype | N/A | +| Scope overlays | docs | + +## Current State + +All slices B1–B7 implemented. Review fixes applied: +- `.agents/docs/README.md` rewritten from thin index to substantive agent docs +- `jsr-audit` restored to full 427-line original content +- `netscript-doctrine` restored Archetypes, Axioms, Layering, Folder Vocab +- `netscript-harness` restored Run Artifacts, Evaluator Separation, Decision Tree +- `deno-fresh` preserved all 886 lines + +Ready for IMPL-EVAL and draft PR. + +## Completed + +- Branch `feat/package-quality-wave0b-docs` created off updated `feat/package-quality`. +- Run dir scaffolded. +- PLAN-EVAL PASS (first true dogfood of Plan-Gate). +- B1–B7 implemented. +- Review fixes committed. +- Validation passed. +- Draft PR #5 opened. + +## In Progress + +- IMPL-EVAL (separate session). + +## Next Steps + +1. IMPL-EVAL (separate session). +2. On PASS, reviewer merges PR #5. + +## Key Decisions + +| Decision | Source | Notes | +|----------|--------|-------| +| Index points INTO docs | Prisma bar | Never duplicate | +| D4 drafted, not mandatory | D4 (locked) | User approval required | +| Missing skills listed as "not yet created" | Prisma capability-gap | Do not fabricate | + +## Files Changed + +| Path | Status | Notes | +|------|--------|-------| +| `.agents/docs/README.md` | new | Substantive agent docs | +| `.agents/skills/README.md` | new | Skills cluster router | +| `.agents/skills/DEVELOPING.md` | new | Skill authoring guide | +| `.agents/skills/netscript-doctrine/SKILL.md` | changed | Shape + D4, tables restored | +| `.agents/skills/netscript-harness/SKILL.md` | changed | Shape + D4, tables restored | +| `.agents/skills/jsr-audit/SKILL.md` | changed | Shape + D4, full content restored | +| `.agents/skills/deno-fresh/SKILL.md` | changed | Shape + D4, original preserved | +| `.agents/skills/netscript-standards/SKILL.md` | changed | Marked legacy | + +## Gates + +| Gate family | Current status | Evidence | +|-------------|----------------|----------| +| Static | PASS | 22/22 links resolve, 9 files fmt clean | +| Fitness | N/A | No package/plugin work | +| Runtime | N/A | No runtime changes | +| Consumer | N/A | No export changes | + +## Open Questions + +- D4 content approval pending (presented in PR #5). + +## Drift and Debt + +- Drift: none +- Debt: none + +## Commits + +- b656a85: plan(wave0b): Group B Plan & Design artifacts for docs and skills +- 62214f8: eval(wave0b): Group B PLAN-EVAL PASS (first true dogfood of Plan-Gate) +- db4701a: feat(docs): add curated agent-facing docs index (.agents/docs/README.md) +- 6ac14da: feat(skills): add skills cluster README and DEVELOPING.md authoring guide +- b43c281: fix(docs): restore jsr-audit content, enhance agent docs to Prisma bar +- 1fdc4b0: fix(skills): restore critical tables to doctrine and harness skills +- 944c097: feat(skills): standardize all skills with shape + D4 draft diff --git a/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/drift.md b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/drift.md new file mode 100644 index 000000000..889f5650e --- /dev/null +++ b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/drift.md @@ -0,0 +1,13 @@ +# Drift Log: Wave 0b·B — .agents/docs + skills cluster + +Drift is append-only. + +## 2026-06-05 — Group B plan locked + +- **What:** Plan & Design artifacts created for Wave 0b·B. +- **Source:** Handover prompt + post-Group-A tree inspection. +- **Expected:** `.agents/docs/` and skills cluster already at Prisma bar. +- **Actual:** No `.agents/docs/` exists; skills lack standardized shape and D4. +- **Severity:** significant +- **Action:** fix (this wave) +- **Evidence:** `research.md` findings table diff --git a/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/plan-eval.md b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/plan-eval.md new file mode 100644 index 000000000..4f71b29b9 --- /dev/null +++ b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/plan-eval.md @@ -0,0 +1,40 @@ +# PLAN-EVAL — feat-package-quality-wave0b-docs--agents-docs-and-skills + +- Plan evaluator session: separate session (first true dogfood of Plan-Gate) +- Run: feat-package-quality-wave0b-docs--agents-docs-and-skills +- Surface / archetype: docs/skills / N/A +- Scope overlays: docs + +## Checklist results + +| Plan-Gate item | Result | Evidence / location | +|----------------|--------|---------------------| +| Research present and current | PASS | `research.md` exists; re-baseline recorded against `feat/package-quality` post-Group-A merge | +| Decisions locked | PASS | `plan.md` Locked Decisions table has D1–D4 with rationale | +| Open-decision sweep | PASS | `plan.md` Open-Decision Sweep table; D4 flagged for sign-off; missing skills deferred; docs relationship resolved | +| Commit slices (< 30, gate + files each) | PASS | `worklog.md` Design section has 7 slices (B1–B7), each names gate and files | +| Risk register | PASS | `plan.md` Risk Register table | +| Gate set selected | PASS | Validation Plan table in `plan.md` names cross-reference, index consistency, format, jsr-audit | +| Deferred scope explicit | PASS | `plan.md` Non-Scope and `worklog.md` Deferred Scope list missing skills and D4 approval | +| jsr-audit surface scan (pkg/plugin) | N/A | Wave 0b·B is docs/skills; no package/plugin source touched. Recorded in `research.md` | + +## Open-decision sweep (evaluator-run) + +- None found that would force rework if deferred. D4 content is explicitly + deferred to user-approval gate. Missing skills are listed as "not yet created" + rather than fabricated. + +## Verdict + +`PASS` + +### If FAIL_PLAN — required fixes + +N/A. + +## Notes + +- This is the first true separate-session PLAN-EVAL dogfood of the new Plan-Gate + created in Group A. +- D4 "What NetScript doesn't do yet" content must be presented to the user for + approval before it becomes mandatory cluster-wide. diff --git a/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/plan.md b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/plan.md new file mode 100644 index 000000000..5590da543 --- /dev/null +++ b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/plan.md @@ -0,0 +1,100 @@ +# Plan: Wave 0b·B — .agents/docs + skills cluster + +## Run Metadata + +| Field | Value | +|-------|-------| +| Run ID | `feat-package-quality-wave0b-docs--agents-docs-and-skills` | +| Branch | `feat/package-quality-wave0b-docs` | +| Phase | `plan` | +| Target | docs/skills (agent-facing docs and skill cluster) | +| Archetype | N/A (docs/infra) | +| Scope overlays | `SCOPE-docs.md` | + +## Current Doctrine Verdict + +N/A — no package/plugin source touched. + +## Goal + +Raise `.agents/docs` and the skills cluster to the Prisma bar (Prisma Next +`docs/` and `skills/` quality), dogfooding the new Plan-Gate. + +## Scope + +### B-DOCS +- Create `.agents/docs/README.md` as a curated, agent-facing index. +- Model on Prisma's `docs/README.md`: lanes with "why you'd read this" one-liners. +- Define relationship to existing `docs/architecture/*` and `doctrine/*`: + the index points INTO them, never duplicates. +- Lanes: Start here, Architecture deep dives, Reference, Working with AI agents, + OSS posture. + +### B-SKILLS +- Add `.agents/skills/README.md` with router note + scope table. +- Scope table covers existing skills (mark `netscript-standards` legacy). +- Flag CORE TRIO: `netscript-doctrine`, `netscript-harness`, `jsr-audit`. +- Note `jsr-audit` is required Plan-Gate input for package/plugin waves. +- Standardize every existing skill to one shape: preamble + canonical mental-model + headline; When to Use / When Not to Use; Key Concepts; Workflow; Common + Pitfalls; **What NetScript doesn't do yet** (drafted, pending approval); + Reference Files; Checklist. +- Add `DEVELOPING.md` authoring guide for the cluster (shape, router convention, + versioning-in-lockstep). + +### D4 — "What NetScript doesn't do yet" +- Draft this section for EVERY existing skill. +- Present to user for approval in the draft PR (clearly flagged). +- Do NOT make the section mandatory cluster-wide until sign-off. + +## Non-Scope + +- No package/plugin source changes. +- No version bumps, publish, JSR, OIDC. +- Do NOT create stub skills for the 7 missing ones; list them as "not yet + created" in the index. +- Do NOT duplicate doctrine content into skills. + +## Hidden Scope + +- Cross-reference integrity: every link in `.agents/docs/README.md` must resolve. +- Skill index consistency: skills table matches filesystem. +- `deno fmt` on all changed markdown. + +## Locked Decisions + +| ID | Decision | Rationale | +|----|----------|-----------| +| D1 | Two-gate / dual-evaluator model | Group A implemented; Group B dogfoods it. | +| D2 | Group B dogfoods Plan-Gate | This is the first true separate-session PLAN-EVAL. | +| D3 | `jsr-audit` shifts left to Plan-Gate | Already in harness; applies to future package/plugin waves. | +| D4 | "What NetScript doesn't do yet" mandatory after user approval | Prevents confabulation; content must be approved. | + +## Open-Decision Sweep + +| Decision | Status | Notes | +|----------|--------|-------| +| D4 content approval | must resolve now | Drafted in PR; user sign-off required before making mandatory. | +| Missing skills listing | safe to defer | Listed as "not yet created" in index. | +| `.agents/docs` ↔ `docs/architecture` relationship | must resolve now | Index points INTO canonical sources; no duplication. | + +## Risk Register + +| Risk | Mitigation | +|------|------------| +| D4 content rejected | Flag as draft; section is optional until sign-off. | +| Skill shape too rigid | Base on Prisma bar; adapt to NetScript domain. | +| Link rot in `.agents/docs` | Verify every path resolves before commit. | + +## Validation Plan + +| Order | Gate | Command or check | Expected result | +|-------|------|------------------|-----------------| +| 1 | Cross-reference integrity | Manual path resolution | All links in `.agents/docs/README.md` resolve | +| 2 | Skill index consistency | Table vs filesystem | Every skill in table exists and vice-versa | +| 3 | Format | `deno fmt` | Clean | +| 4 | jsr-audit | N/A with reason | Wave 0b·B is docs/skills | + +## Dependencies + +- Group A merged into `feat/package-quality`. diff --git a/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/research.md b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/research.md new file mode 100644 index 000000000..4b0730130 --- /dev/null +++ b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/research.md @@ -0,0 +1,44 @@ +# Research — feat-package-quality-wave0b-docs--agents-docs-and-skills + +## Re-baseline + +- Carried-in source: Wave 0b prompt spec (handover) +- Re-derived against `feat/package-quality` @ post-Group-A merge +- What changed vs the carried-in version: + - Group A merged: 8-phase model, Plan-Gate, dual evaluator passes now in + `feat/package-quality`. + - Existing `.agents/skills/` has 5 skills: `deno-fresh`, `jsr-audit`, + `netscript-doctrine`, `netscript-harness`, `netscript-standards` (legacy). + - Prompt references additional skills not yet present: `deno-expert`, + `frontend-design`, `ux-patterns`, `tailwind`, `web-design`, `aspire`, `rtk`. + - No `.agents/docs/` exists yet. + - Existing `docs/architecture/` has: `DOCS-STRUCTURE.md`, `doctrine/` (10 files), + `PUBLIC-SURFACE-PATTERNS.md`, `STANDARDS.md`. + - Existing `.agents/rules/` has 6 `.mdc` rule files. + +## Findings + +| # | Finding | How to verify | +|---|---------|---------------| +| 1 | No `.agents/docs/` exists | `ls .agents/` | +| 2 | 5 skills exist; 7 referenced in prompt do not | `ls .agents/skills/` | +| 3 | Skills lack standardized shape (only jsr-audit has version; deno-fresh has metadata) | `head -n 20 .agents/skills/*/SKILL.md` | +| 4 | No skills cluster README exists | `ls .agents/skills/README.md` → missing | +| 5 | No `DEVELOPING.md` authoring guide exists | `find .agents/skills -name DEVELOPING.md` | +| 6 | No "What NetScript doesn't do yet" section in any skill | `grep -r "doesn't do yet" .agents/skills/` | +| 7 | `docs/architecture/` exists with canonical doctrine files | `ls docs/architecture/doctrine/` | +| 8 | `.agents/rules/` has 6 rule files | `ls .agents/rules/` | + +## jsr-audit surface scan (package/plugin waves) + +- N/A for Wave 0b·B — this wave is docs/skills only. No package/plugin source is + touched. Recorded as N/A with reason. + +## Open questions + +- Should the missing skills (`deno-expert`, `frontend-design`, `ux-patterns`, + `tailwind`, `web-design`, `aspire`, `rtk`) be created as stubs or just listed + in the index? (Decision: list in index with "not yet created" status; do not + fabricate skill content.) +- Should `.agents/docs/README.md` duplicate any `docs/architecture/` content? + (Decision: no — curate and LINK; the index points INTO canonical sources.) diff --git a/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/worklog.md b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/worklog.md new file mode 100644 index 000000000..3d338d1da --- /dev/null +++ b/.llm/tmp/run/feat-package-quality-wave0b-docs--agents-docs-and-skills/worklog.md @@ -0,0 +1,127 @@ +# Worklog: Wave 0b·B — .agents/docs + skills cluster + +## Run Metadata + +| Field | Value | +|-------|-------| +| Run ID | `feat-package-quality-wave0b-docs--agents-docs-and-skills` | +| Branch | `feat/package-quality-wave0b-docs` | +| Archetype | N/A | +| Scope overlays | docs | + +## Design + +### Public Surface + +- New files: + - `.agents/docs/README.md` — curated agent-facing docs index + - `.agents/skills/README.md` — skills cluster router + scope table + - `.agents/skills/DEVELOPING.md` — authoring guide +- Changed files: + - `.agents/skills/netscript-doctrine/SKILL.md` — standardize shape + draft D4 + - `.agents/skills/netscript-harness/SKILL.md` — standardize shape + draft D4 + - `.agents/skills/jsr-audit/SKILL.md` — standardize shape + draft D4 + - `.agents/skills/deno-fresh/SKILL.md` — standardize shape + draft D4 + - `.agents/skills/netscript-standards/SKILL.md` — mark legacy, minimal shape + +### Domain Vocabulary + +- **CORE TRIO** — `netscript-doctrine`, `netscript-harness`, `jsr-audit` +- **D4 section** — "What NetScript doesn't do yet" (drafted, pending approval) +- **Router skill** — the skill that catches vague prompts and routes to specifics + +### Ports + +- None — no external dependencies. + +### Constants + +- Lanes: Start here, Architecture deep dives, Reference, Working with AI agents, + OSS posture. +- Skill shape sections: Preamble, When to Use, When Not to Use, Key Concepts, + Workflow, Common Pitfalls, What NetScript doesn't do yet, Reference Files, + Checklist. + +### Commit Slices + +| # | Slice | Gate | Files | +|---|-------|------|-------| +| B1 | Add `.agents/docs/README.md` | Link check | `.agents/docs/README.md` | +| B2 | Add `.agents/skills/README.md` + `DEVELOPING.md` | Link check, index consistency | `.agents/skills/README.md`, `.agents/skills/DEVELOPING.md` | +| B3 | Standardize `netscript-doctrine` SKILL + draft D4 | Link check | `.agents/skills/netscript-doctrine/SKILL.md` | +| B4 | Standardize `netscript-harness` SKILL + draft D4 | Link check | `.agents/skills/netscript-harness/SKILL.md` | +| B5 | Standardize `jsr-audit` SKILL + draft D4 | Link check | `.agents/skills/jsr-audit/SKILL.md` | +| B6 | Standardize `deno-fresh` SKILL + draft D4 | Link check | `.agents/skills/deno-fresh/SKILL.md` | +| B7 | Mark `netscript-standards` legacy | Link check | `.agents/skills/netscript-standards/SKILL.md` | + +### Deferred Scope + +- Missing skills (`deno-expert`, `frontend-design`, `ux-patterns`, `tailwind`, + `web-design`, `aspire`, `rtk`) — listed as "not yet created" in index. +- D4 approval — presented in PR for user sign-off; not mandatory until approved. + +### Contributor Path + +To add a new skill: create a folder under `.agents/skills//`, write +`SKILL.md` following the shape in `DEVELOPING.md`, add it to the scope table in +`.agents/skills/README.md`, and run `deno fmt`. + +## Progress Log + +| Time | Slice | Step | Notes | +|------|-------|------|-------| +| 2026-06-05 | Setup | Branch + run dir created | `feat/package-quality-wave0b-docs` | +| 2026-06-05 | Plan | research.md + plan.md written | Re-baseline complete | +| 2026-06-05 | PLAN-EVAL | Group B dogfood | PASS (first true separate session) | +| 2026-06-05 | B1 | `.agents/docs/README.md` | First draft (thin index) | +| 2026-06-05 | B2 | `.agents/skills/README.md` + `DEVELOPING.md` | Skills cluster scaffold | +| 2026-06-05 | B3-B7 | Skills standardized | First pass oversimplified jsr-audit | +| 2026-06-05 | Review fix | `.agents/docs/README.md` | Rewritten to Prisma bar | +| 2026-06-05 | Review fix | `jsr-audit` SKILL | Restored all 427 original lines | +| 2026-06-05 | Review fix | `netscript-doctrine` | Restored Archetypes, Axioms, Layering, Folder Vocab | +| 2026-06-05 | Review fix | `netscript-harness` | Restored Run Artifacts, Evaluator Separation, Decision Tree | +| 2026-06-05 | Review fix | `deno-fresh` | Preserved all 886 lines, added D4 + Checklist | +| 2026-06-05 | Validation | deno fmt + cross-reference + index consistency | All passed | + +## Decisions + +| Decision | Reason | Source | +|----------|--------|--------| +| Index points INTO docs, never duplicates | Wave 0 mistake was copy-migration | Prisma bar | +| D4 drafted, not mandatory | Needs user approval | D4 (locked) | +| Missing skills listed as "not yet created" | Do not fabricate content | Prisma capability-gap honesty | + +## Drift + +| Drift | Severity | Logged in drift.md | +|-------|----------|--------------------| +| None yet | — | — | + +## Gate Results + +### Static Gates + +| Gate | Command or check | Result | Notes | +|------|------------------|--------|-------| +| Cross-reference integrity | Manual path resolution | PASS | 22/22 links resolve | +| Skill index consistency | Table vs filesystem | PASS | 5 skills in table match filesystem | +| Format | `deno fmt` | PASS | 9 files formatted, no errors | + +### Fitness Gates + +N/A. + +### Runtime Gates + +N/A. + +### Consumer Gates + +N/A. + +## Handoff Notes + +- Evaluator should verify D4 content is clearly flagged as "draft — pending + user approval" in the PR. +- Verify `.agents/docs/README.md` links all resolve. +- Verify skills table in `.agents/skills/README.md` matches filesystem. diff --git a/docs/architecture/DOCS-STRUCTURE.md b/docs/architecture/DOCS-STRUCTURE.md index 2ba089b18..4c647a439 100644 --- a/docs/architecture/DOCS-STRUCTURE.md +++ b/docs/architecture/DOCS-STRUCTURE.md @@ -154,7 +154,7 @@ Required content: 1. **Archetype** — explicit declaration: "This package implements the Archetype 4 (DSL/Builder) pattern" with link to - `.llm/research/architecture-doctrine-docs-v2/doctrine/`. + `docs/architecture/doctrine/`. 2. **Layered diagram** — ascii or markdown, showing domain/ports/application/ adapters/runtime. 3. **Public-surface map** — what's exported via `mod.ts` vs sub-entrypoints. diff --git a/docs/architecture/STANDARDS.md b/docs/architecture/STANDARDS.md index 12d05a00a..c7651a9e1 100644 --- a/docs/architecture/STANDARDS.md +++ b/docs/architecture/STANDARDS.md @@ -5,7 +5,7 @@ > later beta iteration. > > Authority: this file extends the Architecture Doctrine -> (`.llm/research/architecture-doctrine-docs-v2/doctrine/`) for cross-package +> (`docs/architecture/doctrine/`) for cross-package > consistency. Where this document conflicts with the doctrine, doctrine wins. The single hardest goal of the alpha release is **uniform DX** across 24 diff --git a/tools/fitness/check-doctrine.ts b/tools/fitness/check-doctrine.ts index 323eceb49..34a3d6b8e 100644 --- a/tools/fitness/check-doctrine.ts +++ b/tools/fitness/check-doctrine.ts @@ -3,7 +3,7 @@ * Doctrine readiness evaluator. * * Evaluates a package against the Architecture Doctrine - * (.llm/research/architecture-doctrine-docs-v2/doctrine/) — axioms A1..A14 + * (docs/architecture/doctrine/) — axioms A1..A14 * and anti-patterns AP-1..AP-30 — at the granularity that can be checked * mechanically. * diff --git a/tools/fitness/generate-package-plans.ts b/tools/fitness/generate-package-plans.ts index 7128ca9e0..777b52aa4 100644 --- a/tools/fitness/generate-package-plans.ts +++ b/tools/fitness/generate-package-plans.ts @@ -358,7 +358,7 @@ ${namingMap(pkg, jsr)} ## 9. References - PLAN.md — wave ${wave}, archetype ${arch.name} -- doctrine — \`.llm/research/architecture-doctrine-docs-v2/doctrine/\` +- doctrine — \`docs/architecture/doctrine/\` - standards — \`${HARMON}/STANDARDS.md\` - patterns — \`${HARMON}/PUBLIC-SURFACE-PATTERNS.md\` - docs spec — \`${HARMON}/DOCS-STRUCTURE.md\`