Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

Commit f16a955

Browse files
z23ccclaude
andcommitted
feat(skills): add references/, pre-launch checklist, skill discovery guide (v0.1.39)
1. references/ directory with 4 standalone checklists: - accessibility-checklist.md (WCAG 2.1 AA) - performance-checklist.md (Core Web Vitals, backend, frontend) - security-checklist.md (OWASP Top 10, headers, secrets, deps) - testing-patterns.md (AAA, pyramid, anti-patterns, Prove-It) Cross-referenced from frontend-ui, security, and tdd skills. 2. Pre-launch checklist in close phase (flow-code-run + work phases.md): 6-dimension gate: code quality, security, performance, accessibility, infrastructure, documentation. Skips non-applicable dimensions. 3. flow-code-guide meta-skill: skill selection flowchart, engineering skills table, reference checklist links, pipeline overview. Referenced from preamble startup sequence. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 720cb33 commit f16a955

13 files changed

Lines changed: 538 additions & 7 deletions

File tree

bin/flowctl

0 Bytes
Binary file not shown.

codex/skills/flow-code-work/phases.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,16 +504,25 @@ Context optimization. Each task gets fresh context:
504504

505505
---
506506

507-
## Step 15: Quality
507+
## Step 15: Quality & Pre-Launch Checklist
508508

509509
After all tasks complete (or periodically for large epics):
510510

511-
- Run relevant tests
512-
- Run lint/format per repo
511+
- Run `$FLOWCTL guard` (lint + type + test must pass)
513512
- If change is large/risky, run the quality auditor subagent:
514513
- Task flow-code:quality-auditor("Review recent changes")
515514
- Fix critical issues
516515

516+
**Pre-launch checklist** — verify all applicable dimensions before shipping:
517+
- **Code quality**: guard passes, no Critical/Important review findings open
518+
- **Security**: no secrets in code, input validated at boundaries (see `references/security-checklist.md`)
519+
- **Performance**: no N+1 queries, list endpoints paginated (see `references/performance-checklist.md`)
520+
- **Accessibility**: keyboard navigable, screen reader compatible (frontend changes — see `references/accessibility-checklist.md`)
521+
- **Infrastructure**: env vars documented, migrations reversible, feature flags configured
522+
- **Documentation**: README/CHANGELOG updated if user-facing, API docs match implementation
523+
524+
Skip dimensions not applicable to the change (e.g., skip accessibility for backend-only epics).
525+
517526
## Step 16: Ship
518527

519528
**Verify all tasks done**:

