From 880faa0b5f5154c8ad539b21c0306621628fa072 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Wed, 22 Jul 2026 09:32:39 +1000 Subject: [PATCH] fix: repair broken CSS from PR#2 and add frontend quality gate skill --- .agents/skills/archie-wf-frontend/SKILL.md | 54 +++++ .../archie-wf-frontend/plugins/css-gate.go | 180 ++++++++++++++++ .../archie-wf-frontend/plugins/html-gate.go | 193 ++++++++++++++++++ internal/webui/index.html | 41 ++-- 4 files changed, 448 insertions(+), 20 deletions(-) create mode 100644 .agents/skills/archie-wf-frontend/SKILL.md create mode 100644 .agents/skills/archie-wf-frontend/plugins/css-gate.go create mode 100644 .agents/skills/archie-wf-frontend/plugins/html-gate.go diff --git a/.agents/skills/archie-wf-frontend/SKILL.md b/.agents/skills/archie-wf-frontend/SKILL.md new file mode 100644 index 000000000..e4c5d4c00 --- /dev/null +++ b/.agents/skills/archie-wf-frontend/SKILL.md @@ -0,0 +1,54 @@ +--- +name: archie-wf-frontend +description: > + Validates HTML, CSS, and JS in the worktree before commit. Runs as a + gate stage: parses CSS for syntax errors, checks HTML structure, and + verifies responsive requirements. Use in any project with web assets. +version: 1.0.0 +metadata: + archie: + workflow: frontend + tools: [go] + engine: any + plugins: + - plugins/css-gate.go + - plugins/html-gate.go +--- + +# Frontend Quality Gate + +## When this runs + +This skill registers a `frontend` workflow. Repos that include web assets +(HTML, CSS, JS) can opt into it by labelling issues `frontend` or declaring +`workflow: frontend` in their SKILL.md frontmatter. + +The bundled plugins run during the gate stage: + +- `css-gate.go` — parses all .css files and ` blocks. + styleRE := regexp.MustCompile(`(?s)]*>(.*?)`) + matches := styleRE.FindAllStringSubmatch(file, -1) + + for _, m := range matches { + if len(m) < 2 { + continue + } + // Check the style content the same way we check .css files. + // Write to a temp approach: just run the same checks on the content. + lines := strings.Split(m[1], "\n") + inBlock := 0 + for i, line := range lines { + for _, ch := range line { + if ch == '{' { + inBlock++ + } + if ch == '}' { + inBlock-- + } + } + if inBlock <= 0 && orphanLine.MatchString(line) { + findings = append(findings, gate.Finding{ + Level: "error", + File: relPath, + Line: i + 1, + Message: fmt.Sprintf("orphaned CSS in @@ -77,10 +78,10 @@

Tasks

- +
-
repoissuetitleworkflowstatus stepstokens
+
@@ -90,31 +91,31 @@

Task timeline —

- +
-
timekindstagedetail
+

Workflows

- +
-
workflowrunsmerged openparked avg tokensavg stepstotal tokens
+

Token spend by day

-
+

Stages

- +
-
workflowstageruns avg durationerrors
+