Skip to content

fix: plan-160 P1s — saffron contrast token, doc/token drift, coding-workflow harness batch - #888

Open
cline-cloud[bot] wants to merge 16 commits into
mainfrom
cline/1h6wfzk7
Open

cline-cloud[bot] wants to merge 16 commits into
mainfrom
cline/1h6wfzk7

Conversation

@cline-cloud

@cline-cloud cline-cloud Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Summary

First implementation wave from the plan-160 roast (#844–#887): the four P1s plus the coding-workflow harness batch. Scope note: "harness" here means the coding-workflow harness (agents-docs, .agents, scripts) — in-app AI-harness issues beyond the two already-fixed P1 bugs remain open and out of scope.

Bug fixes (fail-first tested)

Coding-workflow harness

Verification

Closes #844, Closes #845, Closes #846, Closes #847, Closes #875, Closes #876, Closes #877, Closes #878, Closes #879, Closes #880, Closes #881, Closes #882


📝 Summary by GitNexus

Summary

This appears to combine design-system token and documentation changes with a coding-workflow harness batch. Its reach is broad, so review should focus on consistency across the design docs, agent tooling, and scripts.

🔴 CRITICAL blast radius. A design-system, documentation, and coding-workflow harness change spanning DESIGN-SYSTEM.md, agent skill and configuration files, and scripts, with impact across the codebase.

The graph reaches 11 dependents across direct and transitive callers or importers, and 54 traced flows pass through changed symbols. Impact lands in the Views, Studio, and Scripts modules. Start with DESIGN-SYSTEM.md and the related agent documentation, then review scripts/agent-surface.py and scripts/generate-skills-docs.py alongside the skill and harness changes.

The file risk level is LOW, with no HIGH or CRITICAL risk files identified.

Added by GitNexus for PR #888. Edit freely — this block is replaced on the next review, everything above it is left untouched.

do-bot added 14 commits October 1, 2026 16:59
…#846)

Chips called setInput(prompt) then handleSend(), whose closure still held the empty input — the empty-input guard silently aborted every chip click, and the covering test mocked the guard away. handleSend now accepts an explicit overrideInput used for the guard, user bubble, and request. Test rewritten against the real hook: failed pre-fix, passes post-fix.
effectiveModel (custom slug ?? dropdown) was computed after the useAiHarnessChat call and only fed display surfaces; the send pipeline received the dropdown model. Compute it before the hook and pass it as the request model so the UI and the network can never disagree. Regression test drives the full view: custom slug + api key + send, asserts sendChatStream receives the slug (failed pre-fix with the dropdown model).
…ntrast in dark mode (#845)

Dark --saffron is a light orange (#e5944a) but five components painted pure white text on it (~2.4:1 vs the 4.5:1 AA floor): the drawer tabs and four count badges were illegible. New per-theme token (light #ffffff / dark #14110d, matching --sidebar-primary-foreground) applied at every bg-saffron text site, including the provider-setup icon tile.
…e shipped palette (#847)

The token table documented a saffron family that no longer exists (#c77d3a/#8a4f1c/#b36a2e) while globals.css ships #9a5c2a/#6a4a1c/#8a5024 — and layout.tsx themeColor copied the stale doc value, tinting browser chrome with a ghost of the old palette. Table rows, the saffron button recipe (now text-saffron-foreground), and themeColor all match globals.css; layout comment cross-references the token so the next rebrand updates both.
AGENTS.md orders agents to load verify-before-asserting, but the skill appeared in zero catalogs — regeneration adds it (57 skills) and nothing failed the drift. generate-skills-docs.py gains --check (write-nothing diff mode, BATS-covered) and agent-surface.py validate now fails on stale catalogs, so the discovery layer cannot silently lie again.
…e name collision (#882)

goap-agent named three surfaces: the skill, a Claude sub-agent, and an OpenCode sub-agent. The skill is now goap-planning (directory, SKILL.md name field, symlinks, regenerated catalogs, registry row); goap-agent remains exclusively the sub-agent name. The sub-agent evals stay in .claude/agents/goap-agent/evals (agent_type: claude); the skills own evals.json moved with the rename. agent-surface validation: no name mismatches, no broken symlinks, catalogs fresh.
…d SCRIPTS (#875, #877, #880)

HARNESS.md taught a repealed ~150-line AGENTS.md ceiling (enforced constant is 250) and listed 4 of 7 manifest-managed agent surfaces (adds Cursor, Windsurf, Jules + manifest pointer). agents-docs/AGENTS.md claimed to be both auto-generated and manual; it is manual, misnamed create-agent as skill-creator, and omitted analysis-swarm/goap-agent OpenCode rows. SCRIPTS.md missed the build-critical generate-precache-manifest.mjs and generate-pwa-icons.py while documenting SKIP_CLIPPY, a Rust knob unreachable in a repo with no Cargo.toml.
…878)

The verify-before-asserting rule fired on ".*" — every prompt — contradicting
AGENTS.md's "load only what the stage needs". The pattern now derives from the
skill's own trigger phrases, and a top-level _note marks the file advisory
until an installed hook consumes it (.claude/hooks/ ships *.example only).
The repo shipped a Windows NTFS Zone.Identifier download marker, a .qwen
settings backup, and mutable .jules runtime state. Untracked all four files
and gitignored the patterns (.jules/, *.orig, *:Zone.Identifier) so they
cannot return.
The rename commit staged the new goap-planning paths but left the old
goap-agent deletions unstaged (broken by an intermediate git reset), so HEAD
tracked both. Removes the old skill directory from the index; on-disk state
and validation were already correct.
…her repo (#879)

The config denied edits to packages/opencode/migration/* (a path that does
not exist here), referenced foreign provider accounts (cline-pass/*) and a
Xiaomi mimo schema, and was absent from .agents/manifest.json, so no
validation covered it. Deleting per the issue's recommended option rather
than adopting a surface nothing references.
@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
do-knowledge-studio Ready Ready Preview, v0 Oct 1, 2026 6:40pm UTC

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Blocked merge diagnosis — blocked
⏳ Check run(s) still in progress: ["Codacy Static Code Analysis","Detect Changes","Diagnose Blocked Merge State","Dependency Advisory Audit","Shell Script Security Analysis","Secret Detection","Infrastructure as Code Security","commitlint","Trivy Filesystem Security Scan","labeler","Analyze (javascript-typescript)","Analyze (actions)","GitNexus"]

@github-actions github-actions Bot added documentation Documentation improvements config tests Related to automated/manual tests skills scripts labels Oct 1, 2026
@nexus-check

nexus-check Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor
Akon Labs

GitNexus Review · PR #888

2 issues found across 2 files.

Summary

This appears to combine design-system token and documentation changes with a coding-workflow harness batch. Its reach is broad, so review should focus on consistency across the design docs, agent tooling, and scripts.

🔴 CRITICAL blast radius. A design-system, documentation, and coding-workflow harness change spanning DESIGN-SYSTEM.md, agent skill and configuration files, and scripts, with impact across the codebase.

The graph reaches 11 dependents across direct and transitive callers or importers, and 54 traced flows pass through changed symbols. Impact lands in the Views, Studio, and Scripts modules. Start with DESIGN-SYSTEM.md and the related agent documentation, then review scripts/agent-surface.py and scripts/generate-skills-docs.py alongside the skill and harness changes.

The file risk level is LOW, with no HIGH or CRITICAL risk files identified.

🔀 Structural changes · cline/1h6wfzk7 → main

Both branches are separately indexed, so this compares their code graphs directly — what the diff cannot show.

Symbols added (2)

  • scripts/agent-surface.py::_load_skills_docs_generator
  • scripts/agent-surface.py::validate_skills_catalog_freshness

Symbols removed (1)

  • src/components/studio/views/ai-harness-chat.tsx::sendSuggestion

Full detail lives in the GitNexus check run for this commit.

@nexus-check

nexus-check Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Agent context for GitNexus Review · PR #888

This comment carries deterministic graph detail for coding agents and reviewers who want the receipts — the main review comment carries the human summary.

🔴 CRITICAL blast radius — this change reaches 11 downstream symbols across 3 modules; this lands on a critical surface, so review the dependents carefully before merging. (driven by dependent/module count, not file risk)

Blast Level Dependents Modules Files
🔴 CRITICAL 11 3 44

What changed

Symbol Changes (15)
Kind Symbol Location
Function main scripts/agent-surface.py:341
Function main scripts/generate-skills-docs.py:199
Const viewport src/app/layout.tsx:67
Function TabSwitcher src/components/studio/mobile-drawer.tsx:61
Function CitationsPanel src/components/studio/right-panel-citations.tsx:26
Function ChatComposer src/components/studio/views/ai-harness-chat.tsx:110
Function AiHarnessChatPanel src/components/studio/views/ai-harness-chat.tsx:169
Property reducedMotion src/components/studio/views/ai-harness-chat.tsx:18
Interface ChatPanelProps src/components/studio/views/ai-harness-chat.tsx:12
Function AiHarnessProviderSetup src/components/studio/views/ai-harness-provider-setup.tsx:33
Function useAIHarnessViewState src/components/studio/views/ai-harness-view.tsx:32
Function CitationDisclosure src/components/studio/views/chat-subcomponents.tsx:147
Function LibraryView src/components/studio/views/library-view.tsx:148
Function useAiHarnessChat src/components/studio/views/use-ai-harness-chat.ts:53
Function handleSend src/components/studio/views/use-ai-harness-chat.ts:90
Changed Files (44)
File Status
.agents/skills/README.md 🟡 modified
.agents/skills/goap-planning/SKILL.md 🔵 renamed
.agents/skills/goap-planning/evals/evals.json 🔵 renamed
.agents/skills/goap-planning/execution-strategies.md 🔵 renamed
.agents/skills/goap-planning/references/guide.md 🔵 renamed
.agents/skills/skill-rules.json 🟡 modified
.claude/skills/goap-agent 🔴 removed
.claude/skills/goap-planning 🟢 added
.gemini/skills/goap-agent 🔴 removed
.gemini/skills/goap-planning 🟢 added
.gitignore 🟡 modified
.jules/ui-search-last-run.txt 🔴 removed
.jules/ui-search-state.json 🔴 removed
.mimocode/command/ci-watch.md 🔴 removed
.mimocode/command/ci-watch.sh 🔴 removed
.mimocode/mimocode.jsonc 🔴 removed
.mimocode/mimocode.jsonc:Zone.Identifier 🔴 removed
.mimocode/plans/1781876057448-crisp-cactus.md 🔴 removed
.mimocode/plans/1783587634002-stellar-squid.md 🔴 removed
.qwen/settings.json.orig 🔴 removed
.qwen/skills/goap-agent 🔴 removed
.qwen/skills/goap-planning 🟢 added
DESIGN-SYSTEM.md 🟡 modified
agents-docs/AGENTS.md 🟡 modified
agents-docs/AVAILABLE_SKILLS.md 🟡 modified
agents-docs/HARNESS.md 🟡 modified
agents-docs/SCRIPTS.md 🟡 modified
plans/160-ui-ux-tokens-harness-roast-2026-10-01.md 🟢 added
scripts/agent-surface.py 🟡 modified
scripts/generate-skills-docs.py 🟡 modified
src/app/globals.css 🟡 modified
src/app/layout.tsx 🟡 modified
src/components/studio/mobile-drawer.tsx 🟡 modified
src/components/studio/right-panel-citations.tsx 🟡 modified
src/components/studio/views/ai-harness-chat.test.tsx 🟡 modified
src/components/studio/views/ai-harness-chat.tsx 🟡 modified
src/components/studio/views/ai-harness-provider-setup.tsx 🟡 modified
src/components/studio/views/ai-harness-view.test.tsx 🟡 modified
src/components/studio/views/ai-harness-view.tsx 🟡 modified
src/components/studio/views/chat-subcomponents.tsx 🟡 modified
src/components/studio/views/library-view.tsx 🟡 modified
src/components/studio/views/use-ai-harness-chat.test.tsx 🟡 modified
src/components/studio/views/use-ai-harness-chat.ts 🟡 modified
tests/generate-skills-docs.bats 🟡 modified

What it affects

Architecture Impact

Module Hits Direct
Views 11 🟢
Studio 6 🟢
Scripts 2 ⚪

Blast Radius

Depth Count
d1 (direct) 7
d2 (indirect) 3
d3 (transitive) 1
Direct dependents (d1)
  • src/components/studio/views/chat-subcomponents.tsx:214 · MessageList
  • scripts/agent-surface.py · agent-surface.py
  • src/components/studio/right-panel.tsx:432 · RightPanel
  • scripts/generate-skills-docs.py · generate-skills-docs.py
  • src/components/studio/mobile-drawer.tsx:358 · MobileDrawer
  • src/components/studio/views/ai-harness-view.tsx:206 · AIHarnessView
  • src/components/studio/app-shell.tsx · app-shell.tsx
Indirect dependents (d2)
  • src/components/studio/views/chat-view.tsx:28 · ChatView
  • src/components/studio/app-shell.tsx:219 · AppShell
  • src/app/page.tsx · page.tsx
Transitive dependents (d3)
  • src/app/page.tsx:5 · Home

What to check

File Risk (11)
File Risk Category
.agents/skills/README.md 🟢 LOW Documentation
.agents/skills/goap-planning/SKILL.md 🟢 LOW Documentation
.agents/skills/goap-planning/execution-strategies.md 🟢 LOW Documentation
.agents/skills/goap-planning/references/guide.md 🟢 LOW Documentation
.gitignore 🟢 LOW Dev Tooling
.jules/ui-search-last-run.txt 🟢 LOW Documentation
.mimocode/command/ci-watch.md 🟢 LOW Documentation
.mimocode/plans/1781876057448-crisp-cactus.md 🟢 LOW Documentation
.mimocode/plans/1783587634002-stellar-squid.md 🟢 LOW Documentation
plans/160-ui-ux-tokens-harness-roast-2026-10-01.md 🟢 LOW Documentation
src/app/globals.css 🟢 LOW Assets
Prompt for AI agents (2 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.

<file name="scripts/agent-surface.py">

<violation number="1" location="scripts/agent-surface.py:373">
P2: Guard the skills directory before collecting catalogs — 'validate_canonical_skills()' explicitly handles a missing canonical directory by adding an error and returning, but 'main()' continues into this new check. At line 373, 'collect_skills()' receives '.agents/skills' unconditionally; its implementation iterates 'skills_dir.iterdir()' ('scripts/generate-skills-docs.py:157'), which raises 'FileNotFoundError' when the directory is absent. Thus a missing skill root produces an uncaught traceback instead of the validator's normal collected error output.
</violation>

</file>

<file name="src/components/studio/views/use-ai-harness-chat.test.tsx">

<violation number="1" location="src/components/studio/views/use-ai-harness-chat.test.tsx:173">
P2: Assert the override reaches the request builder, not only the transcript — This test checks the stored user bubble at line 172 and only that the stream mock ran here. 'mockBuildMessagesAsync' is stubbed with a fixed message array in the existing 'beforeEach' (line 51), so its output does not depend on the input argument; meanwhile, the real 'buildMessagesAsync' puts its 'userMessage' argument into the request messages ('src/lib/ai/context.ts:161-181'). Consequently, an implementation that records the override in the bubble but passes the empty composer input to 'buildMessagesAsync' would still satisfy both assertions. The test therefore does not verify the advertised
</violation>

</file>

@codacy-production

codacy-production Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 12 complexity · 0 duplication

Metric Results
Complexity 12
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

…subprocess

Codacy flagged the subprocess.run call in validate_skills_catalog_freshness
(B602/B603: non-static invocation) on PR #888. The generator's module level is
side-effect free, so import it with importlib and call
collect_skills/render_* directly — removes the subprocess import entirely and
spares a process spawn. Behavior verified unchanged: fresh passes, stale fails
with the actionable message, restored passes.
await act(async () => { await hook.result.current.handleSend('Summarize the main entities.') })
const userMessages = hook.result.current.messages.filter((m) => m.role === 'user')
expect(userMessages.at(-1)?.content).toBe('Summarize the main entities.')
expect(mockSendChatStream).toHaveBeenCalled()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning — Assert the override reaches the request builder, not only the transcript

This test checks the stored user bubble at line 172 and only that the stream mock ran here. mockBuildMessagesAsync is stubbed with a fixed message array in the existing beforeEach (line 51), so its output does not depend on the input argument; meanwhile, the real buildMessagesAsync puts its userMessage argument into the request messages (src/lib/ai/context.ts:161-181). Consequently, an implementation that records the override in the bubble but passes the empty composer input to buildMessagesAsync would still satisfy both assertions. The test therefore does not verify the advertised send-to-model behavior.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/components/studio/views/use-ai-harness-chat.test.tsx, line 173:

<comment>This test checks the stored user bubble at line 172 and only that the stream mock ran here. 'mockBuildMessagesAsync' is stubbed with a fixed message array in the existing 'beforeEach' (line 51), so its output does not depend on the input argument; meanwhile, the real 'buildMessagesAsync' puts its 'userMessage' argument into the request messages ('src/lib/ai/context.ts:161-181'). Consequently, an implementation that records the override in the bubble but passes the empty composer input to 'buildMessagesAsync' would still satisfy both assertions. The test therefore does not verify the advertised</comment>

Why this matters: GitNexus flagged this from your code graph — a caller or contract relies on what changed here. · llm-review

@nexus-check

nexus-check Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

🔄 What's new in this push (1760ee5)

The newest push appears limited to the main function in scripts/agent-surface.py, a Python script. No newly reached modules or risk transition were reported.

The main GitNexus review comment has the full, updated report.

Comment thread scripts/agent-surface.py
generator = _load_skills_docs_generator(repo_root)
if generator is None:
return [f"Skill docs generator not importable: {script}"]
skills = generator.collect_skills(repo_root / ".agents" / "skills")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning — Guard the skills directory before collecting catalogs

validate_canonical_skills() explicitly handles a missing canonical directory by adding an error and returning, but main() continues into this new check. At line 373, collect_skills() receives .agents/skills unconditionally; its implementation iterates skills_dir.iterdir() (scripts/generate-skills-docs.py:157), which raises FileNotFoundError when the directory is absent. Thus a missing skill root produces an uncaught traceback instead of the validator's normal collected error output.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/agent-surface.py, line 373:

<comment>'validate_canonical_skills()' explicitly handles a missing canonical directory by adding an error and returning, but 'main()' continues into this new check. At line 373, 'collect_skills()' receives '.agents/skills' unconditionally; its implementation iterates 'skills_dir.iterdir()' ('scripts/generate-skills-docs.py:157'), which raises 'FileNotFoundError' when the directory is absent. Thus a missing skill root produces an uncaught traceback instead of the validator's normal collected error output.</comment>

Why this matters: GitNexus flagged this from your code graph — a caller or contract relies on what changed here. · llm-review

@cline-cloud
cline-cloud Bot enabled auto-merge (squash) October 1, 2026 18:36
@nexus-check

nexus-check Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

🔄 What's new in this push (1b5241d)

The newest push appears limited to the main function in scripts/agent-surface.py, a Python script. No newly reached modules or risk transition were reported.

The main GitNexus review comment has the full, updated report.

This branch was successfully deployed

1 active deployment
Preview — 1b5241df Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config documentation Documentation improvements scripts skills tests Related to automated/manual tests

Projects

None yet

0 participants