flowctl/crates/flowctl-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flowctl-cli"
3-
version = "0.1.38"
3+
version = "0.1.39"
44
description = "CLI entry point for flowctl"
55
edition.workspace = true
66
rust-version.workspace = true
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Accessibility Checklist (WCAG 2.1 AA)
2+
3+
Quick reference for `flow-code-frontend-ui` and code review. Every user-facing change should pass these checks.
4+
5+
## Keyboard Navigation
6+
7+
- [ ] All interactive elements reachable via Tab
8+
- [ ] Focus order follows visual reading order
9+
- [ ] Focus indicator visible on all focused elements
10+
- [ ] No keyboard traps (can Tab in AND out of every component)
11+
- [ ] Custom widgets handle Enter, Space, Escape, Arrow keys as expected
12+
- [ ] Skip-to-content link on pages with navigation
13+
14+
## Screen Readers
15+
16+
- [ ] All images have `alt` text (decorative images use `alt=""`)
17+
- [ ] Form inputs have associated `<label>` or `aria-label`
18+
- [ ] Icon-only buttons have `aria-label`
19+
- [ ] Page has one `<h1>`, heading levels don't skip (h1→h2→h3)
20+
- [ ] Landmark roles present: `<main>`, `<nav>`, `<header>`, `<footer>`
21+
- [ ] Dynamic content changes announced via `aria-live` regions
22+
- [ ] Tables have `<th>` headers with `scope` attributes
23+
24+
## Color & Contrast
25+
26+
- [ ] Text contrast ratio >= 4.5:1 (normal text), >= 3:1 (large text/UI components)
27+
- [ ] Color is NOT the sole indicator of state (add icons, text, or patterns)
28+
- [ ] UI is usable in high-contrast mode
29+
- [ ] Links distinguishable from body text without relying on color alone
30+
31+
## Forms
32+
33+
- [ ] Error messages associated with the field (via `aria-describedby` or `aria-errormessage`)
34+
- [ ] Required fields marked with `aria-required="true"` (not just `*`)
35+
- [ ] Autocomplete attributes on common fields (name, email, address)
36+
- [ ] Form validation errors summarized and focusable
37+
38+
## Motion & Media
39+
40+
- [ ] Animations respect `prefers-reduced-motion`
41+
- [ ] No content flashes more than 3 times per second
42+
- [ ] Video has captions; audio has transcripts
43+
- [ ] Auto-playing media has pause/stop control
44+
45+
## Responsive & Touch
46+
47+
- [ ] Touch targets >= 44x44px
48+
- [ ] Content readable at 200% zoom without horizontal scroll
49+
- [ ] Works in both portrait and landscape orientation
50+
- [ ] Pinch-to-zoom not disabled (`user-scalable=no` removed)
51+
52+
## Testing Tools
53+
54+
```bash
55+
# Browser extensions
56+
- axe DevTools (Deque)
57+
- WAVE (WebAIM)
58+
- Lighthouse accessibility audit
59+
60+
# CLI
61+
npx axe-core <url>
62+
npx pa11y <url>
63+
```
64+
65+
## Quick Test
66+
67+
1. Unplug mouse, navigate with keyboard only
68+
2. Turn on VoiceOver (Mac: Cmd+F5) / NVDA (Windows), listen to the page
69+
3. Zoom browser to 200%, check layout
70+
4. Run axe DevTools scan, fix all Critical/Serious issues
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Performance Checklist
2+
3+
Quick reference for `flow-code-performance` and code review. Measure first, optimize second.
4+
5+
## Core Web Vitals Targets
6+
7+
| Metric | Good | Needs Work | Poor |
8+
|--------|------|------------|------|
9+
| **LCP** (Largest Contentful Paint) | <= 2.5s | <= 4.0s | > 4.0s |
10+
| **INP** (Interaction to Next Paint) | <= 200ms | <= 500ms | > 500ms |
11+
| **CLS** (Cumulative Layout Shift) | <= 0.1 | <= 0.25 | > 0.25 |
12+
13+
## Frontend
14+
15+
- [ ] Images: use `<img loading="lazy">`, modern formats (WebP/AVIF), explicit `width`/`height`
16+
- [ ] Fonts: `font-display: swap`, preload critical fonts, subset unused glyphs
17+
- [ ] Bundle: code-split routes, tree-shake unused exports, analyze with `source-map-explorer`
18+
- [ ] CSS: no unused styles in critical path, `content-visibility: auto` for off-screen content
19+
- [ ] Scripts: defer non-critical JS, avoid render-blocking `<script>` tags
20+
- [ ] Caching: `Cache-Control` headers for static assets, service worker for repeat visits
21+
- [ ] Layout: no CLS from dynamic content (reserve space for images, ads, embeds)
22+
23+
## React / Frontend Frameworks
24+
25+
- [ ] No unnecessary re-renders (React DevTools Profiler)
26+
- [ ] `React.memo` only on measured bottlenecks (not everywhere)
27+
- [ ] `useMemo`/`useCallback` only when child components depend on referential equality
28+
- [ ] Lists use stable `key` props (not array index)
29+
- [ ] Large lists use virtualization (`react-window`, `@tanstack/virtual`)
30+
- [ ] Server components / SSR for data-heavy pages
31+
32+
## Backend / API
33+
34+
- [ ] No N+1 queries (use eager loading / `JOIN` / `DataLoader`)
35+
- [ ] List endpoints paginated (no unbounded `SELECT *`)
36+
- [ ] Database queries use indexes (check `EXPLAIN ANALYZE`)
37+
- [ ] Expensive computations cached (Redis, in-memory, HTTP cache headers)
38+
- [ ] Async operations don't block request thread (use queues for heavy work)
39+
- [ ] Connection pooling configured (DB, HTTP clients)
40+
- [ ] Response compression enabled (gzip/brotli)
41+
42+
## Monitoring
43+
44+
- [ ] Real User Monitoring (RUM) collecting Core Web Vitals
45+
- [ ] Server-side latency tracked (p50, p95, p99)
46+
- [ ] Error rate dashboards with alerting
47+
- [ ] Performance budget defined and enforced in CI
48+
49+
## Testing Tools
50+
51+
```bash
52+
# Lighthouse CI
53+
npx lhci autorun
54+
55+
# Web Vitals library (in-app)
56+
import { onLCP, onINP, onCLS } from 'web-vitals';
57+
58+
# Bundle analysis
59+
npx source-map-explorer dist/**/*.js
60+
61+
# Database query analysis
62+
EXPLAIN ANALYZE SELECT ...;
63+
```
64+
65+
## Anti-Patterns to Flag in Review
66+
67+
- `SELECT *` without LIMIT
68+
- Synchronous file I/O in request handlers
69+
- Missing pagination on list endpoints
70+
- Image without width/height (causes CLS)
71+
- `JSON.parse` on megabyte-scale strings in hot path
72+
- Polling when WebSocket/SSE would work
73+
- Loading entire library for one utility function

