@slamb2k/mad-skills 2.0.6
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 +129 -0
- package/package.json +42 -0
- package/skills/brace/SKILL.md +51 -0
- package/skills/brace/assets/gitignore-template +28 -0
- package/skills/brace/assets/global-preferences-template.md +53 -0
- package/skills/brace/instructions.md +229 -0
- package/skills/brace/references/brace-workflow.md +109 -0
- package/skills/brace/references/claude-md-template.md +91 -0
- package/skills/brace/references/gotcha-principles.md +113 -0
- package/skills/brace/references/phase-prompts.md +228 -0
- package/skills/brace/references/report-template.md +38 -0
- package/skills/brace/references/scaffold-manifest.md +68 -0
- package/skills/brace/tests/evals.json +29 -0
- package/skills/build/SKILL.md +48 -0
- package/skills/build/instructions.md +293 -0
- package/skills/build/references/architecture-notes.md +34 -0
- package/skills/build/references/project-detection.md +45 -0
- package/skills/build/references/report-contracts.md +21 -0
- package/skills/build/references/stage-prompts.md +405 -0
- package/skills/build/tests/evals.json +28 -0
- package/skills/distil/SKILL.md +38 -0
- package/skills/distil/assets/DesignNav.tsx +54 -0
- package/skills/distil/instructions.md +255 -0
- package/skills/distil/references/design-guide.md +118 -0
- package/skills/distil/references/iteration-mode.md +186 -0
- package/skills/distil/references/project-setup.md +92 -0
- package/skills/distil/tests/evals.json +28 -0
- package/skills/manifest.json +76 -0
- package/skills/prime/SKILL.md +39 -0
- package/skills/prime/instructions.md +73 -0
- package/skills/prime/references/domains.md +38 -0
- package/skills/prime/tests/evals.json +28 -0
- package/skills/rig/SKILL.md +38 -0
- package/skills/rig/assets/azure-pipelines.yml +91 -0
- package/skills/rig/assets/ci.yml +104 -0
- package/skills/rig/assets/gitmessage +38 -0
- package/skills/rig/assets/lefthook.yml +29 -0
- package/skills/rig/assets/pull_request_template.md +24 -0
- package/skills/rig/instructions.md +162 -0
- package/skills/rig/references/configuration-steps.md +124 -0
- package/skills/rig/references/phase-prompts.md +180 -0
- package/skills/rig/references/report-template.md +28 -0
- package/skills/rig/tests/evals.json +29 -0
- package/skills/ship/SKILL.md +55 -0
- package/skills/ship/instructions.md +192 -0
- package/skills/ship/references/stage-prompts.md +322 -0
- package/skills/ship/tests/evals.json +30 -0
- package/skills/sync/SKILL.md +54 -0
- package/skills/sync/instructions.md +178 -0
- package/skills/sync/tests/evals.json +29 -0
- package/src/cli.js +419 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generated": "2026-02-28T05:58:04.217Z",
|
|
3
|
+
"count": 7,
|
|
4
|
+
"skills": [
|
|
5
|
+
{
|
|
6
|
+
"name": "brace",
|
|
7
|
+
"directory": "brace",
|
|
8
|
+
"description": "> Initialize any project directory with the GOTCHA/BRACE framework for agentic AI systems. Creates the 6-layer structure (Goals, Orchestration, Tools, Context, Hard prompts, Args), BRACE build methodology, and a project CLAUDE.md. Recommends claude-mem for persistent memory. Idempotent — safe to run on existing projects. Triggers: \"init gotcha\", \"setup brace\", \"brace\", \"initialize framework\", \"bootstrap gotcha\".",
|
|
9
|
+
"lines": 52,
|
|
10
|
+
"hasScripts": false,
|
|
11
|
+
"hasReferences": true,
|
|
12
|
+
"hasAssets": true,
|
|
13
|
+
"hasTests": true
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "build",
|
|
17
|
+
"directory": "build",
|
|
18
|
+
"description": "> Context-isolated feature development pipeline. Takes a detailed design/plan as argument and executes the full feature-dev lifecycle (explore, question, architect, implement, review, ship) inside subagents so the primary conversation stays compact. Use when you have a well-defined plan and want autonomous execution with minimal context window consumption.",
|
|
19
|
+
"lines": 49,
|
|
20
|
+
"hasScripts": false,
|
|
21
|
+
"hasReferences": true,
|
|
22
|
+
"hasAssets": false,
|
|
23
|
+
"hasTests": true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "distil",
|
|
27
|
+
"directory": "distil",
|
|
28
|
+
"description": "> Generate multiple unique web design variations for any website or web application. Accepts site specifications from a file (--spec path) or pasted text block. Creates a Vite + React + TypeScript + Tailwind project with Bun and produces N different creative designs accessible at /1, /2, /3, etc. Use when prototyping or exploring design directions for any web interface.",
|
|
29
|
+
"lines": 39,
|
|
30
|
+
"hasScripts": false,
|
|
31
|
+
"hasReferences": true,
|
|
32
|
+
"hasAssets": true,
|
|
33
|
+
"hasTests": true
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "prime",
|
|
37
|
+
"directory": "prime",
|
|
38
|
+
"description": "> Load project context before implementing features or making architectural decisions. Invoke proactively when starting significant work on DexAI. Supports domain-specific context loading: security (vault, RBAC, audit), routing (OpenRouter, model selection), adhd (design principles, RSD-safe), dashboard (frontend, backend, API), office (OAuth, email, calendar), memory (context capture, commitments), tasks (decomposition, friction-solving), channels (Telegram, Discord, Slack).",
|
|
39
|
+
"lines": 40,
|
|
40
|
+
"hasScripts": false,
|
|
41
|
+
"hasReferences": true,
|
|
42
|
+
"hasAssets": false,
|
|
43
|
+
"hasTests": true
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "rig",
|
|
47
|
+
"directory": "rig",
|
|
48
|
+
"description": "> Idempotently bootstrap any repository with standard development tools, hooks, and workflows. Use when starting work on a new repo, onboarding to an existing project, or ensuring a repo has proper CI/CD setup. Configures: git hooks (lefthook), commit message templates, PR templates, and GitHub Actions for lint/format/type-check/build. Prompts for user confirmation before changes. Triggers: \"bootstrap repo\", \"setup hooks\", \"configure CI\", \"rig\", \"standardize repo\".",
|
|
49
|
+
"lines": 39,
|
|
50
|
+
"hasScripts": false,
|
|
51
|
+
"hasReferences": true,
|
|
52
|
+
"hasAssets": true,
|
|
53
|
+
"hasTests": true
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "ship",
|
|
57
|
+
"directory": "ship",
|
|
58
|
+
"description": "> Ship changes through the full PR lifecycle. Use after completing feature work to commit, push, create PR, wait for checks, and merge. Handles the entire workflow: syncs with main, creates feature branch if needed, groups commits logically with semantic messages, creates detailed PR, monitors CI, fixes issues, squash merges, and cleans up. Invoke when work is ready to ship.",
|
|
59
|
+
"lines": 56,
|
|
60
|
+
"hasScripts": false,
|
|
61
|
+
"hasReferences": true,
|
|
62
|
+
"hasAssets": false,
|
|
63
|
+
"hasTests": true
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "sync",
|
|
67
|
+
"directory": "sync",
|
|
68
|
+
"description": "> Sync local repository with origin/main. Use before starting new work, after completing a PR, or when needing latest upstream changes. Safely stashes uncommitted changes, fetches and pulls origin/main, restores stash, and cleans up stale local branches (merged or with deleted remotes). Invoke when switching contexts or preparing for new feature work.",
|
|
69
|
+
"lines": 55,
|
|
70
|
+
"hasScripts": false,
|
|
71
|
+
"hasReferences": false,
|
|
72
|
+
"hasAssets": false,
|
|
73
|
+
"hasTests": true
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prime
|
|
3
|
+
description: >
|
|
4
|
+
Load project context before implementing features or making architectural decisions.
|
|
5
|
+
Invoke proactively when starting significant work on DexAI. Supports domain-specific
|
|
6
|
+
context loading: security (vault, RBAC, audit), routing (OpenRouter, model selection),
|
|
7
|
+
adhd (design principles, RSD-safe), dashboard (frontend, backend, API), office (OAuth,
|
|
8
|
+
email, calendar), memory (context capture, commitments), tasks (decomposition,
|
|
9
|
+
friction-solving), channels (Telegram, Discord, Slack).
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Prime - Project Context Loader
|
|
13
|
+
|
|
14
|
+
When this skill is invoked, IMMEDIATELY output the banner below before doing anything else.
|
|
15
|
+
Pick ONE tagline at random — vary your choice each time:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
{tagline}
|
|
19
|
+
|
|
20
|
+
██╗██████╗ ██████╗ ██╗███╗ ███╗███████╗
|
|
21
|
+
██╔╝██╔══██╗██╔══██╗██║████╗ ████║██╔════╝
|
|
22
|
+
██╔╝ ██████╔╝██████╔╝██║██╔████╔██║█████╗
|
|
23
|
+
██╔╝ ██╔═══╝ ██╔══██╗██║██║╚██╔╝██║██╔══╝
|
|
24
|
+
██╔╝ ██║ ██║ ██║██║██║ ╚═╝ ██║███████╗
|
|
25
|
+
╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚══════╝
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Taglines:
|
|
30
|
+
- 🔋 Loading the arsenal...
|
|
31
|
+
- 📚 Knowledge is power!
|
|
32
|
+
- 📖 Absorbing the sacred texts...
|
|
33
|
+
- 📡 Context loading... please stand by!
|
|
34
|
+
- 💣 Priming the knowledge cannon!
|
|
35
|
+
- 🤓 Time to do my homework!
|
|
36
|
+
- 📜 Downloading the lore...
|
|
37
|
+
- 🧠 Brain cells: ACTIVATING
|
|
38
|
+
|
|
39
|
+
Follow instructions in: [instructions.md](instructions.md)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Prime Instructions
|
|
2
|
+
|
|
3
|
+
Load project context to inform agent decisions. Raw file contents stay in a
|
|
4
|
+
subagent — the primary thread only sees a structured PRIME_REPORT.
|
|
5
|
+
|
|
6
|
+
## Step 1: Parse Arguments
|
|
7
|
+
|
|
8
|
+
Extract domain hints from the request (comma-separated). Valid domains are
|
|
9
|
+
listed in `references/domains.md`. If no domain specified, load core context only.
|
|
10
|
+
|
|
11
|
+
## Step 2: Load Context via Subagent
|
|
12
|
+
|
|
13
|
+
Launch a **general-purpose subagent** to read files and build the report:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Task(
|
|
17
|
+
subagent_type: "general-purpose",
|
|
18
|
+
description: "Load and summarise project context",
|
|
19
|
+
prompt: <see below>
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Subagent Prompt
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Load project context and return a structured summary. Raw file contents must
|
|
27
|
+
NOT appear in the report — summarise only.
|
|
28
|
+
|
|
29
|
+
Limit PRIME_REPORT to 30 lines maximum.
|
|
30
|
+
|
|
31
|
+
## Core Files (always load)
|
|
32
|
+
|
|
33
|
+
1. CLAUDE.md — System handbook, operating procedures
|
|
34
|
+
2. goals/manifest.md — Phase status, available goals, project roadmap
|
|
35
|
+
3. tools/manifest.md — Available tools and their locations
|
|
36
|
+
|
|
37
|
+
If CLAUDE.md is missing, record as NOT FOUND and continue.
|
|
38
|
+
|
|
39
|
+
## Domain Files
|
|
40
|
+
|
|
41
|
+
{For each requested domain, list files from references/domains.md}
|
|
42
|
+
|
|
43
|
+
For each file:
|
|
44
|
+
- If it exists: read and summarise (2-3 lines max per domain)
|
|
45
|
+
- If it doesn't exist: record as NOT FOUND and continue
|
|
46
|
+
|
|
47
|
+
## Output Format
|
|
48
|
+
|
|
49
|
+
PRIME_REPORT:
|
|
50
|
+
- core_files_loaded: {count}/{total}
|
|
51
|
+
- missing_files: {list or "none"}
|
|
52
|
+
- domains_loaded: {list}
|
|
53
|
+
- per_domain_summary:
|
|
54
|
+
- {domain}: {2-3 line summary}
|
|
55
|
+
- branch: {current branch from git branch --show-current}
|
|
56
|
+
- ready_for: {inferred from loaded context}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Step 3: Present Summary
|
|
60
|
+
|
|
61
|
+
Parse PRIME_REPORT and present a clean summary to the user:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Context loaded:
|
|
65
|
+
- Core: {status from core_files_loaded}
|
|
66
|
+
- {Domain}: {summary from per_domain_summary}
|
|
67
|
+
|
|
68
|
+
Current branch: {branch}
|
|
69
|
+
Ready to assist with: {ready_for}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If CLAUDE.md was missing, warn the user and note that only domain context
|
|
73
|
+
was loaded.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Domain-to-File Mapping
|
|
2
|
+
|
|
3
|
+
Each domain lists the files/directories to load for that context area.
|
|
4
|
+
Paths are relative to the project root.
|
|
5
|
+
|
|
6
|
+
## security
|
|
7
|
+
- `args/security.yaml`
|
|
8
|
+
- `tools/security/` (list directory)
|
|
9
|
+
|
|
10
|
+
## routing
|
|
11
|
+
- `args/routing.yaml`
|
|
12
|
+
- `tools/agent/model_router/ROUTING_ARCHITECTURE.md`
|
|
13
|
+
|
|
14
|
+
## adhd
|
|
15
|
+
- `context/adhd_design_principles.md`
|
|
16
|
+
- `args/adhd_mode.yaml`
|
|
17
|
+
|
|
18
|
+
## dashboard
|
|
19
|
+
- `args/dashboard.yaml`
|
|
20
|
+
- `tools/dashboard/backend/routes/` (list directory)
|
|
21
|
+
- `tools/dashboard/frontend/app/` (list directory)
|
|
22
|
+
|
|
23
|
+
## office
|
|
24
|
+
- `args/office_integration.yaml`
|
|
25
|
+
- `tools/office/` (list directory)
|
|
26
|
+
|
|
27
|
+
## memory
|
|
28
|
+
- `args/memory.yaml`
|
|
29
|
+
- `args/working_memory.yaml`
|
|
30
|
+
- `tools/memory/` (list directory)
|
|
31
|
+
|
|
32
|
+
## tasks
|
|
33
|
+
- `args/task_engine.yaml`
|
|
34
|
+
- `tools/tasks/` (list directory)
|
|
35
|
+
|
|
36
|
+
## channels
|
|
37
|
+
- `args/channels.yaml`
|
|
38
|
+
- `tools/channels/` (list directory)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "banner-and-tagline",
|
|
4
|
+
"prompt": "Load project context",
|
|
5
|
+
"assertions": [
|
|
6
|
+
{ "type": "contains", "value": "██" },
|
|
7
|
+
{ "type": "regex", "value": "(Loading the arsenal|Knowledge is power|sacred texts|please stand by|knowledge cannon|do my homework|Downloading the lore|Brain cells)" },
|
|
8
|
+
{ "type": "semantic", "value": "The response begins with an ASCII art banner displayed BEFORE any explanation or workflow steps" }
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "context-loading",
|
|
13
|
+
"prompt": "Prime me for working on the security module",
|
|
14
|
+
"assertions": [
|
|
15
|
+
{ "type": "contains", "value": "██" },
|
|
16
|
+
{ "type": "regex", "value": "(context|load)", "flags": "i" },
|
|
17
|
+
{ "type": "semantic", "value": "Describes loading project context including domain-specific files, and mentions producing a structured summary or report rather than dumping raw file contents" }
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "domain-awareness",
|
|
22
|
+
"prompt": "Load context for the dashboard and routing domains",
|
|
23
|
+
"assertions": [
|
|
24
|
+
{ "type": "contains", "value": "██" },
|
|
25
|
+
{ "type": "semantic", "value": "Recognizes 'dashboard' and 'routing' as valid domain-specific contexts and describes loading files relevant to those domains" }
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rig
|
|
3
|
+
description: >
|
|
4
|
+
Idempotently bootstrap any repository with standard development tools, hooks, and workflows.
|
|
5
|
+
Use when starting work on a new repo, onboarding to an existing project, or ensuring a repo
|
|
6
|
+
has proper CI/CD setup. Configures: git hooks (lefthook), commit message templates, PR templates,
|
|
7
|
+
and GitHub Actions for lint/format/type-check/build. Prompts for user confirmation before changes.
|
|
8
|
+
Triggers: "bootstrap repo", "setup hooks", "configure CI", "rig", "standardize repo".
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Rig - Repository Bootstrap
|
|
12
|
+
|
|
13
|
+
When this skill is invoked, IMMEDIATELY output the banner below before doing anything else.
|
|
14
|
+
Pick ONE tagline at random — vary your choice each time:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
{tagline}
|
|
18
|
+
|
|
19
|
+
██╗██████╗ ██╗ ██████╗
|
|
20
|
+
██╔╝██╔══██╗██║██╔════╝
|
|
21
|
+
██╔╝ ██████╔╝██║██║ ███╗
|
|
22
|
+
██╔╝ ██╔══██╗██║██║ ██║
|
|
23
|
+
██╔╝ ██║ ██║██║╚██████╔╝
|
|
24
|
+
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═════╝
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Taglines:
|
|
29
|
+
- Rigging up the production line...
|
|
30
|
+
- Bolting down the framework!
|
|
31
|
+
- Assembling the scaffolding!
|
|
32
|
+
- Hoisting the infrastructure!
|
|
33
|
+
- Locking in the safety harness!
|
|
34
|
+
- Wiring up the control panel!
|
|
35
|
+
- Setting up the drill floor!
|
|
36
|
+
- From blueprint to build-ready!
|
|
37
|
+
|
|
38
|
+
Follow instructions in: [instructions.md](instructions.md)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
trigger:
|
|
2
|
+
branches:
|
|
3
|
+
include:
|
|
4
|
+
- main
|
|
5
|
+
|
|
6
|
+
pr:
|
|
7
|
+
branches:
|
|
8
|
+
include:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
pool:
|
|
12
|
+
vmImage: 'ubuntu-latest'
|
|
13
|
+
|
|
14
|
+
stages:
|
|
15
|
+
- stage: Validate
|
|
16
|
+
jobs:
|
|
17
|
+
- job: Lint
|
|
18
|
+
displayName: Lint
|
|
19
|
+
steps:
|
|
20
|
+
- task: NodeTool@0
|
|
21
|
+
inputs:
|
|
22
|
+
versionSpec: '20.x'
|
|
23
|
+
displayName: 'Setup Node.js'
|
|
24
|
+
|
|
25
|
+
- script: npm ci
|
|
26
|
+
displayName: 'Install dependencies'
|
|
27
|
+
|
|
28
|
+
- script: npm run lint --if-present
|
|
29
|
+
displayName: 'Run linter'
|
|
30
|
+
|
|
31
|
+
- job: Format
|
|
32
|
+
displayName: Format Check
|
|
33
|
+
steps:
|
|
34
|
+
- task: NodeTool@0
|
|
35
|
+
inputs:
|
|
36
|
+
versionSpec: '20.x'
|
|
37
|
+
displayName: 'Setup Node.js'
|
|
38
|
+
|
|
39
|
+
- script: npm ci
|
|
40
|
+
displayName: 'Install dependencies'
|
|
41
|
+
|
|
42
|
+
- script: npm run format:check --if-present || npx prettier --check .
|
|
43
|
+
displayName: 'Check formatting'
|
|
44
|
+
|
|
45
|
+
- job: TypeCheck
|
|
46
|
+
displayName: Type Check
|
|
47
|
+
steps:
|
|
48
|
+
- task: NodeTool@0
|
|
49
|
+
inputs:
|
|
50
|
+
versionSpec: '20.x'
|
|
51
|
+
displayName: 'Setup Node.js'
|
|
52
|
+
|
|
53
|
+
- script: npm ci
|
|
54
|
+
displayName: 'Install dependencies'
|
|
55
|
+
|
|
56
|
+
- script: npm run typecheck --if-present || npm run type-check --if-present || npx tsc --noEmit
|
|
57
|
+
displayName: 'Run type check'
|
|
58
|
+
|
|
59
|
+
- stage: Build
|
|
60
|
+
dependsOn: Validate
|
|
61
|
+
jobs:
|
|
62
|
+
- job: Build
|
|
63
|
+
displayName: Build
|
|
64
|
+
steps:
|
|
65
|
+
- task: NodeTool@0
|
|
66
|
+
inputs:
|
|
67
|
+
versionSpec: '20.x'
|
|
68
|
+
displayName: 'Setup Node.js'
|
|
69
|
+
|
|
70
|
+
- script: npm ci
|
|
71
|
+
displayName: 'Install dependencies'
|
|
72
|
+
|
|
73
|
+
- script: npm run build
|
|
74
|
+
displayName: 'Build'
|
|
75
|
+
|
|
76
|
+
- stage: Test
|
|
77
|
+
dependsOn: Build
|
|
78
|
+
jobs:
|
|
79
|
+
- job: Test
|
|
80
|
+
displayName: Test
|
|
81
|
+
steps:
|
|
82
|
+
- task: NodeTool@0
|
|
83
|
+
inputs:
|
|
84
|
+
versionSpec: '20.x'
|
|
85
|
+
displayName: 'Setup Node.js'
|
|
86
|
+
|
|
87
|
+
- script: npm ci
|
|
88
|
+
displayName: 'Install dependencies'
|
|
89
|
+
|
|
90
|
+
- script: npm test --if-present
|
|
91
|
+
displayName: 'Run tests'
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
lint:
|
|
15
|
+
name: Lint
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Setup Node.js
|
|
21
|
+
uses: actions/setup-node@v4
|
|
22
|
+
with:
|
|
23
|
+
node-version: '20'
|
|
24
|
+
cache: 'npm'
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: npm ci
|
|
28
|
+
|
|
29
|
+
- name: Run linter
|
|
30
|
+
run: npm run lint --if-present
|
|
31
|
+
|
|
32
|
+
format:
|
|
33
|
+
name: Format Check
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
|
|
38
|
+
- name: Setup Node.js
|
|
39
|
+
uses: actions/setup-node@v4
|
|
40
|
+
with:
|
|
41
|
+
node-version: '20'
|
|
42
|
+
cache: 'npm'
|
|
43
|
+
|
|
44
|
+
- name: Install dependencies
|
|
45
|
+
run: npm ci
|
|
46
|
+
|
|
47
|
+
- name: Check formatting
|
|
48
|
+
run: npm run format:check --if-present || npx prettier --check .
|
|
49
|
+
|
|
50
|
+
typecheck:
|
|
51
|
+
name: Type Check
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
- name: Setup Node.js
|
|
57
|
+
uses: actions/setup-node@v4
|
|
58
|
+
with:
|
|
59
|
+
node-version: '20'
|
|
60
|
+
cache: 'npm'
|
|
61
|
+
|
|
62
|
+
- name: Install dependencies
|
|
63
|
+
run: npm ci
|
|
64
|
+
|
|
65
|
+
- name: Run type check
|
|
66
|
+
run: npm run typecheck --if-present || npm run type-check --if-present || npx tsc --noEmit
|
|
67
|
+
|
|
68
|
+
build:
|
|
69
|
+
name: Build
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
needs: [lint, format, typecheck]
|
|
72
|
+
steps:
|
|
73
|
+
- uses: actions/checkout@v4
|
|
74
|
+
|
|
75
|
+
- name: Setup Node.js
|
|
76
|
+
uses: actions/setup-node@v4
|
|
77
|
+
with:
|
|
78
|
+
node-version: '20'
|
|
79
|
+
cache: 'npm'
|
|
80
|
+
|
|
81
|
+
- name: Install dependencies
|
|
82
|
+
run: npm ci
|
|
83
|
+
|
|
84
|
+
- name: Build
|
|
85
|
+
run: npm run build
|
|
86
|
+
|
|
87
|
+
test:
|
|
88
|
+
name: Test
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
needs: [build]
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@v4
|
|
93
|
+
|
|
94
|
+
- name: Setup Node.js
|
|
95
|
+
uses: actions/setup-node@v4
|
|
96
|
+
with:
|
|
97
|
+
node-version: '20'
|
|
98
|
+
cache: 'npm'
|
|
99
|
+
|
|
100
|
+
- name: Install dependencies
|
|
101
|
+
run: npm ci
|
|
102
|
+
|
|
103
|
+
- name: Run tests
|
|
104
|
+
run: npm test --if-present
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# <type>(<scope>): <subject>
|
|
2
|
+
#
|
|
3
|
+
# <body>
|
|
4
|
+
#
|
|
5
|
+
# <footer>
|
|
6
|
+
#
|
|
7
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
8
|
+
# Type must be one of the following:
|
|
9
|
+
#
|
|
10
|
+
# feat: A new feature
|
|
11
|
+
# fix: A bug fix
|
|
12
|
+
# docs: Documentation only changes
|
|
13
|
+
# style: Changes that do not affect the meaning of the code
|
|
14
|
+
# refactor: A code change that neither fixes a bug nor adds a feature
|
|
15
|
+
# perf: A code change that improves performance
|
|
16
|
+
# test: Adding missing tests or correcting existing tests
|
|
17
|
+
# chore: Changes to the build process or auxiliary tools
|
|
18
|
+
#
|
|
19
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
20
|
+
# Scope (optional): Component or area affected
|
|
21
|
+
# Examples: auth, api, ui, db, config
|
|
22
|
+
#
|
|
23
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
24
|
+
# Subject: Imperative, present tense, no period, max 50 chars
|
|
25
|
+
# Good: "add user authentication"
|
|
26
|
+
# Bad: "Added user authentication."
|
|
27
|
+
#
|
|
28
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
29
|
+
# Body (optional): Explain WHAT and WHY, not HOW
|
|
30
|
+
# - Wrap at 72 characters
|
|
31
|
+
# - Use bullet points for multiple items
|
|
32
|
+
#
|
|
33
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
34
|
+
# Footer (optional):
|
|
35
|
+
# - Breaking changes: BREAKING CHANGE: <description>
|
|
36
|
+
# - Issue references: Closes #123, Fixes #456
|
|
37
|
+
# - Co-authors: Co-Authored-By: Name <email>
|
|
38
|
+
#
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Lefthook configuration
|
|
2
|
+
# https://github.com/evilmartians/lefthook
|
|
3
|
+
|
|
4
|
+
# Pre-commit hooks (fast checks)
|
|
5
|
+
pre-commit:
|
|
6
|
+
parallel: true
|
|
7
|
+
commands:
|
|
8
|
+
lint:
|
|
9
|
+
glob: "*.{js,jsx,ts,tsx,vue,svelte}"
|
|
10
|
+
run: npm run lint --if-present || echo "No lint script"
|
|
11
|
+
stage_fixed: true
|
|
12
|
+
|
|
13
|
+
format-check:
|
|
14
|
+
glob: "*.{js,jsx,ts,tsx,json,md,yml,yaml,css,scss}"
|
|
15
|
+
run: npm run format:check --if-present || npx prettier --check . 2>/dev/null || echo "No format check"
|
|
16
|
+
|
|
17
|
+
type-check:
|
|
18
|
+
glob: "*.{ts,tsx}"
|
|
19
|
+
run: npm run typecheck --if-present || npm run type-check --if-present || npx tsc --noEmit 2>/dev/null || echo "No type check"
|
|
20
|
+
|
|
21
|
+
# Pre-push hooks (slower, more thorough)
|
|
22
|
+
pre-push:
|
|
23
|
+
parallel: false
|
|
24
|
+
commands:
|
|
25
|
+
test:
|
|
26
|
+
run: npm run test --if-present || npm run test:unit --if-present || echo "No test script"
|
|
27
|
+
|
|
28
|
+
build:
|
|
29
|
+
run: npm run build --if-present || echo "No build script"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## What
|
|
2
|
+
|
|
3
|
+
<!-- Brief description of what this PR does (1-2 sentences) -->
|
|
4
|
+
|
|
5
|
+
## Why
|
|
6
|
+
|
|
7
|
+
<!-- Why is this change needed? What problem does it solve? -->
|
|
8
|
+
|
|
9
|
+
## How
|
|
10
|
+
|
|
11
|
+
<!-- Technical approach taken. Key decisions made and why. -->
|
|
12
|
+
|
|
13
|
+
## Testing
|
|
14
|
+
|
|
15
|
+
<!-- How to verify this works correctly -->
|
|
16
|
+
|
|
17
|
+
- [ ]
|
|
18
|
+
- [ ]
|
|
19
|
+
|
|
20
|
+
## Checklist
|
|
21
|
+
|
|
22
|
+
- [ ] Code follows project conventions
|
|
23
|
+
- [ ] Tests added/updated
|
|
24
|
+
- [ ] Documentation updated (if applicable)
|