panopticon-cli 0.4.32 → 0.4.33
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.
- package/dist/{agents-BDFHF4T3.js → agents-VLK4BMVA.js} +10 -7
- package/dist/chunk-7SN4L4PH.js +150 -0
- package/dist/chunk-7SN4L4PH.js.map +1 -0
- package/dist/chunk-7XNJJBH6.js +538 -0
- package/dist/chunk-7XNJJBH6.js.map +1 -0
- package/dist/chunk-AQXETQHW.js +113 -0
- package/dist/chunk-AQXETQHW.js.map +1 -0
- package/dist/{chunk-2NIAOCIC.js → chunk-ASY7T35E.js} +170 -64
- package/dist/chunk-ASY7T35E.js.map +1 -0
- package/dist/chunk-B3PF6JPQ.js +212 -0
- package/dist/chunk-B3PF6JPQ.js.map +1 -0
- package/dist/{chunk-XP2DXWYP.js → chunk-BKCWRMUX.js} +88 -35
- package/dist/chunk-BKCWRMUX.js.map +1 -0
- package/dist/chunk-CFCUOV3Q.js +669 -0
- package/dist/chunk-CFCUOV3Q.js.map +1 -0
- package/dist/chunk-CWELWPWQ.js +32 -0
- package/dist/chunk-CWELWPWQ.js.map +1 -0
- package/dist/chunk-DI7ABPNQ.js +352 -0
- package/dist/chunk-DI7ABPNQ.js.map +1 -0
- package/dist/{chunk-VU4FLXV5.js → chunk-FQ66DECN.js} +31 -4
- package/dist/chunk-FQ66DECN.js.map +1 -0
- package/dist/{review-status-GWQYY77L.js → chunk-GFP3PIPB.js} +14 -7
- package/dist/chunk-GFP3PIPB.js.map +1 -0
- package/dist/chunk-JQBV3Q2W.js +29 -0
- package/dist/chunk-JQBV3Q2W.js.map +1 -0
- package/dist/{chunk-BWGFN44T.js → chunk-JT4O4YVM.js} +28 -16
- package/dist/chunk-JT4O4YVM.js.map +1 -0
- package/dist/{chunk-VIWUCJ4V.js → chunk-KJ2TRXNK.js} +34 -36
- package/dist/chunk-KJ2TRXNK.js.map +1 -0
- package/dist/{chunk-JY7R7V4G.js → chunk-OMNXYPXC.js} +2 -2
- package/dist/chunk-OMNXYPXC.js.map +1 -0
- package/dist/chunk-PELXV435.js +215 -0
- package/dist/chunk-PELXV435.js.map +1 -0
- package/dist/chunk-PI7Y3PSN.js +797 -0
- package/dist/chunk-PI7Y3PSN.js.map +1 -0
- package/dist/chunk-RBUO57TC.js +154 -0
- package/dist/chunk-RBUO57TC.js.map +1 -0
- package/dist/chunk-XFR2DLMR.js +600 -0
- package/dist/chunk-XFR2DLMR.js.map +1 -0
- package/dist/chunk-XKT5MHPT.js +677 -0
- package/dist/chunk-XKT5MHPT.js.map +1 -0
- package/dist/{chunk-HCTJFIJJ.js → chunk-YLPSQAM2.js} +2 -2
- package/dist/{chunk-HCTJFIJJ.js.map → chunk-YLPSQAM2.js.map} +1 -1
- package/dist/{chunk-6HXKTOD7.js → chunk-ZTFNYOC7.js} +53 -38
- package/dist/chunk-ZTFNYOC7.js.map +1 -0
- package/dist/cli/index.js +4362 -2927
- package/dist/cli/index.js.map +1 -1
- package/dist/{config-BOAMSKTF.js → config-4CJNUE3O.js} +7 -3
- package/dist/dashboard/prompts/merge-agent.md +217 -0
- package/dist/dashboard/prompts/review-agent.md +409 -0
- package/dist/dashboard/prompts/sync-main.md +84 -0
- package/dist/dashboard/prompts/test-agent.md +283 -0
- package/dist/dashboard/prompts/work-agent.md +247 -0
- package/dist/dashboard/public/assets/index-UjZq6ykz.css +32 -0
- package/dist/dashboard/public/assets/index-kAJqtLDO.js +708 -0
- package/dist/dashboard/public/index.html +2 -2
- package/dist/dashboard/server.js +15194 -3160
- package/dist/{dns-L3L2BB27.js → dns-7BDJSD3E.js} +4 -2
- package/dist/{feedback-writer-AAKF5BTK.js → feedback-writer-LVZ5TFYZ.js} +8 -4
- package/dist/feedback-writer-LVZ5TFYZ.js.map +1 -0
- package/dist/hume-WMAUBBV2.js +13 -0
- package/dist/index.d.ts +153 -40
- package/dist/index.js +65 -23
- package/dist/index.js.map +1 -1
- package/dist/{projects-VXRUCMLM.js → projects-JEIVIYC6.js} +3 -3
- package/dist/rally-RKFSWC7E.js +10 -0
- package/dist/{remote-agents-Z3R2A5BN.js → remote-agents-TFSMW7GN.js} +2 -2
- package/dist/{remote-workspace-2G6V2KNP.js → remote-workspace-AHVHQEES.js} +8 -8
- package/dist/review-status-EPFG4XM7.js +19 -0
- package/dist/shadow-state-5MDP6YXH.js +30 -0
- package/dist/shadow-state-5MDP6YXH.js.map +1 -0
- package/dist/{specialist-context-N32QBNNQ.js → specialist-context-T3NBMCIE.js} +8 -7
- package/dist/{specialist-context-N32QBNNQ.js.map → specialist-context-T3NBMCIE.js.map} +1 -1
- package/dist/{specialist-logs-GF3YV4KL.js → specialist-logs-CVKD3YJ3.js} +7 -6
- package/dist/specialist-logs-CVKD3YJ3.js.map +1 -0
- package/dist/{specialists-JBIW6MP4.js → specialists-TKAP6T6Z.js} +7 -6
- package/dist/specialists-TKAP6T6Z.js.map +1 -0
- package/dist/tldr-daemon-T3THOUGT.js +21 -0
- package/dist/tldr-daemon-T3THOUGT.js.map +1 -0
- package/dist/traefik-QX4ZV4YG.js +19 -0
- package/dist/traefik-QX4ZV4YG.js.map +1 -0
- package/dist/tunnel-W2GZBLEV.js +13 -0
- package/dist/tunnel-W2GZBLEV.js.map +1 -0
- package/dist/workspace-manager-KLHUCIZV.js +22 -0
- package/dist/workspace-manager-KLHUCIZV.js.map +1 -0
- package/package.json +2 -2
- package/scripts/heartbeat-hook +37 -10
- package/scripts/patches/llm-tldr-tsx-support.py +109 -0
- package/scripts/pre-tool-hook +26 -15
- package/scripts/record-cost-event.js +177 -43
- package/scripts/record-cost-event.ts +87 -3
- package/scripts/statusline.sh +169 -0
- package/scripts/stop-hook +14 -11
- package/scripts/tldr-post-edit +72 -0
- package/scripts/tldr-read-enforcer +275 -0
- package/skills/check-merged/SKILL.md +143 -0
- package/skills/crash-investigation/SKILL.md +301 -0
- package/skills/github-cli/SKILL.md +185 -0
- package/skills/pan-reopen/SKILL.md +65 -0
- package/skills/pan-sync-main/SKILL.md +87 -0
- package/skills/pan-tldr/SKILL.md +149 -0
- package/skills/react-best-practices/SKILL.md +125 -0
- package/skills/spec-readiness/REPORT-TEMPLATE.md +158 -0
- package/skills/spec-readiness/SCORING-REFERENCE.md +369 -0
- package/skills/spec-readiness/SKILL.md +400 -0
- package/skills/spec-readiness-setup/SKILL.md +361 -0
- package/skills/workspace-status/SKILL.md +56 -0
- package/templates/traefik/dynamic/panopticon.yml.template +0 -5
- package/templates/traefik/traefik.yml +0 -8
- package/dist/chunk-2NIAOCIC.js.map +0 -1
- package/dist/chunk-3XAB4IXF.js +0 -51
- package/dist/chunk-3XAB4IXF.js.map +0 -1
- package/dist/chunk-6HXKTOD7.js.map +0 -1
- package/dist/chunk-BBCUK6N2.js +0 -241
- package/dist/chunk-BBCUK6N2.js.map +0 -1
- package/dist/chunk-BWGFN44T.js.map +0 -1
- package/dist/chunk-ELK6Q7QI.js +0 -545
- package/dist/chunk-ELK6Q7QI.js.map +0 -1
- package/dist/chunk-JY7R7V4G.js.map +0 -1
- package/dist/chunk-LYSBSZYV.js +0 -1523
- package/dist/chunk-LYSBSZYV.js.map +0 -1
- package/dist/chunk-VIWUCJ4V.js.map +0 -1
- package/dist/chunk-VU4FLXV5.js.map +0 -1
- package/dist/chunk-XP2DXWYP.js.map +0 -1
- package/dist/dashboard/public/assets/index-C7X6LP5Z.css +0 -32
- package/dist/dashboard/public/assets/index-ClYqpcAJ.js +0 -645
- package/dist/feedback-writer-AAKF5BTK.js.map +0 -1
- package/dist/review-status-GWQYY77L.js.map +0 -1
- package/dist/traefik-CUJM6K5Z.js +0 -12
- /package/dist/{agents-BDFHF4T3.js.map → agents-VLK4BMVA.js.map} +0 -0
- /package/dist/{config-BOAMSKTF.js.map → config-4CJNUE3O.js.map} +0 -0
- /package/dist/{dns-L3L2BB27.js.map → dns-7BDJSD3E.js.map} +0 -0
- /package/dist/{projects-VXRUCMLM.js.map → hume-WMAUBBV2.js.map} +0 -0
- /package/dist/{remote-agents-Z3R2A5BN.js.map → projects-JEIVIYC6.js.map} +0 -0
- /package/dist/{specialist-logs-GF3YV4KL.js.map → rally-RKFSWC7E.js.map} +0 -0
- /package/dist/{specialists-JBIW6MP4.js.map → remote-agents-TFSMW7GN.js.map} +0 -0
- /package/dist/{remote-workspace-2G6V2KNP.js.map → remote-workspace-AHVHQEES.js.map} +0 -0
- /package/dist/{traefik-CUJM6K5Z.js.map → review-status-EPFG4XM7.js.map} +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pan-tldr
|
|
3
|
+
description: TLDR code analysis — token-efficient codebase understanding. Use before reading large files.
|
|
4
|
+
triggers:
|
|
5
|
+
- tldr
|
|
6
|
+
- code analysis
|
|
7
|
+
- understand codebase
|
|
8
|
+
- explore code
|
|
9
|
+
- what does this file do
|
|
10
|
+
allowed-tools:
|
|
11
|
+
- Bash
|
|
12
|
+
- Read
|
|
13
|
+
- Grep
|
|
14
|
+
- Glob
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# TLDR Code Analysis
|
|
18
|
+
|
|
19
|
+
## What It Is
|
|
20
|
+
|
|
21
|
+
TLDR is a 5-layer code analysis tool that produces structured summaries using 500-1,200 tokens per file instead of 10-25k for raw reads. It extends how much work you can accomplish per session by 10-20x.
|
|
22
|
+
|
|
23
|
+
## When to Use TLDR
|
|
24
|
+
|
|
25
|
+
**Always use TLDR first when:**
|
|
26
|
+
- Exploring unfamiliar code (use `tldr context` or `tldr structure`)
|
|
27
|
+
- Understanding function relationships (use `tldr calls` or `tldr impact`)
|
|
28
|
+
- Searching code by description (use `tldr semantic`)
|
|
29
|
+
- Planning changes across multiple files
|
|
30
|
+
|
|
31
|
+
**Read the full file when:**
|
|
32
|
+
- You need exact line numbers for editing
|
|
33
|
+
- The file is small (< 3KB)
|
|
34
|
+
- You need config files, docs, or non-code files
|
|
35
|
+
- TLDR context wasn't sufficient for the specific section
|
|
36
|
+
|
|
37
|
+
## Decision Tree
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Need to understand a file?
|
|
41
|
+
├── Small file (< 3KB) → Read directly
|
|
42
|
+
├── Need exact content for editing → Read with offset/limit
|
|
43
|
+
└── Understanding structure/relationships → Use TLDR first
|
|
44
|
+
├── "What does this file export?" → tldr context <file>
|
|
45
|
+
├── "What's in this directory?" → tldr structure <dir>
|
|
46
|
+
├── "What calls this function?" → tldr calls <func> <file>
|
|
47
|
+
├── "What does this function call?" → tldr impact <func> <file>
|
|
48
|
+
├── "Find code that handles X" → tldr semantic "X"
|
|
49
|
+
└── "Show me the architecture" → tldr arch <dir>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Available Commands
|
|
53
|
+
|
|
54
|
+
All commands run from the workspace root. The binary is at `.venv/bin/tldr`.
|
|
55
|
+
|
|
56
|
+
### Exploration
|
|
57
|
+
|
|
58
|
+
| Command | Purpose | Tokens |
|
|
59
|
+
|---------|---------|--------|
|
|
60
|
+
| `tldr context <file>` | File structure, exports, imports, key functions | ~800 |
|
|
61
|
+
| `tldr structure <dir>` | Directory layout and relationships | ~500 |
|
|
62
|
+
| `tldr tree <dir>` | File tree with language detection | ~200 |
|
|
63
|
+
| `tldr arch <dir>` | Architectural overview | ~600 |
|
|
64
|
+
|
|
65
|
+
### Relationships
|
|
66
|
+
|
|
67
|
+
| Command | Purpose | Tokens |
|
|
68
|
+
|---------|---------|--------|
|
|
69
|
+
| `tldr calls <file>` | What calls functions in this file (callers) | ~400 |
|
|
70
|
+
| `tldr impact <func> <file>` | What this function calls (callees) | ~400 |
|
|
71
|
+
| `tldr imports <file>` | What this file imports | ~200 |
|
|
72
|
+
| `tldr importers <file>` | What files import this one | ~200 |
|
|
73
|
+
|
|
74
|
+
### Analysis
|
|
75
|
+
|
|
76
|
+
| Command | Purpose | Tokens |
|
|
77
|
+
|---------|---------|--------|
|
|
78
|
+
| `tldr cfg <func> <file>` | Control flow graph | ~300 |
|
|
79
|
+
| `tldr dfg <func> <file>` | Data flow graph | ~300 |
|
|
80
|
+
| `tldr slice <func> <file>` | Program slice (dependency chain) | ~400 |
|
|
81
|
+
| `tldr dead <dir>` | Dead code detection | ~500 |
|
|
82
|
+
| `tldr change-impact <file>` | Files affected by changes to this file | ~300 |
|
|
83
|
+
| `tldr diagnostics <file>` | Type errors and lint issues | ~200 |
|
|
84
|
+
|
|
85
|
+
### Search
|
|
86
|
+
|
|
87
|
+
| Command | Purpose | Tokens |
|
|
88
|
+
|---------|---------|--------|
|
|
89
|
+
| `tldr search <pattern> <dir>` | Structural code search (AST-aware) | ~400 |
|
|
90
|
+
| `tldr semantic "query"` | Natural language code search (embedding-based) | ~500 |
|
|
91
|
+
| `tldr extract <symbol> <file>` | Extract specific function/class definition | ~300 |
|
|
92
|
+
|
|
93
|
+
## MCP Tools (if configured)
|
|
94
|
+
|
|
95
|
+
When TLDR is set up as an MCP server, Claude Code agents get these tools natively:
|
|
96
|
+
- `tldr_context <file>` — File structure overview
|
|
97
|
+
- `tldr_structure <directory>` — Directory layout
|
|
98
|
+
- `tldr_calls <function> <file>` — Call graph (callers)
|
|
99
|
+
- `tldr_impact <function> <file>` — Impact analysis (callees)
|
|
100
|
+
- `tldr_semantic <query>` — Natural language search
|
|
101
|
+
|
|
102
|
+
## Hook Integration
|
|
103
|
+
|
|
104
|
+
TLDR hooks run automatically:
|
|
105
|
+
|
|
106
|
+
- **Read enforcer** (PreToolUse): Intercepts reads on large code files (> 3KB) and returns TLDR summaries instead. To read the full file, use `Read` with `offset` and `limit` parameters.
|
|
107
|
+
- **Post-edit notify** (PostToolUse): Tracks edited files and triggers background re-warm after 10 edits to keep the index fresh.
|
|
108
|
+
|
|
109
|
+
## Index Management
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Check index status
|
|
113
|
+
pan tldr status
|
|
114
|
+
|
|
115
|
+
# Manually warm/rebuild the index
|
|
116
|
+
pan tldr warm
|
|
117
|
+
|
|
118
|
+
# Start/stop the daemon
|
|
119
|
+
pan tldr start
|
|
120
|
+
pan tldr stop
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The index is built automatically:
|
|
124
|
+
- On workspace creation (background warm after daemon start)
|
|
125
|
+
- After merges to main (merge-agent triggers re-warm)
|
|
126
|
+
- After 10 code file edits (post-edit hook triggers re-warm)
|
|
127
|
+
- On `pan up` (main daemon starts)
|
|
128
|
+
|
|
129
|
+
## Token Savings Example
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
Without TLDR:
|
|
133
|
+
20 files x 15,000 tokens = 300,000 tokens (exhausts context)
|
|
134
|
+
|
|
135
|
+
With TLDR:
|
|
136
|
+
20 files x 800 tokens = 16,000 tokens (94% savings)
|
|
137
|
+
+ 3 full reads for editing = 45,000 tokens
|
|
138
|
+
Total: 61,000 tokens — can do 5x more work per session
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Troubleshooting
|
|
142
|
+
|
|
143
|
+
| Symptom | Fix |
|
|
144
|
+
|---------|-----|
|
|
145
|
+
| `tldr: command not found` | Run from workspace root: `.venv/bin/tldr` |
|
|
146
|
+
| No `.venv` directory | `python3 -m venv .venv && .venv/bin/pip install llm-tldr` |
|
|
147
|
+
| Stale index | `pan tldr warm` or `.venv/bin/tldr warm .` |
|
|
148
|
+
| Empty results | Check `.tldrignore` isn't excluding your files |
|
|
149
|
+
| Daemon not running | `pan tldr start` or it auto-starts with `pan up` |
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vercel-react-best-practices
|
|
3
|
+
description: React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: vercel
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Vercel React Best Practices
|
|
11
|
+
|
|
12
|
+
Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel. Contains 45 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
|
|
13
|
+
|
|
14
|
+
## When to Apply
|
|
15
|
+
|
|
16
|
+
Reference these guidelines when:
|
|
17
|
+
- Writing new React components or Next.js pages
|
|
18
|
+
- Implementing data fetching (client or server-side)
|
|
19
|
+
- Reviewing code for performance issues
|
|
20
|
+
- Refactoring existing React/Next.js code
|
|
21
|
+
- Optimizing bundle size or load times
|
|
22
|
+
|
|
23
|
+
## Rule Categories by Priority
|
|
24
|
+
|
|
25
|
+
| Priority | Category | Impact | Prefix |
|
|
26
|
+
|----------|----------|--------|--------|
|
|
27
|
+
| 1 | Eliminating Waterfalls | CRITICAL | `async-` |
|
|
28
|
+
| 2 | Bundle Size Optimization | CRITICAL | `bundle-` |
|
|
29
|
+
| 3 | Server-Side Performance | HIGH | `server-` |
|
|
30
|
+
| 4 | Client-Side Data Fetching | MEDIUM-HIGH | `client-` |
|
|
31
|
+
| 5 | Re-render Optimization | MEDIUM | `rerender-` |
|
|
32
|
+
| 6 | Rendering Performance | MEDIUM | `rendering-` |
|
|
33
|
+
| 7 | JavaScript Performance | LOW-MEDIUM | `js-` |
|
|
34
|
+
| 8 | Advanced Patterns | LOW | `advanced-` |
|
|
35
|
+
|
|
36
|
+
## Quick Reference
|
|
37
|
+
|
|
38
|
+
### 1. Eliminating Waterfalls (CRITICAL)
|
|
39
|
+
|
|
40
|
+
- `async-defer-await` - Move await into branches where actually used
|
|
41
|
+
- `async-parallel` - Use Promise.all() for independent operations
|
|
42
|
+
- `async-dependencies` - Use better-all for partial dependencies
|
|
43
|
+
- `async-api-routes` - Start promises early, await late in API routes
|
|
44
|
+
- `async-suspense-boundaries` - Use Suspense to stream content
|
|
45
|
+
|
|
46
|
+
### 2. Bundle Size Optimization (CRITICAL)
|
|
47
|
+
|
|
48
|
+
- `bundle-barrel-imports` - Import directly, avoid barrel files
|
|
49
|
+
- `bundle-dynamic-imports` - Use next/dynamic for heavy components
|
|
50
|
+
- `bundle-defer-third-party` - Load analytics/logging after hydration
|
|
51
|
+
- `bundle-conditional` - Load modules only when feature is activated
|
|
52
|
+
- `bundle-preload` - Preload on hover/focus for perceived speed
|
|
53
|
+
|
|
54
|
+
### 3. Server-Side Performance (HIGH)
|
|
55
|
+
|
|
56
|
+
- `server-cache-react` - Use React.cache() for per-request deduplication
|
|
57
|
+
- `server-cache-lru` - Use LRU cache for cross-request caching
|
|
58
|
+
- `server-serialization` - Minimize data passed to client components
|
|
59
|
+
- `server-parallel-fetching` - Restructure components to parallelize fetches
|
|
60
|
+
- `server-after-nonblocking` - Use after() for non-blocking operations
|
|
61
|
+
|
|
62
|
+
### 4. Client-Side Data Fetching (MEDIUM-HIGH)
|
|
63
|
+
|
|
64
|
+
- `client-swr-dedup` - Use SWR for automatic request deduplication
|
|
65
|
+
- `client-event-listeners` - Deduplicate global event listeners
|
|
66
|
+
|
|
67
|
+
### 5. Re-render Optimization (MEDIUM)
|
|
68
|
+
|
|
69
|
+
- `rerender-defer-reads` - Don't subscribe to state only used in callbacks
|
|
70
|
+
- `rerender-memo` - Extract expensive work into memoized components
|
|
71
|
+
- `rerender-dependencies` - Use primitive dependencies in effects
|
|
72
|
+
- `rerender-derived-state` - Subscribe to derived booleans, not raw values
|
|
73
|
+
- `rerender-functional-setstate` - Use functional setState for stable callbacks
|
|
74
|
+
- `rerender-lazy-state-init` - Pass function to useState for expensive values
|
|
75
|
+
- `rerender-transitions` - Use startTransition for non-urgent updates
|
|
76
|
+
|
|
77
|
+
### 6. Rendering Performance (MEDIUM)
|
|
78
|
+
|
|
79
|
+
- `rendering-animate-svg-wrapper` - Animate div wrapper, not SVG element
|
|
80
|
+
- `rendering-content-visibility` - Use content-visibility for long lists
|
|
81
|
+
- `rendering-hoist-jsx` - Extract static JSX outside components
|
|
82
|
+
- `rendering-svg-precision` - Reduce SVG coordinate precision
|
|
83
|
+
- `rendering-hydration-no-flicker` - Use inline script for client-only data
|
|
84
|
+
- `rendering-activity` - Use Activity component for show/hide
|
|
85
|
+
- `rendering-conditional-render` - Use ternary, not && for conditionals
|
|
86
|
+
|
|
87
|
+
### 7. JavaScript Performance (LOW-MEDIUM)
|
|
88
|
+
|
|
89
|
+
- `js-batch-dom-css` - Group CSS changes via classes or cssText
|
|
90
|
+
- `js-index-maps` - Build Map for repeated lookups
|
|
91
|
+
- `js-cache-property-access` - Cache object properties in loops
|
|
92
|
+
- `js-cache-function-results` - Cache function results in module-level Map
|
|
93
|
+
- `js-cache-storage` - Cache localStorage/sessionStorage reads
|
|
94
|
+
- `js-combine-iterations` - Combine multiple filter/map into one loop
|
|
95
|
+
- `js-length-check-first` - Check array length before expensive comparison
|
|
96
|
+
- `js-early-exit` - Return early from functions
|
|
97
|
+
- `js-hoist-regexp` - Hoist RegExp creation outside loops
|
|
98
|
+
- `js-min-max-loop` - Use loop for min/max instead of sort
|
|
99
|
+
- `js-set-map-lookups` - Use Set/Map for O(1) lookups
|
|
100
|
+
- `js-tosorted-immutable` - Use toSorted() for immutability
|
|
101
|
+
|
|
102
|
+
### 8. Advanced Patterns (LOW)
|
|
103
|
+
|
|
104
|
+
- `advanced-event-handler-refs` - Store event handlers in refs
|
|
105
|
+
- `advanced-use-latest` - useLatest for stable callback refs
|
|
106
|
+
|
|
107
|
+
## How to Use
|
|
108
|
+
|
|
109
|
+
Read individual rule files for detailed explanations and code examples:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
rules/async-parallel.md
|
|
113
|
+
rules/bundle-barrel-imports.md
|
|
114
|
+
rules/_sections.md
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Each rule file contains:
|
|
118
|
+
- Brief explanation of why it matters
|
|
119
|
+
- Incorrect code example with explanation
|
|
120
|
+
- Correct code example with explanation
|
|
121
|
+
- Additional context and references
|
|
122
|
+
|
|
123
|
+
## Full Compiled Document
|
|
124
|
+
|
|
125
|
+
For the complete guide with all rules expanded: `AGENTS.md`
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Spec Readiness — Report Template
|
|
2
|
+
|
|
3
|
+
This file defines the report structure for both HTML and EML formats. Only the report-generation subagent reads this.
|
|
4
|
+
|
|
5
|
+
## Branding
|
|
6
|
+
|
|
7
|
+
Configurable via wrapper `config.yaml`. Defaults:
|
|
8
|
+
- Primary Color: #1e293b (dark slate — headers, text)
|
|
9
|
+
- Stripe Color: matches primary (top accent bar)
|
|
10
|
+
- Score colors: Red (#E53935) < 8, Yellow (#FF9800) 8-14, Green (#43A047) 15+
|
|
11
|
+
- Status colors: Red = 0-39, Yellow = 40-69, Green = 70-100
|
|
12
|
+
|
|
13
|
+
If a wrapper `config.yaml` exists, use `branding.primary_color`, `branding.stripe_color`, `branding.company_name`, and `branding.footer_text` from it.
|
|
14
|
+
|
|
15
|
+
## Report Sections
|
|
16
|
+
|
|
17
|
+
### 1. Brand Stripe (4px)
|
|
18
|
+
Top-of-page accent bar using `branding.stripe_color` or default.
|
|
19
|
+
|
|
20
|
+
### 2. Header Block (primary_color background)
|
|
21
|
+
- Eyebrow text: "REQUIREMENTS READINESS ASSESSMENT" (uppercase, small, lighter accent)
|
|
22
|
+
- Title: "{Issue Title}" (white, large)
|
|
23
|
+
- Metadata line: "{Identifier} · {Project} · {Milestone/Release} · Assessed {date}" (light gray)
|
|
24
|
+
- Score badge: Large score number with status label and color (circular or pill badge)
|
|
25
|
+
|
|
26
|
+
### 3. Issue Info Row (Light Gray background, #F5F5F5)
|
|
27
|
+
Grid/flex row showing:
|
|
28
|
+
- Owner/Assignee
|
|
29
|
+
- Project
|
|
30
|
+
- Milestone/Release dates
|
|
31
|
+
- Child issue count (completed/total)
|
|
32
|
+
- Estimate if set
|
|
33
|
+
|
|
34
|
+
### 4. Score Dashboard — 5 metric cards in a row/grid
|
|
35
|
+
Each card contains:
|
|
36
|
+
- Dimension name (uppercase label, small text)
|
|
37
|
+
- Score as "X / 20" (large number)
|
|
38
|
+
- Visual bar (colored by score: red < 8, yellow 8-14, green 15+)
|
|
39
|
+
- One-line summary from dimension findings
|
|
40
|
+
|
|
41
|
+
### 5. Overall Score Bar
|
|
42
|
+
- Full-width progress bar showing 0-100
|
|
43
|
+
- Fill color matches status (red/yellow/green)
|
|
44
|
+
- Status label badge aligned right
|
|
45
|
+
- Score number displayed inside or above bar
|
|
46
|
+
|
|
47
|
+
### 6. Top Blockers (Amber/warning callout box)
|
|
48
|
+
- Background: light amber (#FFF8E1)
|
|
49
|
+
- Border-left: 4px solid #FF9800
|
|
50
|
+
- Header: "Top Blockers" with warning icon
|
|
51
|
+
- 3-5 actionable bullets
|
|
52
|
+
- Each with estimated point-improvement in parentheses
|
|
53
|
+
|
|
54
|
+
### 7. Dimension Details — One section per dimension
|
|
55
|
+
Each section contains:
|
|
56
|
+
- Section heading with dimension name and score badge (colored pill)
|
|
57
|
+
- Findings table with columns: Finding | Impact | Source | Recommendation
|
|
58
|
+
- Row colors: Green background tint for bonus findings, Red tint for deductions, Gray for neutral
|
|
59
|
+
- Impact column shows "+N" or "-N" with color
|
|
60
|
+
|
|
61
|
+
### 8. External Document Analysis (only if PRD/BRD found)
|
|
62
|
+
- Document source and access status
|
|
63
|
+
- Coverage summary
|
|
64
|
+
- Gaps identified
|
|
65
|
+
- Note if document was attached before or after development started
|
|
66
|
+
|
|
67
|
+
### 9. Child Issue Assessment Table
|
|
68
|
+
- Columns: ID (linked if possible), Title, Status, Has AC?, AC Quality, Notes
|
|
69
|
+
- AC Quality badges: Good (green pill), Weak (yellow pill), None (red pill)
|
|
70
|
+
- Summary row at bottom: "X of Y issues have testable acceptance criteria"
|
|
71
|
+
- Sortable appearance (styled headers)
|
|
72
|
+
|
|
73
|
+
### 10. Footer
|
|
74
|
+
- Light gray background
|
|
75
|
+
- Text: `branding.footer_text` or default: "Spec Readiness Assessment · Generated from {tracker} data · {Project}"
|
|
76
|
+
- Sub-text: "Methodology: 5-dimension scoring model"
|
|
77
|
+
- Assessment date
|
|
78
|
+
|
|
79
|
+
## HTML Format Guidelines
|
|
80
|
+
|
|
81
|
+
Use when generating `.html` output (default):
|
|
82
|
+
|
|
83
|
+
- Self-contained single HTML file (inline CSS, no external dependencies)
|
|
84
|
+
- Use `<style>` block in `<head>` for main styles
|
|
85
|
+
- Print-friendly: `@media print` rules for clean printing
|
|
86
|
+
- Table cells: `padding: 8px 12px; border-bottom: 1px solid #E0E0E0`
|
|
87
|
+
- Font stack: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`
|
|
88
|
+
- Max width: 1000px, centered with `margin: 0 auto`
|
|
89
|
+
- Score badge CSS: `display: inline-block; padding: 4px 12px; border-radius: 12px; font-weight: 600`
|
|
90
|
+
- `open` command opens in browser
|
|
91
|
+
|
|
92
|
+
## EML Format Guidelines
|
|
93
|
+
|
|
94
|
+
Use when generating `.eml` output (`--eml` flag):
|
|
95
|
+
|
|
96
|
+
### MIME Headers
|
|
97
|
+
|
|
98
|
+
The file must start with RFC 2822 headers, then a blank line, then the HTML body:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
MIME-Version: 1.0
|
|
102
|
+
Content-Type: text/html; charset="UTF-8"
|
|
103
|
+
Subject: Spec Readiness: {Identifier} — {Title} ({Score}/100 {StatusLabel})
|
|
104
|
+
From: noreply@example.com
|
|
105
|
+
To: noreply@example.com
|
|
106
|
+
Date: {RFC 2822 date, e.g. Thu, 27 Feb 2026 12:00:00 -0600}
|
|
107
|
+
|
|
108
|
+
<!DOCTYPE html>
|
|
109
|
+
<html>...
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The `From` and `To` addresses are placeholders — the wrapper `config.yaml` can override them via `branding.eml_from` and `branding.eml_to`. Without a wrapper, use `noreply@example.com` as defaults. The user opens the `.eml` in their mail client and edits recipients before sending.
|
|
113
|
+
|
|
114
|
+
### Email-Safe HTML Constraints
|
|
115
|
+
|
|
116
|
+
- **All inline CSS** — no `<style>` blocks (many email clients strip them)
|
|
117
|
+
- **Table-based layout** using `<table role="presentation">` — no flexbox/grid
|
|
118
|
+
- **Max width: 560px** — email-friendly width
|
|
119
|
+
- **No external resources** — no linked stylesheets, fonts, or images
|
|
120
|
+
- Font stack: `Arial, 'Helvetica Neue', Helvetica, sans-serif`
|
|
121
|
+
- Use ` ` in empty cells, `·` for separators
|
|
122
|
+
- `border-collapse: separate` on data tables for border-radius support
|
|
123
|
+
|
|
124
|
+
### Status Badge Inline Styles
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
Completed: background-color:#E6F7F5; color:#00897B; padding:2px 8px; border-radius:10px; font-size:11px;
|
|
128
|
+
In-Progress: background-color:#DBEAFE; color:#1e40af; padding:2px 8px; border-radius:10px; font-size:11px;
|
|
129
|
+
Backlog: background-color:#F5F5F5; color:#374151; border:1px solid #CFD1D1; padding:2px 8px; border-radius:10px; font-size:11px;
|
|
130
|
+
Blocked: background-color:#FEE2E2; color:#DC2626; padding:2px 8px; border-radius:10px; font-size:11px;
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Score Badge Inline Styles
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
Red (0-39): background-color:#FDECEA; color:#DC2626; padding:4px 12px; border-radius:12px; font-weight:600;
|
|
137
|
+
Yellow (40-69): background-color:#FFF8E1; color:#C2410C; padding:4px 12px; border-radius:12px; font-weight:600;
|
|
138
|
+
Green (70-100): background-color:#E6F7F5; color:#00897B; padding:4px 12px; border-radius:12px; font-weight:600;
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### EML Branding Colors (defaults, overridable via wrapper)
|
|
142
|
+
|
|
143
|
+
- Primary Dark: `branding.primary_color` or `#1e293b` (headers, primary text)
|
|
144
|
+
- Body Text: `#374151` (labels, secondary text)
|
|
145
|
+
- Accent: `branding.stripe_color` or `#2563eb` (brand stripe, accents)
|
|
146
|
+
- Alert Red: `#DC2626`, Amber: `#D97706`, Green: `#00897B`
|
|
147
|
+
|
|
148
|
+
### Opening
|
|
149
|
+
|
|
150
|
+
`open` command opens `.eml` in the default mail client (Thunderbird, Mail.app, Outlook).
|
|
151
|
+
|
|
152
|
+
## JSON Sidecar
|
|
153
|
+
|
|
154
|
+
Always generated regardless of report format. Schema is defined in SCORING-REFERENCE.md.
|
|
155
|
+
Files save to the same output directory with naming convention:
|
|
156
|
+
- HTML: `spec-readiness-{identifier}.html`
|
|
157
|
+
- EML: `spec-readiness-{identifier}.eml`
|
|
158
|
+
- JSON: `spec-readiness-{identifier}.json`
|