references/security-checklist.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Security Checklist
2+
3+
Quick reference for `flow-code-security` and code review. OWASP Top 10 prevention.
4+
5+
## Input Validation
6+
7+
- [ ] All user input validated with schema (Zod, Joi, Pydantic) at system boundary
8+
- [ ] SQL queries use parameterized statements (never string concatenation)
9+
- [ ] OS commands use `execFile` with argument arrays (never `exec` with template strings)
10+
- [ ] File paths validated and sandboxed (no path traversal: `../`)
11+
- [ ] Regular expressions tested for ReDoS (no catastrophic backtracking)
12+
13+
## Authentication
14+
15+
- [ ] Passwords hashed with bcrypt/scrypt/argon2 (never MD5/SHA1/plaintext)
16+
- [ ] Account lockout after 5 failed login attempts
17+
- [ ] Session tokens rotated after login
18+
- [ ] Session expiry configured (idle + absolute timeout)
19+
- [ ] Constant-time comparison for token/password verification
20+
- [ ] Multi-factor authentication available for sensitive operations
21+
22+
## Authorization
23+
24+
- [ ] Every endpoint checks both authentication AND authorization
25+
- [ ] Resource access verifies ownership (not just "is logged in")
26+
- [ ] Principle of least privilege for service accounts
27+
- [ ] Admin operations require elevated permissions (not just role check)
28+
29+
## Data Protection
30+
31+
- [ ] Sensitive data encrypted at rest (AES-256)
32+
- [ ] TLS 1.2+ for all data in transit (no mixed content)
33+
- [ ] PII masked in logs: `email: "j***@example.com"`
34+
- [ ] API responses return only needed fields (DTOs, not raw models)
35+
- [ ] `Cache-Control: no-store` for pages with sensitive data
36+
- [ ] No secrets in source code, environment variables, or logs
37+
38+
## HTTP Security Headers
39+
40+
```
41+
Content-Security-Policy: default-src 'self';
42+
X-Content-Type-Options: nosniff
43+
X-Frame-Options: DENY
44+
Strict-Transport-Security: max-age=31536000; includeSubDomains
45+
Referrer-Policy: strict-origin-when-cross-origin
46+
Permissions-Policy: camera=(), microphone=(), geolocation=()
47+
```
48+
49+
## Cookies
50+
51+
- [ ] Auth cookies: `httpOnly`, `secure`, `sameSite=Strict` (or `Lax`)
52+
- [ ] No session data in `localStorage` (vulnerable to XSS)
53+
- [ ] CSRF tokens on state-changing requests
54+
55+
## File Uploads
56+
57+
- [ ] MIME type validated from file content (not just extension)
58+
- [ ] Maximum file size enforced server-side
59+
- [ ] Filenames regenerated (never use user-provided names)
60+
- [ ] Files stored outside web root
61+
- [ ] `Content-Disposition: attachment` on downloads
62+
63+
## Dependencies
64+
65+
- [ ] `npm audit` / `cargo audit` / `pip audit` run in CI
66+
- [ ] Critical/High vulnerabilities in production deps fixed immediately
67+
- [ ] Dependency lockfile committed (`package-lock.json`, `Cargo.lock`)
68+
- [ ] No unused dependencies (attack surface reduction)
69+
70+
## Secrets Management
71+
72+
- [ ] `.env` in `.gitignore` (always)
73+
- [ ] `.env.example` with placeholder values committed
74+
- [ ] Secrets rotated immediately if ever committed to git
75+
- [ ] Production secrets in secrets manager (Vault, AWS SM, GCP SM)
76+
- [ ] No secrets in CI logs, error messages, or API responses
77+
78+
## Rate Limiting
79+
80+
- [ ] Auth endpoints: 5 attempts per minute per IP
81+
- [ ] API endpoints: appropriate limits per user/key
82+
- [ ] Public endpoints: DDoS protection (Cloudflare, WAF)
83+
- [ ] Rate limit headers returned: `X-RateLimit-Remaining`
84+
85+
## Quick Audit
86+
87+
```bash
88+
# Check for secrets in staged files
89+
git diff --cached | grep -iE '(password|secret|token|api_key|private_key)\s*='
90+
91+
# Check for dangerous patterns
92+
grep -rn 'eval(' --include='*.ts' --include='*.js' src/
93+
grep -rn 'dangerouslySetInnerHTML' --include='*.tsx' --include='*.jsx' src/
94+
grep -rn 'innerHTML' --include='*.ts' --include='*.js' src/
95+
```

0 commit comments

Comments
 (0)