forgecommandline 0.8.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- forgecli/__init__.py +2 -0
- forgecli/ads.py +322 -0
- forgecli/agent.py +1093 -0
- forgecli/art.py +574 -0
- forgecli/attach.py +246 -0
- forgecli/brief.py +215 -0
- forgecli/browsercheck.py +99 -0
- forgecli/checkpoints.py +81 -0
- forgecli/city.py +833 -0
- forgecli/cli.py +1668 -0
- forgecli/config.py +194 -0
- forgecli/courier.py +177 -0
- forgecli/courier_data.py +164 -0
- forgecli/courier_hd.py +431 -0
- forgecli/courier_hd_data.bin +0 -0
- forgecli/courier_hd_data.py +19 -0
- forgecli/ghlogin.py +76 -0
- forgecli/github.py +54 -0
- forgecli/guards.py +403 -0
- forgecli/hooks.py +50 -0
- forgecli/httpapi.py +434 -0
- forgecli/images.py +110 -0
- forgecli/keys.py +152 -0
- forgecli/keyvault.py +320 -0
- forgecli/mcp.py +674 -0
- forgecli/memory.py +42 -0
- forgecli/openapi.py +331 -0
- forgecli/parallel.py +308 -0
- forgecli/prices.py +72 -0
- forgecli/procs.py +144 -0
- forgecli/providers.py +758 -0
- forgecli/quality.py +192 -0
- forgecli/repomap.py +78 -0
- forgecli/roster.py +227 -0
- forgecli/safety.py +93 -0
- forgecli/sandbox.py +83 -0
- forgecli/sessions.py +97 -0
- forgecli/skills.py +446 -0
- forgecli/tools.py +1184 -0
- forgecli/ui.py +860 -0
- forgecli/worktrees.py +79 -0
- forgecommandline-0.8.0.data/data/skills/commit/SKILL.md +14 -0
- forgecommandline-0.8.0.data/data/skills/debug/SKILL.md +17 -0
- forgecommandline-0.8.0.data/data/skills/explain/SKILL.md +14 -0
- forgecommandline-0.8.0.data/data/skills/init/SKILL.md +19 -0
- forgecommandline-0.8.0.data/data/skills/library/LICENSES/agent-skills-MIT.txt +21 -0
- forgecommandline-0.8.0.data/data/skills/library/LICENSES/wondelai-MIT.txt +23 -0
- forgecommandline-0.8.0.data/data/skills/library/README.md +9 -0
- forgecommandline-0.8.0.data/data/skills/library/_references/accessibility-checklist.md +160 -0
- forgecommandline-0.8.0.data/data/skills/library/_references/definition-of-done.md +67 -0
- forgecommandline-0.8.0.data/data/skills/library/_references/observability-checklist.md +92 -0
- forgecommandline-0.8.0.data/data/skills/library/_references/orchestration-patterns.md +370 -0
- forgecommandline-0.8.0.data/data/skills/library/_references/performance-checklist.md +238 -0
- forgecommandline-0.8.0.data/data/skills/library/_references/security-checklist.md +248 -0
- forgecommandline-0.8.0.data/data/skills/library/_references/testing-patterns.md +235 -0
- forgecommandline-0.8.0.data/data/skills/library/api-and-interface-design/SKILL.md +367 -0
- forgecommandline-0.8.0.data/data/skills/library/architecture-optimization/SKILL.md +279 -0
- forgecommandline-0.8.0.data/data/skills/library/architecture-optimization/references/artifact-templates.md +157 -0
- forgecommandline-0.8.0.data/data/skills/library/architecture-optimization/references/methods.md +87 -0
- forgecommandline-0.8.0.data/data/skills/library/awwwards-tier-web-application/SKILL.md +877 -0
- forgecommandline-0.8.0.data/data/skills/library/browser-testing-with-devtools/SKILL.md +317 -0
- forgecommandline-0.8.0.data/data/skills/library/ci-cd-and-automation/SKILL.md +390 -0
- forgecommandline-0.8.0.data/data/skills/library/code-review-and-quality/SKILL.md +398 -0
- forgecommandline-0.8.0.data/data/skills/library/code-simplification/SKILL.md +331 -0
- forgecommandline-0.8.0.data/data/skills/library/constraint-driven-development/SKILL.md +311 -0
- forgecommandline-0.8.0.data/data/skills/library/constraint-driven-development/references/floor-guard.md +182 -0
- forgecommandline-0.8.0.data/data/skills/library/context-engineering/SKILL.md +353 -0
- forgecommandline-0.8.0.data/data/skills/library/debugging-and-error-recovery/SKILL.md +300 -0
- forgecommandline-0.8.0.data/data/skills/library/deprecation-and-migration/SKILL.md +247 -0
- forgecommandline-0.8.0.data/data/skills/library/documentation-and-adrs/SKILL.md +297 -0
- forgecommandline-0.8.0.data/data/skills/library/doubt-driven-development/SKILL.md +243 -0
- forgecommandline-0.8.0.data/data/skills/library/frontend-ui-engineering/SKILL.md +340 -0
- forgecommandline-0.8.0.data/data/skills/library/git-workflow-and-versioning/SKILL.md +355 -0
- forgecommandline-0.8.0.data/data/skills/library/idea-refine/SKILL.md +193 -0
- forgecommandline-0.8.0.data/data/skills/library/idea-refine/examples.md +238 -0
- forgecommandline-0.8.0.data/data/skills/library/idea-refine/frameworks.md +99 -0
- forgecommandline-0.8.0.data/data/skills/library/idea-refine/refinement-criteria.md +113 -0
- forgecommandline-0.8.0.data/data/skills/library/idea-refine/scripts/idea-refine.sh +15 -0
- forgecommandline-0.8.0.data/data/skills/library/improve-code-quality/SKILL.md +275 -0
- forgecommandline-0.8.0.data/data/skills/library/improve-code-quality/references/artifact-templates.md +101 -0
- forgecommandline-0.8.0.data/data/skills/library/incremental-implementation/SKILL.md +249 -0
- forgecommandline-0.8.0.data/data/skills/library/interview-me/SKILL.md +235 -0
- forgecommandline-0.8.0.data/data/skills/library/observability-and-instrumentation/SKILL.md +238 -0
- forgecommandline-0.8.0.data/data/skills/library/performance-optimization/SKILL.md +267 -0
- forgecommandline-0.8.0.data/data/skills/library/performance-optimization/references/optimization-patterns.md +250 -0
- forgecommandline-0.8.0.data/data/skills/library/planning-and-task-breakdown/SKILL.md +257 -0
- forgecommandline-0.8.0.data/data/skills/library/remove-technical-debt/SKILL.md +203 -0
- forgecommandline-0.8.0.data/data/skills/library/remove-technical-debt/references/artifact-templates.md +79 -0
- forgecommandline-0.8.0.data/data/skills/library/security-and-hardening/SKILL.md +216 -0
- forgecommandline-0.8.0.data/data/skills/library/security-and-hardening/references/hardening-patterns.md +324 -0
- forgecommandline-0.8.0.data/data/skills/library/shipping-and-launch/SKILL.md +336 -0
- forgecommandline-0.8.0.data/data/skills/library/source-driven-development/SKILL.md +216 -0
- forgecommandline-0.8.0.data/data/skills/library/spec-driven-development/SKILL.md +259 -0
- forgecommandline-0.8.0.data/data/skills/library/system-design/SKILL.md +207 -0
- forgecommandline-0.8.0.data/data/skills/library/system-design/references/building-blocks.md +272 -0
- forgecommandline-0.8.0.data/data/skills/library/system-design/references/common-designs.md +257 -0
- forgecommandline-0.8.0.data/data/skills/library/system-design/references/database-scaling.md +295 -0
- forgecommandline-0.8.0.data/data/skills/library/system-design/references/estimation-numbers.md +250 -0
- forgecommandline-0.8.0.data/data/skills/library/system-design/references/four-step-process.md +286 -0
- forgecommandline-0.8.0.data/data/skills/library/system-design/references/reliability-operations.md +373 -0
- forgecommandline-0.8.0.data/data/skills/library/test-driven-development/SKILL.md +398 -0
- forgecommandline-0.8.0.data/data/skills/library/using-agent-skills/SKILL.md +192 -0
- forgecommandline-0.8.0.data/data/skills/review/SKILL.md +16 -0
- forgecommandline-0.8.0.data/data/skills/run/SKILL.md +17 -0
- forgecommandline-0.8.0.data/data/skills/security-review/SKILL.md +20 -0
- forgecommandline-0.8.0.data/data/skills/simplify/SKILL.md +18 -0
- forgecommandline-0.8.0.data/data/skills/test/SKILL.md +16 -0
- forgecommandline-0.8.0.data/data/skills/web-build/SKILL.md +25 -0
- forgecommandline-0.8.0.dist-info/METADATA +357 -0
- forgecommandline-0.8.0.dist-info/RECORD +113 -0
- forgecommandline-0.8.0.dist-info/WHEEL +5 -0
- forgecommandline-0.8.0.dist-info/entry_points.txt +2 -0
- forgecommandline-0.8.0.dist-info/top_level.txt +1 -0
forgecli/worktrees.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"""Separate git worktrees for parallel agents, so two agents editing the same project never overwrite
|
|
2
|
+
each other. Each agent gets its own checkout of the current commit on its own branch
|
|
3
|
+
(forge/agent-N-<time>) under .forge/worktrees/; its changes are committed there and the main agent
|
|
4
|
+
(or you) merges the branches it wants. Turned on with FORGE_WORKTREES=1 or the run_parallel `isolate`
|
|
5
|
+
option; needs git and a project that is a git repository with at least one commit."""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import os
|
|
9
|
+
import pathlib
|
|
10
|
+
import shutil
|
|
11
|
+
import subprocess
|
|
12
|
+
import time
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _git(args, cwd, timeout=60):
|
|
16
|
+
return subprocess.run(["git", *args], cwd=str(cwd), capture_output=True, text=True,
|
|
17
|
+
encoding="utf-8", errors="replace", timeout=timeout)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def wanted(isolate: bool | None = None) -> bool:
|
|
21
|
+
if isolate is not None:
|
|
22
|
+
return bool(isolate)
|
|
23
|
+
return os.environ.get("FORGE_WORKTREES", "").strip().lower() in ("1", "on", "true", "yes")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def repo_root(cwd) -> pathlib.Path | None:
|
|
27
|
+
if not shutil.which("git"):
|
|
28
|
+
return None
|
|
29
|
+
try:
|
|
30
|
+
r = _git(["rev-parse", "--show-toplevel"], cwd, 10)
|
|
31
|
+
if r.returncode != 0:
|
|
32
|
+
return None
|
|
33
|
+
if _git(["rev-parse", "--verify", "HEAD"], cwd, 10).returncode != 0:
|
|
34
|
+
return None # no commit yet: nothing to check out
|
|
35
|
+
return pathlib.Path(r.stdout.strip())
|
|
36
|
+
except (OSError, subprocess.TimeoutExpired):
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def create(root: pathlib.Path, n: int, stamp: str | None = None) -> tuple[pathlib.Path, str] | None:
|
|
41
|
+
stamp = stamp or time.strftime("%Y%m%d-%H%M%S")
|
|
42
|
+
branch = f"forge/agent-{n}-{stamp}"
|
|
43
|
+
path = root / ".forge" / "worktrees" / f"agent-{n}-{stamp}"
|
|
44
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
45
|
+
_exclude(root)
|
|
46
|
+
r = _git(["worktree", "add", "-b", branch, str(path), "HEAD"], root)
|
|
47
|
+
return (path, branch) if r.returncode == 0 else None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _exclude(root: pathlib.Path) -> None:
|
|
51
|
+
"""Keep .forge/worktrees out of `git status` without touching the project's .gitignore."""
|
|
52
|
+
try:
|
|
53
|
+
info = pathlib.Path(_git(["rev-parse", "--git-path", "info/exclude"], root, 10).stdout.strip())
|
|
54
|
+
info = info if info.is_absolute() else root / info
|
|
55
|
+
text = info.read_text(encoding="utf-8") if info.exists() else ""
|
|
56
|
+
if ".forge/worktrees/" not in text:
|
|
57
|
+
info.parent.mkdir(parents=True, exist_ok=True)
|
|
58
|
+
info.write_text(text + ("" if text.endswith("\n") or not text else "\n") + ".forge/worktrees/\n",
|
|
59
|
+
encoding="utf-8")
|
|
60
|
+
except (OSError, subprocess.TimeoutExpired):
|
|
61
|
+
pass
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def finish(root: pathlib.Path, path: pathlib.Path, branch: str, task: str) -> str:
|
|
65
|
+
"""Commit the agent's work on its branch; remove the checkout (the branch stays). One-line summary."""
|
|
66
|
+
try:
|
|
67
|
+
_git(["add", "-A"], path)
|
|
68
|
+
changed = _git(["diff", "--cached", "--stat"], path).stdout.strip()
|
|
69
|
+
if changed:
|
|
70
|
+
_git(["-c", "user.name=Forge agent", "-c", "user.email=forge@localhost", "commit", "-q",
|
|
71
|
+
"-m", f"forge agent: {task[:70]}"], path)
|
|
72
|
+
_git(["worktree", "remove", "--force", str(path)], root)
|
|
73
|
+
if not changed:
|
|
74
|
+
_git(["branch", "-D", branch], root)
|
|
75
|
+
return "no file changes (branch removed)"
|
|
76
|
+
last = changed.splitlines()[-1].strip()
|
|
77
|
+
return f"committed on branch `{branch}` ({last}); merge with `git merge {branch}`"
|
|
78
|
+
except (OSError, subprocess.TimeoutExpired) as e:
|
|
79
|
+
return f"worktree left at {path} on branch `{branch}` ({e})"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit
|
|
3
|
+
description: Commit changes - stage the current changes and write a clear git commit message
|
|
4
|
+
---
|
|
5
|
+
# Commit
|
|
6
|
+
|
|
7
|
+
1. Run `git status` and `git diff` to see every change. If nothing changed, say so and stop.
|
|
8
|
+
2. Check for files that should not be committed (.env, keys, large binaries, build output).
|
|
9
|
+
If you see any, stop and ask the user before staging.
|
|
10
|
+
3. Stage the relevant files by name (avoid `git add -A` if unrelated files are present).
|
|
11
|
+
4. Write the message: a subject line under 70 characters in the imperative ("Add …", "Fix …"),
|
|
12
|
+
a blank line, then a short body saying why the change was made.
|
|
13
|
+
5. Commit, then run `git log -1 --stat` and report the result.
|
|
14
|
+
Never push, amend, or force anything unless the user asks.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug
|
|
3
|
+
description: Find and fix the real cause of a bug, error or crash - reproduce, narrow down, fix, prove it
|
|
4
|
+
---
|
|
5
|
+
# Debug
|
|
6
|
+
|
|
7
|
+
1. Reproduce first. Run the failing command or test and capture the exact error. If you can't make it
|
|
8
|
+
fail, ask the user for the steps or input — don't fix blind.
|
|
9
|
+
2. Read the stack trace from the bottom up to the first line in this project's code. Read that code and
|
|
10
|
+
what calls it.
|
|
11
|
+
3. Form one hypothesis at a time and test it cheaply: print/log the values, run a smaller input, check
|
|
12
|
+
the git history of the lines (`git log -L` or `git blame`) to see what changed recently.
|
|
13
|
+
4. Fix the cause, not the symptom. Avoid try/except that hides the error, sleeps that hide timing bugs,
|
|
14
|
+
or special cases for one input.
|
|
15
|
+
5. Prove it: rerun the reproduction (now passes), then the related tests. Where it fits, add a test
|
|
16
|
+
that would have caught the bug.
|
|
17
|
+
6. Report: the cause in one or two sentences, the fix, and how you verified it.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explain
|
|
3
|
+
description: Explain how a file, folder, function or feature works - what this code does and why, for someone new to the code
|
|
4
|
+
---
|
|
5
|
+
# Explain
|
|
6
|
+
|
|
7
|
+
1. Find the entry points: list the folder, read the README if there is one, then the files the
|
|
8
|
+
user named (or the main file).
|
|
9
|
+
2. Follow the flow the user asked about by reading the code; grep for names you are unsure of.
|
|
10
|
+
3. Explain in this order:
|
|
11
|
+
- What it is for, in two sentences.
|
|
12
|
+
- The main pieces and how data moves between them (reference `path:line`).
|
|
13
|
+
- Anything surprising: hidden side effects, config it depends on, known gotchas.
|
|
14
|
+
4. Keep it short. Use a small diagram in a code block only if it truly helps.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init
|
|
3
|
+
description: Study this project and write a FORGE.md with how to build, run and test it, its structure and conventions
|
|
4
|
+
---
|
|
5
|
+
# Init: write FORGE.md
|
|
6
|
+
|
|
7
|
+
Forge reads FORGE.md (or CLAUDE.md / AGENTS.md) from the project folder into every conversation,
|
|
8
|
+
so this file should hold what a new teammate needs and can't guess quickly.
|
|
9
|
+
|
|
10
|
+
1. Look around: list_dir the root, read the README, package files (package.json, pyproject.toml,
|
|
11
|
+
requirements.txt, Cargo.toml, go.mod…), CI config, and a couple of central source files.
|
|
12
|
+
2. Find the real commands: install, run/dev server, build, test, lint, format. Prefer ones you saw in
|
|
13
|
+
config files or scripts; run the test command once if it's quick, to confirm it works.
|
|
14
|
+
3. Write FORGE.md (if CLAUDE.md or AGENTS.md exists, update that instead) with short sections:
|
|
15
|
+
- Commands (copy-pasteable)
|
|
16
|
+
- Layout: the main folders and what lives in each, in a few lines
|
|
17
|
+
- Conventions you saw: code style, naming, how errors are handled, where tests go
|
|
18
|
+
- Gotchas: anything surprising (env vars needed, generated files not to edit, slow steps)
|
|
19
|
+
4. Keep it under ~80 lines. No generic advice ("write clean code") — only things specific to this project.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Addy Osmani
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) wondelai
|
|
4
|
+
|
|
5
|
+
Applies to: architecture-optimization, improve-code-quality, remove-technical-debt, system-design (each SKILL.md declares license: MIT, author: wondelai).
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Bundled engineering skills
|
|
2
|
+
|
|
3
|
+
These ship with Forge so they work without Claude Code and without `/skills sync`.
|
|
4
|
+
|
|
5
|
+
- From [addyosmani/agent-skills](https://github.com/addyosmani/agent-skills), MIT (LICENSES/agent-skills-MIT.txt): api-and-interface-design, browser-testing-with-devtools, ci-cd-and-automation, code-review-and-quality, code-simplification, constraint-driven-development, context-engineering, debugging-and-error-recovery, deprecation-and-migration, documentation-and-adrs, doubt-driven-development, frontend-ui-engineering, git-workflow-and-versioning, idea-refine, incremental-implementation, interview-me, observability-and-instrumentation, performance-optimization, planning-and-task-breakdown, security-and-hardening, shipping-and-launch, source-driven-development, spec-driven-development, test-driven-development, using-agent-skills.
|
|
6
|
+
- From wondelai, MIT (LICENSES/wondelai-MIT.txt): architecture-optimization, improve-code-quality, remove-technical-debt, system-design.
|
|
7
|
+
|
|
8
|
+
`_references/` holds the checklists the agent-skills link to. Refresh with the bundle script; a skill in ~/.forge/skills or .forge/skills with the same name overrides one here.
|
|
9
|
+
- By the Forge author (Harry Sigei), shipped with Forge: awwwards-tier-web-application.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Accessibility Checklist
|
|
2
|
+
|
|
3
|
+
Quick reference for WCAG 2.1 AA compliance. Use alongside the `frontend-ui-engineering` skill.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Essential Checks](#essential-checks)
|
|
8
|
+
- [Common HTML Patterns](#common-html-patterns)
|
|
9
|
+
- [Testing Tools](#testing-tools)
|
|
10
|
+
- [Quick Reference: ARIA Live Regions](#quick-reference-aria-live-regions)
|
|
11
|
+
- [Common Anti-Patterns](#common-anti-patterns)
|
|
12
|
+
|
|
13
|
+
## Essential Checks
|
|
14
|
+
|
|
15
|
+
### Keyboard Navigation
|
|
16
|
+
- [ ] All interactive elements focusable via Tab key
|
|
17
|
+
- [ ] Focus order follows visual/logical order
|
|
18
|
+
- [ ] Focus is visible (outline/ring on focused elements)
|
|
19
|
+
- [ ] Custom widgets have keyboard support (Enter to activate, Escape to close)
|
|
20
|
+
- [ ] No keyboard traps (user can always Tab away from a component)
|
|
21
|
+
- [ ] Skip-to-content link at top of page - visible (at least) on keyboard focus
|
|
22
|
+
- [ ] Modals trap focus while open, return focus on close
|
|
23
|
+
|
|
24
|
+
### Screen Readers
|
|
25
|
+
- [ ] All images have `alt` text (or `alt=""` for decorative images)
|
|
26
|
+
- [ ] All form inputs have associated labels (`<label>` or `aria-label`)
|
|
27
|
+
- [ ] Buttons and links have descriptive text (not "Click here")
|
|
28
|
+
- [ ] Icon-only buttons have `aria-label`
|
|
29
|
+
- [ ] Page has one `<h1>` and headings don't skip levels
|
|
30
|
+
- [ ] Dynamic content changes announced (`aria-live` regions)
|
|
31
|
+
- [ ] Tables have `<th>` headers with scope
|
|
32
|
+
|
|
33
|
+
### Visual
|
|
34
|
+
- [ ] Text contrast ≥ 4.5:1 (normal text) or ≥ 3:1 (large text, 18px+)
|
|
35
|
+
- [ ] UI components contrast ≥ 3:1 against background
|
|
36
|
+
- [ ] Color is not the only way to convey information
|
|
37
|
+
- [ ] Text resizable to 200% without breaking layout
|
|
38
|
+
- [ ] No content that flashes more than 3 times per second
|
|
39
|
+
|
|
40
|
+
### Forms
|
|
41
|
+
- [ ] Every input has a visible label
|
|
42
|
+
- [ ] Required fields indicated (not by color alone)
|
|
43
|
+
- [ ] Error messages specific and associated with the field
|
|
44
|
+
- [ ] Error state visible by more than color (icon, text, border)
|
|
45
|
+
- [ ] Form submission errors summarized and focusable
|
|
46
|
+
- [ ] Known fields use autocomplete (for example `type="email" autocomplete="email"`)
|
|
47
|
+
|
|
48
|
+
### Content
|
|
49
|
+
- [ ] Language declared (`<html lang="en">`)
|
|
50
|
+
- [ ] Page has a descriptive `<title>`
|
|
51
|
+
- [ ] Links distinguish from surrounding text (not by color alone)
|
|
52
|
+
- [ ] Touch targets ≥ 44x44px on mobile
|
|
53
|
+
- [ ] Meaningful empty states (not blank screens)
|
|
54
|
+
|
|
55
|
+
## Common HTML Patterns
|
|
56
|
+
|
|
57
|
+
### Buttons vs. Links
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<!-- Use <button> for actions -->
|
|
61
|
+
<button onClick={handleDelete}>Delete Task</button>
|
|
62
|
+
|
|
63
|
+
<!-- Use <a> for navigation -->
|
|
64
|
+
<a href="/tasks/123">View Task</a>
|
|
65
|
+
|
|
66
|
+
<!-- NEVER use div/span as buttons -->
|
|
67
|
+
<div onClick={handleDelete}>Delete</div> <!-- BAD -->
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Form Labels
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<!-- Explicit label association -->
|
|
74
|
+
<label htmlFor="email">Email address</label>
|
|
75
|
+
<input id="email" type="email" required />
|
|
76
|
+
|
|
77
|
+
<!-- Implicit wrapping -->
|
|
78
|
+
<label>
|
|
79
|
+
Email address
|
|
80
|
+
<input type="email" required />
|
|
81
|
+
</label>
|
|
82
|
+
|
|
83
|
+
<!-- Hidden label (visible label preferred) -->
|
|
84
|
+
<input type="search" aria-label="Search tasks" />
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### ARIA Roles
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<!-- Navigation -->
|
|
91
|
+
<nav aria-label="Main navigation">...</nav>
|
|
92
|
+
<nav aria-label="Footer links">...</nav>
|
|
93
|
+
|
|
94
|
+
<!-- Status messages -->
|
|
95
|
+
<div role="status" aria-live="polite">Task saved</div>
|
|
96
|
+
|
|
97
|
+
<!-- Alert messages -->
|
|
98
|
+
<div role="alert">Error: Title is required</div>
|
|
99
|
+
|
|
100
|
+
<!-- Modal dialogs -->
|
|
101
|
+
<dialog aria-modal="true" aria-labelledby="dialog-title">
|
|
102
|
+
<h2 id="dialog-title">Confirm Delete</h2>
|
|
103
|
+
...
|
|
104
|
+
</dialog>
|
|
105
|
+
|
|
106
|
+
<!-- Loading states -->
|
|
107
|
+
<div aria-busy="true" aria-label="Loading tasks">
|
|
108
|
+
<Spinner />
|
|
109
|
+
</div>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Accessible Lists
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<ul role="list" aria-label="Tasks">
|
|
116
|
+
<li>
|
|
117
|
+
<input type="checkbox" id="task-1" aria-label="Complete: Buy groceries" />
|
|
118
|
+
<label htmlFor="task-1">Buy groceries</label>
|
|
119
|
+
</li>
|
|
120
|
+
</ul>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Testing Tools
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Automated audit
|
|
127
|
+
npx axe-core # Programmatic accessibility testing
|
|
128
|
+
npx pa11y # CLI accessibility checker
|
|
129
|
+
|
|
130
|
+
# In browser
|
|
131
|
+
# Chrome DevTools → Lighthouse → Accessibility
|
|
132
|
+
# Chrome DevTools → Elements → Accessibility tree
|
|
133
|
+
|
|
134
|
+
# Screen reader testing
|
|
135
|
+
# macOS: VoiceOver (Cmd + F5)
|
|
136
|
+
# Windows: NVDA (free) or JAWS
|
|
137
|
+
# Linux: Orca
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Quick Reference: ARIA Live Regions
|
|
141
|
+
|
|
142
|
+
| Value | Behavior | Use For |
|
|
143
|
+
|-------|----------|---------|
|
|
144
|
+
| `aria-live="polite"` | Announced at next pause | Status updates, saved confirmations |
|
|
145
|
+
| `aria-live="assertive"` | Announced immediately | Errors, time-sensitive alerts |
|
|
146
|
+
| `role="status"` | Same as `polite` | Status messages |
|
|
147
|
+
| `role="alert"` | Same as `assertive` | Error messages |
|
|
148
|
+
|
|
149
|
+
## Common Anti-Patterns
|
|
150
|
+
|
|
151
|
+
| Anti-Pattern | Problem | Fix |
|
|
152
|
+
|---|---|---|
|
|
153
|
+
| `div` as button | Not focusable, no keyboard support | Use `<button>` |
|
|
154
|
+
| Missing `alt` text | Images invisible to screen readers | Add descriptive `alt` |
|
|
155
|
+
| Color-only states | Invisible to color-blind users | Add icons, text, or patterns |
|
|
156
|
+
| Autoplaying media | Disorienting, can't be stopped | Add controls, don't autoplay |
|
|
157
|
+
| Custom dropdown with no ARIA | Unusable by keyboard/screen reader | Use native `<select>` or proper ARIA listbox |
|
|
158
|
+
| Removing focus outlines | Users can't see where they are | Style outlines, don't remove them |
|
|
159
|
+
| Empty links/buttons | "Link" announced with no description | Add text or `aria-label` |
|
|
160
|
+
| `tabindex > 0` | Breaks natural tab order | Use `tabindex="0"` or `-1` only |
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Definition of Done
|
|
2
|
+
|
|
3
|
+
A standing, project-wide bar that every change must clear before it counts as done. Unlike acceptance criteria, which vary per task and answer "did we build the right thing?", the Definition of Done is the same every time and answers "is this finished to our standard?". Use it as the final gate in `planning-and-task-breakdown`, `incremental-implementation`, and `shipping-and-launch`.
|
|
4
|
+
|
|
5
|
+
## Definition of Done vs. Acceptance Criteria
|
|
6
|
+
|
|
7
|
+
| | Acceptance Criteria | Definition of Done |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Scope | Specific to one task or spec | Applies to every increment |
|
|
10
|
+
| Changes | Different for each item | Fixed and reused |
|
|
11
|
+
| Answers | "Did we build *this thing*?" | "Is it *ready*?" |
|
|
12
|
+
| Owner | Defined when planning the task | Defined once for the project |
|
|
13
|
+
| Example | "User can reset password via email link" | "Tests pass, no regressions, docs updated" |
|
|
14
|
+
|
|
15
|
+
The two are complementary. A task is done only when **its** acceptance criteria are met **and** the standing Definition of Done is satisfied. Skipping either leaves work that looks finished but is not.
|
|
16
|
+
|
|
17
|
+
## The Standing Checklist
|
|
18
|
+
|
|
19
|
+
Apply this to every change before declaring it done.
|
|
20
|
+
|
|
21
|
+
### Correctness
|
|
22
|
+
- [ ] All acceptance criteria for the task are met
|
|
23
|
+
- [ ] Code runs and behaves as intended, verified at runtime, not just compiled or typechecked
|
|
24
|
+
- [ ] New behavior is covered by tests that fail without the change and pass with it
|
|
25
|
+
- [ ] Existing tests still pass; no regressions introduced
|
|
26
|
+
- [ ] Edge cases and error paths are handled, not just the happy path
|
|
27
|
+
|
|
28
|
+
### Quality
|
|
29
|
+
- [ ] Code reveals intent through naming and structure; no comments needed to explain *what* it does
|
|
30
|
+
- [ ] No duplicated business logic
|
|
31
|
+
- [ ] No dead code, debug output, or commented-out blocks left behind
|
|
32
|
+
- [ ] Changes are scoped to the task; no unrelated refactors snuck in
|
|
33
|
+
- [ ] Linting and formatting pass
|
|
34
|
+
|
|
35
|
+
The depth behind these items lives in `code-review-and-quality` (the five-axis review) and `code-simplification` (reducing complexity without changing behavior).
|
|
36
|
+
|
|
37
|
+
### Integration
|
|
38
|
+
- [ ] Change works with the rest of the system, not just in isolation
|
|
39
|
+
- [ ] Database migrations, config changes, and feature flags are accounted for
|
|
40
|
+
- [ ] Backward compatibility considered for any public interface or API change
|
|
41
|
+
|
|
42
|
+
### Documentation
|
|
43
|
+
- [ ] Public interfaces, APIs, and user-facing behavior are documented
|
|
44
|
+
- [ ] Architectural decisions worth preserving are recorded (see `documentation-and-adrs`)
|
|
45
|
+
- [ ] Documentation describes the current state in timeless language, not the change history
|
|
46
|
+
|
|
47
|
+
### Ship-readiness
|
|
48
|
+
- [ ] Security implications reviewed for any untrusted input, auth, or data handling (see `security-and-hardening`)
|
|
49
|
+
- [ ] Observability in place for new critical paths (logs, metrics, traces) (see `observability-and-instrumentation`)
|
|
50
|
+
- [ ] Rollback path exists for anything risky (see `shipping-and-launch`)
|
|
51
|
+
- [ ] The human has reviewed and approved before merge or deploy
|
|
52
|
+
|
|
53
|
+
## How to Apply
|
|
54
|
+
|
|
55
|
+
- **Per task**: confirm the Correctness and Quality sections before checking the task off.
|
|
56
|
+
- **Per feature**: confirm Integration and Documentation before considering the feature complete.
|
|
57
|
+
- **Per release**: the full checklist is the floor; `shipping-and-launch` adds the deploy-specific gates on top.
|
|
58
|
+
|
|
59
|
+
Tailor the list to the project once, then reuse it unchanged. A Definition of Done that is renegotiated every sprint is not a Definition of Done.
|
|
60
|
+
|
|
61
|
+
## Red Flags
|
|
62
|
+
|
|
63
|
+
- "It's done, I just haven't run it yet": unverified work is not done.
|
|
64
|
+
- "Tests pass" used as a synonym for done while docs, regressions, or runtime verification are skipped.
|
|
65
|
+
- A different bar applied depending on deadline pressure.
|
|
66
|
+
- Acceptance criteria treated as the whole bar, with no standing quality floor.
|
|
67
|
+
- "Done" declared before human review on changes that need it.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Observability Checklist
|
|
2
|
+
|
|
3
|
+
Quick reference for instrumenting production code. Use alongside the `observability-and-instrumentation` skill.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [On-Call Questions (Start Here)](#on-call-questions-start-here)
|
|
8
|
+
- [Structured Logging](#structured-logging)
|
|
9
|
+
- [Metrics](#metrics)
|
|
10
|
+
- [Distributed Tracing](#distributed-tracing)
|
|
11
|
+
- [Alerting](#alerting)
|
|
12
|
+
- [Dashboards](#dashboards)
|
|
13
|
+
- [Verify the Telemetry](#verify-the-telemetry)
|
|
14
|
+
- [Pre-Launch Gate](#pre-launch-gate)
|
|
15
|
+
|
|
16
|
+
## On-Call Questions (Start Here)
|
|
17
|
+
|
|
18
|
+
Telemetry without a question is noise. Before instrumenting anything:
|
|
19
|
+
|
|
20
|
+
- [ ] 2–4 questions an on-call engineer will ask about this feature are written down
|
|
21
|
+
- [ ] Every signal below maps to one of those questions
|
|
22
|
+
- [ ] Each question is matched to the right signal type: metrics say **that** something is wrong, traces say **where**, logs say **why**
|
|
23
|
+
|
|
24
|
+
## Structured Logging
|
|
25
|
+
|
|
26
|
+
- [ ] Logs are structured (JSON) with stable event names — not free-form strings
|
|
27
|
+
- [ ] Every log line carries a correlation/request ID, generated or accepted at the system boundary
|
|
28
|
+
- [ ] Correlation ID is propagated on every outbound call and async boundary (HTTP headers, queue metadata)
|
|
29
|
+
- [ ] Any log stream written by more than one entry point (scheduler, replay endpoint, manual run) carries an entry-point field, set where the run starts and propagated alongside the correlation ID
|
|
30
|
+
- [ ] Log levels are consistent: `error` = invariant broken, someone may act; `warn` = degraded but handled; `info` = significant business event; `debug` = off in production
|
|
31
|
+
- [ ] No secrets, tokens, passwords, or unredacted PII in any log line (hard rule from `security-and-hardening`)
|
|
32
|
+
- [ ] Fields are allowlisted — no whole request/response bodies, no auth headers
|
|
33
|
+
- [ ] External service calls logged with metadata only: endpoint, status, latency, attempt count, sanitized identifiers
|
|
34
|
+
- [ ] Actual log output spot-checked: structured fields, not `[object Object]`
|
|
35
|
+
|
|
36
|
+
## Metrics
|
|
37
|
+
|
|
38
|
+
- [ ] **RED** instrumented for every endpoint and every external dependency: Rate, Errors, Duration
|
|
39
|
+
- [ ] **USE** instrumented for every resource (queues, pools, hosts): Utilization, Saturation, Errors
|
|
40
|
+
- [ ] Latency is a histogram; p50/p95/p99 queryable — never an average
|
|
41
|
+
- [ ] All labels come from small, fixed sets (route template, status class, provider name)
|
|
42
|
+
- [ ] No unbounded label values: no user IDs, tenant IDs, emails, raw URLs, request IDs, or error message text
|
|
43
|
+
- [ ] Status codes grouped by class (`5xx`, not `503`)
|
|
44
|
+
- [ ] Queue depth and processing duration tracked for every worker/queue
|
|
45
|
+
|
|
46
|
+
## Distributed Tracing
|
|
47
|
+
|
|
48
|
+
- [ ] OpenTelemetry (or equivalent) initialized at service startup, before other imports
|
|
49
|
+
- [ ] Auto-instrumentation enabled for HTTP, gRPC, and DB clients
|
|
50
|
+
- [ ] Trace context propagated on every outbound call (W3C `traceparent`/`tracestate`) and extracted from every inbound request
|
|
51
|
+
- [ ] Context survives async boundaries — queue messages carry trace metadata
|
|
52
|
+
- [ ] Manual spans only around meaningful internal units of work, with the attributes on-call will filter by
|
|
53
|
+
- [ ] No secrets or PII as span attributes
|
|
54
|
+
- [ ] Head-based sampling at a low default rate; 100% of errors kept if tail sampling is available
|
|
55
|
+
|
|
56
|
+
## Alerting
|
|
57
|
+
|
|
58
|
+
- [ ] Every alert is symptom-based (error rate, p99 latency, queue age) — causes (CPU, disk, restarts) go to dashboards, not pagers
|
|
59
|
+
- [ ] Every alert is actionable; "ignore it, it self-heals" alerts are deleted
|
|
60
|
+
- [ ] Every alert links to a runbook — minimum three lines: what it means, first query to run, escalation path
|
|
61
|
+
- [ ] Thresholds and durations justified by an SLO or historical data, not guesses
|
|
62
|
+
- [ ] Two severities only: **page** (user-facing, act now) and **ticket** (degradation, act this week)
|
|
63
|
+
- [ ] Each new alert test-fired once: it reached the right channel and the runbook link works
|
|
64
|
+
- [ ] No alerts that fire daily and get acknowledged without action
|
|
65
|
+
|
|
66
|
+
## Dashboards
|
|
67
|
+
|
|
68
|
+
- [ ] Service health dashboard exists: error rate, latency p99, traffic, saturation
|
|
69
|
+
- [ ] Dependency health panel shows per-service error rates and latency
|
|
70
|
+
- [ ] Dashboard answers the on-call questions from the top of this checklist — not "everything except the answer"
|
|
71
|
+
- [ ] Default time range is sensible (1h–6h, not 30d)
|
|
72
|
+
|
|
73
|
+
## Verify the Telemetry
|
|
74
|
+
|
|
75
|
+
Instrumentation is code; it can be wrong:
|
|
76
|
+
|
|
77
|
+
- [ ] Forced an error in staging → found it in the logs by correlation ID
|
|
78
|
+
- [ ] Sent test traffic → metric series appear with expected labels and sane values
|
|
79
|
+
- [ ] Followed one request end-to-end in the tracing UI → no broken spans
|
|
80
|
+
- [ ] An induced failure was diagnosed from telemetry alone, without reading the source
|
|
81
|
+
|
|
82
|
+
## Pre-Launch Gate
|
|
83
|
+
|
|
84
|
+
Before a feature ships to production, all of the following are true:
|
|
85
|
+
|
|
86
|
+
- [ ] Structured logs flowing to the log aggregator
|
|
87
|
+
- [ ] RED metrics visible in dashboards for every new endpoint and dependency
|
|
88
|
+
- [ ] At least one symptom-based alert configured, with runbook, test-fired
|
|
89
|
+
- [ ] A request can be traced across every service it touches
|
|
90
|
+
- [ ] On-call knows where the runbooks are
|
|
91
|
+
|
|
92
|
+
For launch-day monitoring sequence and rollback triggers, see the `shipping-and-launch` skill.
|