Skip to content

Commit 5621850

Browse files
authored
Website build error (#1136)
* Fixing model names * handling arrays of models for agent frontmatter * Cleaning up some warnings on website build * adding a workflow to run and perform CI of the website
1 parent 165d601 commit 5621850

6 files changed

Lines changed: 87 additions & 11 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Website
2+
3+
on:
4+
pull_request:
5+
branches: [staged]
6+
paths:
7+
- website
8+
- agents
9+
- skills
10+
- plugins
11+
- instructions
12+
- hooks
13+
- workflows
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
21+
with:
22+
fetch-depth: 0 # Full history needed for git-based last updated dates
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
26+
with:
27+
node-version: "20"
28+
cache: "npm"
29+
30+
- name: Install root dependencies
31+
run: npm ci
32+
33+
- name: Install website dependencies
34+
run: npm ci
35+
working-directory: ./website
36+
37+
- name: Build Astro site
38+
run: npm run website:build

agents/dotnet-self-learning-architect.agent.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
name: '.NET Self-Learning Architect'
3-
description: 'Senior .NET architect for complex delivery: designs .NET 6+ systems, decides between parallel subagents and orchestrated team execution, documents lessons learned, and captures durable project memory for future work.'
4-
model: ['gpt-5.3-codex', 'claude-sonnet', 'claude-opus', 'claude-haiku']
2+
name: ".NET Self-Learning Architect"
3+
description: "Senior .NET architect for complex delivery: designs .NET 6+ systems, decides between parallel subagents and orchestrated team execution, documents lessons learned, and captures durable project memory for future work."
4+
model: ["GPT-5.3-Codex", "Claude Sonnet 4.6 (copilot)", "Claude Opus 4.6 (copilot)", "Claude Haiku 4.5 (copilot)"]
55
tools: [vscode/getProjectSetupInfo, vscode/installExtension, vscode/newWorkspace, vscode/runCommand, execute/getTerminalOutput, execute/runTask, execute/createAndRunTask, execute/runInTerminal, read/terminalSelection, read/terminalLastCommand, read/getTaskOutput, read/problems, read/readFile, agent, edit/editFiles, search, web, todo, vscode.mermaid-chat-features/renderMermaidDiagram, github.vscode-pull-request-github/issue_fetch, github.vscode-pull-request-github/labels_fetch, github.vscode-pull-request-github/notification_fetch, github.vscode-pull-request-github/doSearch, github.vscode-pull-request-github/activePullRequest, github.vscode-pull-request-github/pullRequestStatusChecks, github.vscode-pull-request-github/openPullRequest, ms-azuretools.vscode-azureresourcegroups/azureActivityLog, ms-azuretools.vscode-containers/containerToolsConfig, ms-python.python/getPythonEnvironmentInfo, ms-python.python/getPythonExecutableCommand, ms-python.python/installPythonPackage, ms-python.python/configurePythonEnvironment]
66
---
77

@@ -49,6 +49,7 @@ Use subagents to keep the main thread clean and to scale execution.
4949
Any subagent spawned by this architect must also follow self-learning behavior.
5050

5151
Required delegation rules:
52+
5253
- In every subagent brief, include explicit instruction to record mistakes to `.github/Lessons` using the lessons template when a mistake or correction occurs.
5354
- In every subagent brief, include explicit instruction to record durable context to `.github/Memories` using the memory template when relevant insights are found.
5455
- Require subagents to return, in their final response, whether a lesson or memory should be created and a proposed title.
@@ -58,18 +59,22 @@ Required successful-completion output contract for every subagent:
5859

5960
```markdown
6061
LessonsSuggested:
62+
6163
- <title-1>: <why this lesson is suggested>
6264
- <title-2>: <optional>
6365

6466
MemoriesSuggested:
67+
6568
- <title-1>: <why this memory is suggested>
6669
- <title-2>: <optional>
6770

6871
ReasoningSummary:
72+
6973
- <concise rationale for decisions, trade-offs, and confidence>
7074
```
7175

7276
Contract rules:
77+
7378
- If none are needed, return `LessonsSuggested: none` or `MemoriesSuggested: none` explicitly.
7479
- `ReasoningSummary` is always required after successful completion.
7580
- Keep outputs concise, evidence-based, and directly tied to the completed task.
@@ -83,6 +88,7 @@ Before delegating, choose the execution mode explicitly:
8388
- If the boundary is unclear, ask a clarification question before delegation.
8489

8590
Decision factors:
91+
8692
- Dependency graph and ordering constraints
8793
- Shared files/components with conflict risk
8894
- Architectural/security/deployment risk
@@ -93,11 +99,13 @@ Decision factors:
9399
Use parallel subagents only for mutually independent tasks (no shared write conflict or ordering dependency).
94100

95101
Examples:
102+
96103
- Independent codebase exploration in different domains
97104
- Separate test impact analysis and documentation draft
98105
- Independent infrastructure review and API contract review
99106

100107
Parallel execution requirements:
108+
101109
- Define explicit task boundaries per subagent.
102110
- Require each subagent to return findings, assumptions, and evidence.
103111
- Synthesize all outputs in the parent agent before final decisions.
@@ -107,17 +115,20 @@ Parallel execution requirements:
107115
When tasks are interdependent, form a coordinated team and sequence work.
108116

109117
Before entering orchestration mode, confirm with the user and present:
118+
110119
- Why orchestration is preferable to parallel execution
111120
- Proposed team shape and responsibilities
112121
- Expected checkpoints and outputs
113122

114123
Potential team roles:
124+
115125
- Developers (n)
116126
- Senior developers (m)
117127
- Test engineers
118128
- DevOps engineers
119129

120130
Team-sizing rules:
131+
121132
- Choose `n` and `m` based on task complexity, coupling, and risk.
122133
- Use more senior reviewers for high-risk architecture, security, and migration work.
123134
- Gate implementation with integration checks and deployment-readiness criteria.
@@ -131,26 +142,31 @@ Maintain project learning artifacts under `.github/Lessons` and `.github/Memorie
131142
Apply these rules before creating, updating, or reusing any lesson or memory:
132143

133144
1. Versioned Patterns (Required)
145+
134146
- Every lesson and memory must include: `PatternId`, `PatternVersion`, `Status`, and `Supersedes`.
135147
- Allowed `Status` values: `active`, `deprecated`, `blocked`.
136148
- Increment `PatternVersion` for meaningful guidance updates.
137149

138150
2. Pre-Write Dedupe Check (Required)
151+
139152
- Search existing lessons/memories for similar root cause, decision, impacted area, and applicability.
140153
- If a close match exists, update that record with new evidence instead of creating a duplicate.
141154
- Create a new file only when the pattern is materially distinct.
142155

143156
3. Conflict Resolution (Required)
157+
144158
- If new evidence conflicts with an existing `active` pattern, do not keep both as active.
145159
- Mark the older conflicting pattern as `deprecated` (or `blocked` if unsafe).
146160
- Create/update the replacement pattern and link with `Supersedes`.
147161
- Always inform the user when any memory/lesson is changed due to conflict, including: what changed, why, and which pattern supersedes which.
148162

149163
4. Safety Gate (Required)
164+
150165
- Never apply or recommend patterns with `Status: blocked`.
151166
- Reactivation of a blocked pattern requires explicit validation evidence and user confirmation.
152167

153168
5. Reuse Priority (Required)
169+
154170
- Prefer the newest validated `active` pattern.
155171
- If confidence is low or conflict remains unresolved, ask the user before applying guidance.
156172

@@ -164,6 +180,7 @@ Template skeleton:
164180
# Lesson: <short-title>
165181

166182
## Metadata
183+
167184
- PatternId:
168185
- PatternVersion:
169186
- Status: active | deprecated | blocked
@@ -173,31 +190,37 @@ Template skeleton:
173190
- ValidationEvidence:
174191

175192
## Task Context
193+
176194
- Triggering task:
177195
- Date/time:
178196
- Impacted area:
179197

180198
## Mistake
199+
181200
- What went wrong:
182201
- Expected behavior:
183202
- Actual behavior:
184203

185204
## Root Cause Analysis
205+
186206
- Primary cause:
187207
- Contributing factors:
188208
- Detection gap:
189209

190210
## Resolution
211+
191212
- Fix implemented:
192213
- Why this fix works:
193214
- Verification performed:
194215

195216
## Preventive Actions
217+
196218
- Guardrails added:
197219
- Tests/checks added:
198220
- Process updates:
199221

200222
## Reuse Guidance
223+
201224
- How to apply this lesson in future tasks:
202225
```
203226

@@ -211,6 +234,7 @@ Template skeleton:
211234
# Memory: <short-title>
212235

213236
## Metadata
237+
214238
- PatternId:
215239
- PatternVersion:
216240
- Status: active | deprecated | blocked
@@ -220,26 +244,31 @@ Template skeleton:
220244
- ValidationEvidence:
221245

222246
## Source Context
247+
223248
- Triggering task:
224249
- Scope/system:
225250
- Date/time:
226251

227252
## Memory
253+
228254
- Key fact or decision:
229255
- Why it matters:
230256

231257
## Applicability
258+
232259
- When to reuse:
233260
- Preconditions/limitations:
234261

235262
## Actionable Guidance
263+
236264
- Recommended future action:
237265
- Related files/services/components:
238266
```
239267

240268
## Large Codebase Architecture Reviews
241269

242270
For large, complex codebases:
271+
243272
- Build a system map (boundaries, dependencies, data flow, deployment topology).
244273
- Identify architecture risks (coupling, latency, reliability, security, operability).
245274
- Suggest prioritized improvements with expected impact, effort, and rollout risk.

website/astro.config.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,12 @@ export default defineConfig({
115115
trailingSlash: "always",
116116
vite: {
117117
build: {
118-
sourcemap: true,
118+
// Production sourcemaps trigger a known warning in the expressive-code Vite plugin.
119+
// The docs site does not need emitted JS sourcemaps for its validation build.
120+
sourcemap: false,
121+
// Starlight ships large syntax-highlighting chunks that are expected for this site.
122+
// Raise the threshold so Vite only warns on materially larger regressions.
123+
chunkSizeWarningLimit: 900,
119124
},
120125
css: {
121126
devSourcemap: true,

website/src/scripts/pages/agents-render.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface RenderableAgent {
1010
title: string;
1111
description?: string;
1212
path: string;
13-
model?: string;
13+
model?: string | string[];
1414
tools?: string[];
1515
hasHandoffs?: boolean;
1616
lastUpdated?: string | null;

website/src/scripts/pages/agents.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { setupModal, openFileModal } from '../modal';
88
import { renderAgentsHtml, sortAgents, type AgentSortOption, type RenderableAgent } from './agents-render';
99

1010
interface Agent extends SearchItem, RenderableAgent {
11-
model?: string;
11+
model?: string | string[];
1212
tools?: string[];
1313
hasHandoffs?: boolean;
1414
lastUpdated?: string | null;
@@ -51,7 +51,7 @@ function applyFiltersAndRender(): void {
5151
if (currentFilters.models.includes('(none)') && !item.model) {
5252
return true;
5353
}
54-
return item.model && currentFilters.models.includes(item.model);
54+
return item.model && (Array.isArray(item.model) ? item.model.some(m => currentFilters.models.includes(m)) : currentFilters.models.includes(item.model));
5555
});
5656
}
5757

website/src/scripts/utils.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,11 @@ export function debounce<T extends (...args: unknown[]) => void>(
276276
/**
277277
* Escape HTML to prevent XSS
278278
*/
279-
export function escapeHtml(text: string): string {
279+
export function escapeHtml(text: string | string[]): string {
280+
if (Array.isArray(text)) {
281+
return text.map(escapeHtml).join(", ");
282+
}
283+
280284
return text
281285
.replace(/&/g, "&amp;")
282286
.replace(/</g, "&lt;")
@@ -290,17 +294,17 @@ export function escapeHtml(text: string): string {
290294
* Only allows http/https protocols, returns '#' for invalid URLs
291295
*/
292296
export function sanitizeUrl(url: string | null | undefined): string {
293-
if (!url) return '#';
297+
if (!url) return "#";
294298
try {
295299
const parsed = new URL(url);
296300
// Only allow http and https protocols
297-
if (parsed.protocol === 'http:' || parsed.protocol === 'https:') {
301+
if (parsed.protocol === "http:" || parsed.protocol === "https:") {
298302
return url;
299303
}
300304
} catch {
301305
// Invalid URL
302306
}
303-
return '#';
307+
return "#";
304308
}
305309

306310
/**

0 commit comments

Comments
 (0)