@esoteric-logic/praxis-harness 1.1.0
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/LICENSE +21 -0
- package/README.md +192 -0
- package/base/CLAUDE.md +148 -0
- package/base/commands/context-reset.md +72 -0
- package/base/commands/debug.md +63 -0
- package/base/commands/discover.md +49 -0
- package/base/commands/gsd-discuss.md +53 -0
- package/base/commands/gsd-execute.md +60 -0
- package/base/commands/gsd-verify.md +78 -0
- package/base/commands/kit.md +62 -0
- package/base/commands/plan.md +91 -0
- package/base/commands/ralph.md +110 -0
- package/base/commands/review.md +81 -0
- package/base/commands/risk.md +53 -0
- package/base/commands/ship.md +74 -0
- package/base/commands/spec.md +121 -0
- package/base/commands/standup.md +57 -0
- package/base/rules/architecture.md +51 -0
- package/base/rules/azure.md +90 -0
- package/base/rules/code-quality.md +65 -0
- package/base/rules/coding.md +139 -0
- package/base/rules/communication.md +69 -0
- package/base/rules/context-management.md +136 -0
- package/base/rules/execution-loop.md +84 -0
- package/base/rules/git-workflow.md +51 -0
- package/base/rules/github-actions.md +48 -0
- package/base/rules/powershell.md +72 -0
- package/base/rules/profile.md +31 -0
- package/base/rules/security.md +40 -0
- package/base/rules/terraform.md +48 -0
- package/base/rules/vault.md +134 -0
- package/base/skills/code-gc/SKILL.md +205 -0
- package/base/skills/code-simplifier/SKILL.md +132 -0
- package/base/skills/prd-writer/SKILL.md +108 -0
- package/base/skills/prd-writer/references/prd-template.md +22 -0
- package/base/skills/pre-commit-lint/SKILL.md +71 -0
- package/base/skills/scaffold-exist/SKILL.md +85 -0
- package/base/skills/scaffold-new/SKILL.md +177 -0
- package/base/skills/scaffold-new/references/claude-progress-template.json +24 -0
- package/base/skills/scaffold-new/references/gitignore-template.txt +65 -0
- package/base/skills/scaffold-new/references/repo-CLAUDE-md-template.md +87 -0
- package/base/skills/scaffold-new/references/vault-index-template.md +31 -0
- package/base/skills/scaffold-new/references/vault-learnings-template.md +21 -0
- package/base/skills/scaffold-new/references/vault-status-template.md +21 -0
- package/base/skills/scaffold-new/references/vault-tasks-template.md +20 -0
- package/base/skills/session-retro/SKILL.md +146 -0
- package/base/skills/subagent-review/SKILL.md +126 -0
- package/base/skills/vault-gc/SKILL.md +93 -0
- package/base/skills/verify-app/SKILL.md +156 -0
- package/bin/praxis.js +385 -0
- package/kits/infrastructure/KIT.md +66 -0
- package/kits/infrastructure/commands/infra-apply.md +44 -0
- package/kits/infrastructure/commands/infra-compliance.md +65 -0
- package/kits/infrastructure/commands/infra-drift.md +45 -0
- package/kits/infrastructure/commands/infra-plan.md +45 -0
- package/kits/infrastructure/install.sh +43 -0
- package/kits/infrastructure/rules/infrastructure.md +82 -0
- package/kits/infrastructure/teardown.sh +14 -0
- package/kits/web-designer/KIT.md +76 -0
- package/kits/web-designer/commands/web-audit.md +67 -0
- package/kits/web-designer/commands/web-component.md +54 -0
- package/kits/web-designer/commands/web-init.md +42 -0
- package/kits/web-designer/commands/web-tokens-sync.md +49 -0
- package/kits/web-designer/install.sh +41 -0
- package/kits/web-designer/rules/web-design.md +79 -0
- package/kits/web-designer/teardown.sh +26 -0
- package/package.json +28 -0
- package/scripts/health-check.sh +160 -0
- package/scripts/lint-harness.sh +195 -0
- package/scripts/onboard-mcp.sh +326 -0
- package/scripts/update.sh +88 -0
- package/templates/_index.md +33 -0
- package/templates/adr.md +28 -0
- package/templates/claude-progress.json +24 -0
- package/templates/plan.md +46 -0
- package/templates/project-index.md +31 -0
- package/templates/session-note.md +21 -0
- package/templates/status.md +27 -0
- package/templates/tasks.md +27 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Infrastructure — Kit Rules
|
|
2
|
+
# Scope: Active when /kit:infrastructure is loaded
|
|
3
|
+
# Generalized from azure.md and terraform.md for cross-cloud applicability
|
|
4
|
+
|
|
5
|
+
## Invariants — BLOCK on violation
|
|
6
|
+
|
|
7
|
+
### No hardcoded subscription or account IDs
|
|
8
|
+
- Never hardcode cloud subscription IDs, account IDs, tenant IDs, or project IDs in Terraform or scripts.
|
|
9
|
+
- Use variables, data sources, or environment-based lookups.
|
|
10
|
+
|
|
11
|
+
### Plan before apply — always
|
|
12
|
+
- `terraform plan` (or equivalent) must be reviewed before ANY `terraform apply`.
|
|
13
|
+
- No blind applies. No `-auto-approve` without explicit user approval.
|
|
14
|
+
- Flag destructive changes (destroy, replace) prominently in plan output.
|
|
15
|
+
|
|
16
|
+
### Remote state only
|
|
17
|
+
- No local state files committed to git.
|
|
18
|
+
- State backend must be configured before first apply.
|
|
19
|
+
- State files never contain secrets — verify backend config before committing.
|
|
20
|
+
|
|
21
|
+
### Least privilege RBAC
|
|
22
|
+
- No Owner or Contributor at subscription/account scope as permanent assignments.
|
|
23
|
+
- Propose least-privilege alternatives with specific scope.
|
|
24
|
+
- RBAC changes to production must be documented in vault `specs/` before implementation.
|
|
25
|
+
|
|
26
|
+
### Private endpoints by default
|
|
27
|
+
- PaaS data services (storage, databases, key vaults, analytics) use private endpoints.
|
|
28
|
+
- Public endpoint exposure requires explicit justification written to vault `specs/`.
|
|
29
|
+
|
|
30
|
+
### No any-any network rules
|
|
31
|
+
- Never create firewall/NSG rules with `source: Any` and `destination: Any`.
|
|
32
|
+
- Flag existing any-any rules as HIGH risk.
|
|
33
|
+
- Every allow rule must have a documented business reason.
|
|
34
|
+
|
|
35
|
+
### Mandatory tagging
|
|
36
|
+
- Every resource must include tags required by the engagement.
|
|
37
|
+
- Check `_index.md` for engagement-specific tag requirements.
|
|
38
|
+
- Missing mandatory tags = BLOCK. Add them before proceeding.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Conventions — WARN on violation
|
|
43
|
+
|
|
44
|
+
### Drift detection
|
|
45
|
+
- Run `terraform plan -detailed-exitcode` periodically to detect drift.
|
|
46
|
+
- Exit code 2 = drift detected. Document in vault and remediate or accept.
|
|
47
|
+
|
|
48
|
+
### Module hygiene
|
|
49
|
+
- Pin module versions. No floating `source` references without version constraints.
|
|
50
|
+
- Prefer registry modules over git references for stability.
|
|
51
|
+
|
|
52
|
+
### Cost awareness
|
|
53
|
+
- Flag resource changes estimated to increase monthly cost by >5%.
|
|
54
|
+
- Note SKU changes, reserved instance candidates, and scale-out implications.
|
|
55
|
+
|
|
56
|
+
### Compliance mapping
|
|
57
|
+
- Federal/government engagements: reference NIST CSF function or 800-53 control family
|
|
58
|
+
for security-relevant changes.
|
|
59
|
+
- Compliance framework requirements documented in engagement `_index.md`.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Verification Commands
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Check for hardcoded subscription/account IDs in Terraform
|
|
67
|
+
rg '(subscription_id|account_id|tenant_id)\s*=\s*"[a-f0-9-]{36}"' --glob '*.tf'
|
|
68
|
+
|
|
69
|
+
# Find any-any security rules
|
|
70
|
+
rg '(source_address_prefix|source)\s*=\s*"\*"' --glob '*.tf'
|
|
71
|
+
|
|
72
|
+
# Check for local state files
|
|
73
|
+
find . -name 'terraform.tfstate' -o -name '*.tfstate.backup' 2>/dev/null
|
|
74
|
+
|
|
75
|
+
# Verify remote backend configured
|
|
76
|
+
rg 'backend\s+"(azurerm|s3|gcs|consul)"' --glob '*.tf'
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Removal Condition
|
|
82
|
+
Remove when `/kit:infrastructure` is deactivated. Rules are kit-scoped, not universal.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
echo "=== Praxis: Removing infrastructure kit ==="
|
|
5
|
+
echo ""
|
|
6
|
+
echo "This kit has no npm skills or MCP servers to remove."
|
|
7
|
+
echo "CLI tools (az, terraform, tflint) are system-level and not managed by this kit."
|
|
8
|
+
echo ""
|
|
9
|
+
echo "To fully remove:"
|
|
10
|
+
echo " 1. Remove /kit:infrastructure from any project CLAUDE.md '## Active kit' sections"
|
|
11
|
+
echo " 2. Delete this directory: rm -rf ~/.claude/kits/infrastructure"
|
|
12
|
+
echo ""
|
|
13
|
+
echo "=== infrastructure kit removed ==="
|
|
14
|
+
echo ""
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: web-designer
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: Full-stack website design — design systems, components, audit
|
|
5
|
+
activation: /kit:web-designer
|
|
6
|
+
deactivation: /kit:off
|
|
7
|
+
skills_chain:
|
|
8
|
+
- phase: design-system-init
|
|
9
|
+
skills: [ui-ux-pro-max, design-system-patterns]
|
|
10
|
+
- phase: component-build
|
|
11
|
+
skills: [frontend-design, shadcn-ui, 21st-dev-mcp]
|
|
12
|
+
- phase: audit
|
|
13
|
+
skills: [web-accessibility, ui-skills-baseline, ui-skills-motion]
|
|
14
|
+
- phase: final-lint
|
|
15
|
+
skills: [web-design-guidelines]
|
|
16
|
+
mcp_servers:
|
|
17
|
+
- name: 21st-magic
|
|
18
|
+
command: npx -y @21st-dev/magic@latest
|
|
19
|
+
rules:
|
|
20
|
+
- web-design.md
|
|
21
|
+
removal_condition: >
|
|
22
|
+
Remove when design system is mature and component library covers 90%+
|
|
23
|
+
of recurring patterns — kit becomes overhead, not leverage.
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Web Designer Kit
|
|
27
|
+
|
|
28
|
+
## Purpose
|
|
29
|
+
Chain design skills into a phased workflow for building production websites.
|
|
30
|
+
From design system initialization through component construction to
|
|
31
|
+
accessibility audit and final lint.
|
|
32
|
+
|
|
33
|
+
## Skills Chain
|
|
34
|
+
|
|
35
|
+
| # | Phase | Skills | What It Provides |
|
|
36
|
+
|---|-------|--------|-----------------|
|
|
37
|
+
| 1 | Design System Init | UI/UX Pro Max, Design System Patterns | Style direction, palette, typography, 3-tier token hierarchy |
|
|
38
|
+
| 2 | Component Build | frontend-design, shadcn-ui, 21st.dev MCP | Responsive grid, component primitives, production marketplace |
|
|
39
|
+
| 3 | Audit | web-accessibility, UI Skills (baseline + motion) | WCAG compliance, ARIA, visual polish, animation performance |
|
|
40
|
+
| 4 | Final Lint | web-design-guidelines | Production design standards audit |
|
|
41
|
+
|
|
42
|
+
## Workflow Integration
|
|
43
|
+
|
|
44
|
+
This kit operates WITHIN the universal base workflow:
|
|
45
|
+
- **GSD** structures the work (discuss → plan → execute → verify)
|
|
46
|
+
- **Superpowers** enforces TDD and code review during execution
|
|
47
|
+
- **This kit** adds domain-specific design rules and skill chain
|
|
48
|
+
|
|
49
|
+
The skills chain is a SEQUENCE, not a replacement for GSD phases.
|
|
50
|
+
Use GSD to plan which phase to work on, then execute within that phase
|
|
51
|
+
using the kit's skills.
|
|
52
|
+
|
|
53
|
+
## Ralph Integration
|
|
54
|
+
|
|
55
|
+
To persist this kit across Ralph iterations, add to project `CLAUDE.md`:
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
## Active kit
|
|
59
|
+
On session start, activate: /kit:web-designer
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Each Ralph iteration reads project CLAUDE.md and activates the kit automatically.
|
|
63
|
+
The `/kit` command is idempotent — double-activation is a no-op.
|
|
64
|
+
|
|
65
|
+
## Prerequisites
|
|
66
|
+
|
|
67
|
+
Run `install.sh` in this directory to install all required npm skills and MCP servers.
|
|
68
|
+
Verify with `/kit:web-designer` after install.
|
|
69
|
+
|
|
70
|
+
## MCP Servers
|
|
71
|
+
|
|
72
|
+
| Server | Purpose | Registration |
|
|
73
|
+
|--------|---------|-------------|
|
|
74
|
+
| 21st-magic | Production component marketplace | `claude mcp add 21st-magic npx -- -y @21st-dev/magic@latest` |
|
|
75
|
+
|
|
76
|
+
MCP servers persist globally once registered. Kit deactivation does not unregister them.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run accessibility and design system compliance audit. Use to verify components meet WCAG standards and follow design token conventions. Optionally scope to a specific directory.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are auditing design system compliance and accessibility.
|
|
6
|
+
|
|
7
|
+
**Step 1 — Determine scope**
|
|
8
|
+
If argument provided (e.g., `/web:audit src/components/Button`): audit that path only.
|
|
9
|
+
If no argument: audit all component directories.
|
|
10
|
+
|
|
11
|
+
**Step 2 — Token compliance**
|
|
12
|
+
```bash
|
|
13
|
+
# Find hardcoded colors in components
|
|
14
|
+
grep -rn "color:" src/components/ | grep -v "var(--" | grep -v "token" | grep -v "tailwind"
|
|
15
|
+
|
|
16
|
+
# Find hardcoded spacing
|
|
17
|
+
grep -rn "margin:\|padding:" src/components/ | grep -rn "[0-9]px" | grep -v "var(--"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Step 3 — Semantic HTML**
|
|
21
|
+
```bash
|
|
22
|
+
# Div click handlers
|
|
23
|
+
grep -rn 'onClick.*<div' src/components/
|
|
24
|
+
|
|
25
|
+
# Images without alt
|
|
26
|
+
grep -rn '<img' src/components/ | grep -v 'alt='
|
|
27
|
+
|
|
28
|
+
# Inputs without labels
|
|
29
|
+
grep -rn '<input' src/components/ | grep -v 'aria-label' | grep -v 'id=.*label'
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Step 4 — Accessibility (if tools available)**
|
|
33
|
+
```bash
|
|
34
|
+
# axe-core (if installed)
|
|
35
|
+
npx axe-core src/ --exit 2>/dev/null || echo "axe-core not installed — manual review needed"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Step 5 — Motion and performance**
|
|
39
|
+
```bash
|
|
40
|
+
# Animations without reduced-motion check
|
|
41
|
+
grep -rn '@keyframes\|animation:' src/components/ | head -20
|
|
42
|
+
grep -rn 'prefers-reduced-motion' src/components/ | head -20
|
|
43
|
+
# Compare counts — every animation file should have a motion query
|
|
44
|
+
|
|
45
|
+
# Images without dimensions (CLS risk)
|
|
46
|
+
grep -rn '<img' src/components/ | grep -v 'width' | grep -v 'height'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Step 6 — Report**
|
|
50
|
+
```
|
|
51
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
52
|
+
WEB AUDIT — {scope} ({today_date})
|
|
53
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
54
|
+
|
|
55
|
+
Token compliance: {pass/fail count}
|
|
56
|
+
Semantic HTML: {pass/fail count}
|
|
57
|
+
Accessibility: {pass/fail count}
|
|
58
|
+
Motion/performance: {pass/fail count}
|
|
59
|
+
|
|
60
|
+
BLOCKING ({n})
|
|
61
|
+
✗ {finding}
|
|
62
|
+
|
|
63
|
+
WARNINGS ({n})
|
|
64
|
+
⚠ {finding}
|
|
65
|
+
|
|
66
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
67
|
+
```
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Full component lifecycle — scaffold, build, test, audit. Use when creating a new UI component. Follows the web-designer kit skills chain.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are building a component using the web-designer skills chain.
|
|
6
|
+
|
|
7
|
+
**Step 1 — Component spec**
|
|
8
|
+
Ask in a single message:
|
|
9
|
+
- Component name (PascalCase)
|
|
10
|
+
- Purpose (one sentence)
|
|
11
|
+
- Variants needed (e.g., primary/secondary/ghost)
|
|
12
|
+
- Interactive? (hover, click, keyboard)
|
|
13
|
+
- Where does it live? (shared `ui/` or page-specific)
|
|
14
|
+
|
|
15
|
+
**Step 2 — Scaffold**
|
|
16
|
+
Create component directory:
|
|
17
|
+
```
|
|
18
|
+
src/components/{location}/{ComponentName}/
|
|
19
|
+
index.tsx ← Main component
|
|
20
|
+
{ComponentName}.test.tsx ← Tests
|
|
21
|
+
{ComponentName}.stories.tsx ← Storybook (if project uses it)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Step 3 — Build (skills chain phase 2)**
|
|
25
|
+
Implement following these rules:
|
|
26
|
+
- Use design tokens from `design-system/tokens/` — no hardcoded values
|
|
27
|
+
- Use semantic HTML elements — no div click handlers
|
|
28
|
+
- Include keyboard handling for all interactive elements
|
|
29
|
+
- Include `aria-label` or associated `<label>` for form elements
|
|
30
|
+
- Use existing component primitives (shadcn/ui) where applicable
|
|
31
|
+
- Check 21st.dev MCP for production-ready implementations before building from scratch
|
|
32
|
+
|
|
33
|
+
**Step 4 — Test**
|
|
34
|
+
Write tests covering:
|
|
35
|
+
- Renders without errors
|
|
36
|
+
- Each variant renders correctly
|
|
37
|
+
- Interactive states work (click, keyboard)
|
|
38
|
+
- Accessibility: semantic structure, aria attributes
|
|
39
|
+
|
|
40
|
+
**Step 5 — Audit (skills chain phase 3)**
|
|
41
|
+
Run accessibility and design compliance checks:
|
|
42
|
+
- Token compliance: no hardcoded colors
|
|
43
|
+
- Semantic HTML: no div handlers
|
|
44
|
+
- WCAG: color contrast, keyboard nav
|
|
45
|
+
- Motion: respects prefers-reduced-motion
|
|
46
|
+
|
|
47
|
+
**Step 6 — Report**
|
|
48
|
+
```
|
|
49
|
+
✓ Component: {ComponentName}
|
|
50
|
+
Files: {list created files}
|
|
51
|
+
Variants: {list}
|
|
52
|
+
Tests: {pass/fail count}
|
|
53
|
+
Audit: {pass/fail with details}
|
|
54
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Bootstrap a design system for the current project. Creates token files, theme config, and base component structure. Use at the start of any new web project.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are bootstrapping a design system for the current project.
|
|
6
|
+
|
|
7
|
+
**Step 1 — Assess current state**
|
|
8
|
+
- Check if `design-system/` or equivalent already exists
|
|
9
|
+
- Check if Tailwind config exists (`tailwind.config.*`)
|
|
10
|
+
- Check if any CSS variables or tokens are already defined
|
|
11
|
+
- If design system exists: report what's there and ask what to update
|
|
12
|
+
|
|
13
|
+
**Step 2 — Gather design direction**
|
|
14
|
+
Ask in a single message:
|
|
15
|
+
- Brand colors (primary, secondary, accent) — or "suggest based on project type"
|
|
16
|
+
- Typography preference (serif, sans-serif, mono, or specific fonts)
|
|
17
|
+
- Design aesthetic (minimal, bold, editorial, playful, corporate)
|
|
18
|
+
- Dark mode support needed? [Y/n]
|
|
19
|
+
|
|
20
|
+
**Step 3 — Create token hierarchy**
|
|
21
|
+
Create 3-tier token structure:
|
|
22
|
+
1. **Primitive tokens** — raw values (`--color-blue-500: #3B82F6`)
|
|
23
|
+
2. **Semantic tokens** — meaning (`--color-primary: var(--color-blue-500)`)
|
|
24
|
+
3. **Component tokens** — usage (`--button-bg: var(--color-primary)`)
|
|
25
|
+
|
|
26
|
+
Write to `design-system/tokens/` (or project-appropriate location).
|
|
27
|
+
|
|
28
|
+
**Step 4 — Create base components**
|
|
29
|
+
Scaffold these if they don't exist:
|
|
30
|
+
- Button (primary, secondary, ghost variants)
|
|
31
|
+
- Input (text, with label and error state)
|
|
32
|
+
- Card (with header, body, footer slots)
|
|
33
|
+
- Typography (h1-h6, body, caption)
|
|
34
|
+
|
|
35
|
+
**Step 5 — Report**
|
|
36
|
+
```
|
|
37
|
+
✓ Design system initialized
|
|
38
|
+
Tokens: {path}/tokens/
|
|
39
|
+
Components: {path}/components/
|
|
40
|
+
Theme: {tailwind.config or css vars file}
|
|
41
|
+
Dark mode: {enabled/disabled}
|
|
42
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Validate the token pipeline — ensure design tokens flow correctly from definition through to component usage. Catches orphan tokens, missing references, and broken chains.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are validating the design token pipeline.
|
|
6
|
+
|
|
7
|
+
**Step 1 — Locate token definitions**
|
|
8
|
+
Find token files:
|
|
9
|
+
```bash
|
|
10
|
+
find . -path "*/tokens/*" -o -path "*/design-system/*" | grep -E "\.(css|ts|js|json)$"
|
|
11
|
+
```
|
|
12
|
+
Also check: `tailwind.config.*` for theme extensions.
|
|
13
|
+
|
|
14
|
+
**Step 2 — Extract defined tokens**
|
|
15
|
+
Parse all token files. Build a list of defined token names:
|
|
16
|
+
- CSS custom properties (`--token-name`)
|
|
17
|
+
- Tailwind theme keys
|
|
18
|
+
- JS/TS token exports
|
|
19
|
+
|
|
20
|
+
**Step 3 — Find token usage in components**
|
|
21
|
+
```bash
|
|
22
|
+
# CSS var references
|
|
23
|
+
grep -rn "var(--" src/components/ | sed 's/.*var(--/--/' | sed 's/).*//' | sort -u
|
|
24
|
+
|
|
25
|
+
# Tailwind class usage (approximate — look for theme-derived classes)
|
|
26
|
+
grep -rn "className" src/components/ | grep -oE "[a-z]+-[a-z]+-[0-9]+" | sort -u
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Step 4 — Cross-reference**
|
|
30
|
+
- **Orphan tokens**: Defined but never used in any component → WARN
|
|
31
|
+
- **Missing tokens**: Referenced in components but not defined → BLOCK
|
|
32
|
+
- **Broken chain**: Semantic token references a primitive that doesn't exist → BLOCK
|
|
33
|
+
- **Shadow values**: Component uses a raw value that has a token equivalent → WARN
|
|
34
|
+
|
|
35
|
+
**Step 5 — Report**
|
|
36
|
+
```
|
|
37
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
38
|
+
TOKEN SYNC — {today_date}
|
|
39
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
40
|
+
|
|
41
|
+
Defined tokens: {count}
|
|
42
|
+
Used tokens: {count}
|
|
43
|
+
Orphan tokens: {count} (defined, never used)
|
|
44
|
+
Missing tokens: {count} (used, never defined) — BLOCKING
|
|
45
|
+
Shadow values: {count} (raw value has token equivalent)
|
|
46
|
+
|
|
47
|
+
{details for each finding}
|
|
48
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
49
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
echo "=== Praxis: Installing web-designer kit ==="
|
|
5
|
+
echo ""
|
|
6
|
+
|
|
7
|
+
# Skills
|
|
8
|
+
echo "Installing npm skills..."
|
|
9
|
+
|
|
10
|
+
SKILLS=(
|
|
11
|
+
"nextlevelbuilder/ui-ux-pro-max-skill@ui-ux-pro-max"
|
|
12
|
+
"shadcn-ui/ui@skills"
|
|
13
|
+
"web-accessibility"
|
|
14
|
+
"ibelick/ui-skills"
|
|
15
|
+
"vercel/web-design-guidelines"
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
for skill in "${SKILLS[@]}"; do
|
|
19
|
+
echo " Installing $skill..."
|
|
20
|
+
if npx skills add "$skill" -g -y 2>/dev/null; then
|
|
21
|
+
echo " ✓ $skill"
|
|
22
|
+
else
|
|
23
|
+
echo " ⚠ $skill failed — install manually: npx skills add $skill -g -y"
|
|
24
|
+
fi
|
|
25
|
+
done
|
|
26
|
+
|
|
27
|
+
echo ""
|
|
28
|
+
|
|
29
|
+
# MCP Servers
|
|
30
|
+
echo "Registering MCP servers..."
|
|
31
|
+
if claude mcp add 21st-magic npx -- -y @21st-dev/magic@latest 2>/dev/null; then
|
|
32
|
+
echo " ✓ 21st-magic MCP server registered"
|
|
33
|
+
else
|
|
34
|
+
echo " ⚠ 21st-magic registration failed — run manually:"
|
|
35
|
+
echo " claude mcp add 21st-magic npx -- -y @21st-dev/magic@latest"
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
echo ""
|
|
39
|
+
echo "=== web-designer kit installed ==="
|
|
40
|
+
echo "Activate with: /kit:web-designer"
|
|
41
|
+
echo ""
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "*.tsx"
|
|
4
|
+
- "*.jsx"
|
|
5
|
+
- "*.vue"
|
|
6
|
+
- "*.css"
|
|
7
|
+
- "*.scss"
|
|
8
|
+
- "src/components/**"
|
|
9
|
+
- "design-system/**"
|
|
10
|
+
- "styles/**"
|
|
11
|
+
---
|
|
12
|
+
# Web Design — Rules
|
|
13
|
+
# Scope: Frontend component and design system files
|
|
14
|
+
# Part of: web-designer AI-Kit
|
|
15
|
+
|
|
16
|
+
## Invariants (BLOCK on violation)
|
|
17
|
+
|
|
18
|
+
### Design Tokens
|
|
19
|
+
- No inline styles in component files — use design tokens or Tailwind utilities.
|
|
20
|
+
- No hardcoded color values (`#fff`, `rgb(...)`) — must reference token variables
|
|
21
|
+
(`var(--color-primary)`, Tailwind classes, or theme values).
|
|
22
|
+
- Check: `grep -rn "color:" src/components/ | grep -v "var(--" | grep -v "tailwind"`
|
|
23
|
+
|
|
24
|
+
### Semantic HTML
|
|
25
|
+
- No `<div>` click handlers — use `<button>` for actions, `<a>` for navigation.
|
|
26
|
+
- Check: `grep -rn 'onClick.*<div' src/components/`
|
|
27
|
+
- Every interactive element must have explicit keyboard handling (`onKeyDown` or
|
|
28
|
+
native keyboard support via semantic elements).
|
|
29
|
+
|
|
30
|
+
### Accessibility
|
|
31
|
+
- Every `<img>` must have an `alt` attribute (empty `alt=""` for decorative images).
|
|
32
|
+
- Form inputs must have associated `<label>` elements or `aria-label`.
|
|
33
|
+
- Color contrast must meet WCAG AA minimum (4.5:1 for text, 3:1 for large text).
|
|
34
|
+
|
|
35
|
+
## Conventions (WARN on violation)
|
|
36
|
+
|
|
37
|
+
### Component Structure
|
|
38
|
+
- Component files follow `ComponentName/index.tsx` + `ComponentName.module.css`
|
|
39
|
+
(or `ComponentName.tsx` with Tailwind — pick one pattern per project, don't mix).
|
|
40
|
+
- Design tokens live in `design-system/tokens/` or equivalent.
|
|
41
|
+
- Shared components live in `src/components/ui/` — page-specific components
|
|
42
|
+
live in `src/components/[page-name]/`.
|
|
43
|
+
|
|
44
|
+
### Animation and Motion
|
|
45
|
+
- Animation durations use token values, not magic numbers.
|
|
46
|
+
- Respect `prefers-reduced-motion` — wrap animations in media query.
|
|
47
|
+
- CSS transitions preferred over JS animation libraries for simple effects.
|
|
48
|
+
|
|
49
|
+
### Performance
|
|
50
|
+
- Images have explicit `width` and `height` to prevent CLS (Cumulative Layout Shift).
|
|
51
|
+
- Lazy-load images below the fold (`loading="lazy"`).
|
|
52
|
+
- No layout-triggering CSS in animation loops (`top`, `left`, `width`, `height` — use `transform` and `opacity`).
|
|
53
|
+
|
|
54
|
+
### Design System Hygiene
|
|
55
|
+
- New components must use existing tokens before creating new ones.
|
|
56
|
+
- If a new token is needed: add to the token file, not inline.
|
|
57
|
+
- Component variants use a consistent API pattern (props, not className overrides).
|
|
58
|
+
|
|
59
|
+
## Verification Commands
|
|
60
|
+
```bash
|
|
61
|
+
# Token compliance — find hardcoded colors
|
|
62
|
+
grep -rn "color:" src/components/ | grep -v "var(--" | grep -v "token" | grep -v "tailwind"
|
|
63
|
+
|
|
64
|
+
# Semantic HTML — find div click handlers
|
|
65
|
+
grep -rn 'onClick.*<div' src/components/
|
|
66
|
+
|
|
67
|
+
# Accessibility — find images without alt
|
|
68
|
+
grep -rn '<img' src/components/ | grep -v 'alt='
|
|
69
|
+
|
|
70
|
+
# CLS prevention — find images without dimensions
|
|
71
|
+
grep -rn '<img' src/components/ | grep -v 'width' | grep -v 'height'
|
|
72
|
+
|
|
73
|
+
# Accessibility audit (if axe-core installed)
|
|
74
|
+
npx axe-core src/ --exit
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Removal Condition
|
|
78
|
+
Remove when the project's design system is mature with >90% component coverage
|
|
79
|
+
and design review is handled by a dedicated design tool or CI pipeline.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
echo "=== Praxis: Removing web-designer kit dependencies ==="
|
|
5
|
+
echo ""
|
|
6
|
+
echo "Note: This removes npm skills. MCP servers persist globally"
|
|
7
|
+
echo "and must be removed manually via: claude mcp remove 21st-magic"
|
|
8
|
+
echo ""
|
|
9
|
+
|
|
10
|
+
SKILLS=(
|
|
11
|
+
"nextlevelbuilder/ui-ux-pro-max-skill@ui-ux-pro-max"
|
|
12
|
+
"shadcn-ui/ui@skills"
|
|
13
|
+
"web-accessibility"
|
|
14
|
+
"ibelick/ui-skills"
|
|
15
|
+
"vercel/web-design-guidelines"
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
for skill in "${SKILLS[@]}"; do
|
|
19
|
+
echo " Removing $skill..."
|
|
20
|
+
npx skills remove "$skill" -g 2>/dev/null || echo " ⚠ $skill not found or already removed"
|
|
21
|
+
done
|
|
22
|
+
|
|
23
|
+
echo ""
|
|
24
|
+
echo "=== web-designer kit dependencies removed ==="
|
|
25
|
+
echo "To also remove MCP server: claude mcp remove 21st-magic"
|
|
26
|
+
echo ""
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@esoteric-logic/praxis-harness",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Layered Claude Code harness — workflow discipline, AI-Kits, persistent vault integration",
|
|
5
|
+
"bin": {
|
|
6
|
+
"praxis-harness": "./bin/praxis.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/",
|
|
10
|
+
"base/",
|
|
11
|
+
"kits/",
|
|
12
|
+
"templates/",
|
|
13
|
+
"scripts/"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "node --check bin/praxis.js"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/arcanesme/praxis.git"
|
|
21
|
+
},
|
|
22
|
+
"keywords": ["claude-code", "ai-harness", "vault", "obsidian", "logseq", "workflow", "gsd"],
|
|
23
|
+
"author": "arcanesme",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18"
|
|
27
|
+
}
|
|
28
|
+
}
|