guidance-build
Skill115 starsChanged 57 days agoApache-2.0View on GitHub
Wireit orchestration, build optimization, caching strategies, and build troubleshooting for the Elements monorepo. Use this skill whenever the user asks about Wireit configuration, build tasks, build dependencies, cache invalidation, build performance, adding new build tasks to package.json, cross-package dependency patterns, sideEffects declarations, CI pipeline configuration, or diagnosing slow or failing builds. Also trigger when the user mentions wireit, vite build issues, pnpm run ci, or build output problems.
- Deletes or force-pushes
- Installs packages
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- projects/starters/angular/AGENTS.mdAGENTS.md
- projects/starters/bundles/AGENTS.mdAGENTS.md
- projects/starters/eleventy/AGENTS.mdAGENTS.md
- projects/starters/eleventy-ssr/AGENTS.mdAGENTS.md
- projects/starters/go/AGENTS.mdAGENTS.md
- projects/starters/go-htmx/AGENTS.mdAGENTS.md
- projects/starters/hugo/AGENTS.mdAGENTS.md
- projects/starters/importmaps/AGENTS.mdAGENTS.md
- projects/starters/lit-library/AGENTS.mdAGENTS.md
- projects/starters/mcp-app/AGENTS.mdAGENTS.md
- projects/starters/mpa/AGENTS.mdAGENTS.md
- projects/starters/nextjs/AGENTS.mdAGENTS.md
- projects/starters/nuxt/AGENTS.mdAGENTS.md
- projects/starters/react/AGENTS.mdAGENTS.md
- projects/starters/solidjs/AGENTS.mdAGENTS.md
- projects/starters/sphinx/AGENTS.mdAGENTS.md
- projects/starters/svelte/AGENTS.mdAGENTS.md
- projects/starters/typescript/AGENTS.mdAGENTS.md
- projects/starters/vue/AGENTS.mdAGENTS.md
- agent-availability-reportSkill
- agent-debug-ciSkill
- agent-dependenciesSkill
- agent-startersSkill
- agent-upkeepSkill
- agent-web-modernizationSkill
- audit-accessibilitySkill
- audit-ciSkill
- audit-codeSkill
- audit-consolidationSkill
- audit-simplificationSkill
- authoring-benchmarksSkill
- authoring-componentsSkill
- authoring-documentationSkill
- authoring-examplesSkill
- authoring-patternsSkill
- authoring-projectsSkill
- authoring-testsSkill
- authoring-typescriptSkill
- elementsSkill
- github-dependabotSkill
- guidance-api-designSkill
- guidance-webgpu-performanceSkill
- summarize-releasesSkill
- summarize-video-releasesSkill
- troubleshootingSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 81
Add the script to package.json with a wireit config
- Very specific: line 83
Add dependencies on upstream packages that must build first
- Very specific: line 84
If the task should run in CI, add it to the dependency chain of the root ci script
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Guidance Build System
You MUST review the build system documentation before modifying build configurations or troubleshooting build issues.
When to Use This Skill
- Optimizing build performance and parallelization
- Understanding Wireit task dependencies
- Troubleshooting build failures or cache issues
- Adding new build tasks to projects
- Configuring build orchestration across packages
- Understanding CI/CD build pipeline
Quick Reference
Common Commands
# Full CI locally (lint, build, test):same as CI pipeline
pnpm run ci
# Clean everything (node_modules, dist, .wireit caches)
pnpm run ci:reset
# Build a single project
cd projects/core && pnpm run build
# Force that project's Wireit scripts to rerun
mise exec -- git clean -dfX -- .wireit
mise exec -- pnpm run build
# Dev mode with watch
cd projects/core && pnpm run devWireit Basics
Wireit configs live in each project's package.json under the wireit key. Each task declares:
command:the shell command to rundependencies:other wireit tasks that must complete first (can be cross-package)files:input file globs for cache invalidationoutput:output file globs that get cached
Wireit skips tasks whose inputs have not changed since the last run. WIREIT_CACHE=none turns off output caching but does not bypass this incremental freshness check. To force a rerun, run mise exec -- git clean -dfX -- .wireit from the target project directory before invoking the project script.
Dependency Patterns
Cross-package dependencies use the <package>:<script> format:
{
"wireit": {
"build": {
"dependencies": ["../themes:build", "../styles:build"],
"command": "vite build",
"files": ["src/**/*", "tsconfig.json"],
"output": ["dist/**"]
}
}
}Troubleshooting Build Failures
| Symptom | Fix |
| Stale cache causing wrong output | Clean .wireit/ in the affected project, then rebuild |
| "Cannot find module" after package changes | Run pnpm i --frozen-lockfile to re-link workspaces |
| TypeScript errors after dependency update | Rebuild dependencies first: cd projects/themes && pnpm run build |
| CI passes locally but fails in pipeline | Check Node version (node -v should match .nvmrc) and pnpm version |
| Full reset | pnpm run ci:reset && pnpm i --frozen-lockfile && pnpm run ci |
Adding a New Wireit Task
- Add the script to
package.jsonwith awireitconfig - Declare
files(inputs) andoutput(outputs) for caching - Add
dependencieson upstream packages that must build first - If the task should run in CI, add it to the dependency chain of the root
ciscript
Key Tools
- pnpm:package manager with workspaces
- Wireit:build orchestration with caching (like Bazel for Node)
- Vite:TypeScript compilation and bundling
- Semantic Release:automated versioning from conventional commits
References
- Build System Documentation
- Root Wireit Configuration
- Project
package.jsonfiles for individual build patterns
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

