chief-clancy 0.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 +426 -0
- package/bin/install.js +169 -0
- package/package.json +42 -0
- package/registry/boards.json +47 -0
- package/src/agents/arch-agent.md +72 -0
- package/src/agents/concerns-agent.md +89 -0
- package/src/agents/design-agent.md +130 -0
- package/src/agents/quality-agent.md +161 -0
- package/src/agents/tech-agent.md +92 -0
- package/src/commands/doctor.md +7 -0
- package/src/commands/help.md +50 -0
- package/src/commands/init.md +7 -0
- package/src/commands/logs.md +7 -0
- package/src/commands/map-codebase.md +16 -0
- package/src/commands/once.md +13 -0
- package/src/commands/review.md +9 -0
- package/src/commands/run.md +11 -0
- package/src/commands/settings.md +7 -0
- package/src/commands/status.md +9 -0
- package/src/commands/uninstall.md +5 -0
- package/src/commands/update-docs.md +9 -0
- package/src/commands/update.md +9 -0
- package/src/templates/.env.example.github +43 -0
- package/src/templates/.env.example.jira +53 -0
- package/src/templates/.env.example.linear +43 -0
- package/src/templates/CLAUDE.md +69 -0
- package/src/templates/scripts/clancy-afk.sh +111 -0
- package/src/templates/scripts/clancy-once-github.sh +225 -0
- package/src/templates/scripts/clancy-once-linear.sh +252 -0
- package/src/templates/scripts/clancy-once.sh +259 -0
- package/src/workflows/doctor.md +115 -0
- package/src/workflows/init.md +423 -0
- package/src/workflows/logs.md +82 -0
- package/src/workflows/map-codebase.md +124 -0
- package/src/workflows/once.md +80 -0
- package/src/workflows/review.md +165 -0
- package/src/workflows/run.md +119 -0
- package/src/workflows/scaffold.md +289 -0
- package/src/workflows/settings.md +344 -0
- package/src/workflows/status.md +120 -0
- package/src/workflows/uninstall.md +75 -0
- package/src/workflows/update-docs.md +89 -0
- package/src/workflows/update.md +67 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"boards": [
|
|
3
|
+
{
|
|
4
|
+
"id": "jira",
|
|
5
|
+
"name": "Jira",
|
|
6
|
+
"author": "Atlassian",
|
|
7
|
+
"url": "https://www.atlassian.com/software/jira",
|
|
8
|
+
"env": [
|
|
9
|
+
"JIRA_BASE_URL",
|
|
10
|
+
"JIRA_USER",
|
|
11
|
+
"JIRA_API_TOKEN",
|
|
12
|
+
"JIRA_PROJECT_KEY",
|
|
13
|
+
"CLANCY_JQL_STATUS",
|
|
14
|
+
"CLANCY_JQL_SPRINT",
|
|
15
|
+
"CLANCY_LABEL",
|
|
16
|
+
"CLANCY_BASE_BRANCH"
|
|
17
|
+
],
|
|
18
|
+
"script": "clancy-once.sh"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "github",
|
|
22
|
+
"name": "GitHub Issues",
|
|
23
|
+
"author": "GitHub",
|
|
24
|
+
"url": "https://github.com",
|
|
25
|
+
"env": [
|
|
26
|
+
"GITHUB_TOKEN",
|
|
27
|
+
"GITHUB_REPO",
|
|
28
|
+
"CLANCY_LABEL",
|
|
29
|
+
"CLANCY_BASE_BRANCH"
|
|
30
|
+
],
|
|
31
|
+
"script": "clancy-once-github.sh"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "linear",
|
|
35
|
+
"name": "Linear",
|
|
36
|
+
"author": "Linear",
|
|
37
|
+
"url": "https://linear.app",
|
|
38
|
+
"env": [
|
|
39
|
+
"LINEAR_API_KEY",
|
|
40
|
+
"LINEAR_TEAM_ID",
|
|
41
|
+
"CLANCY_LABEL",
|
|
42
|
+
"CLANCY_BASE_BRANCH"
|
|
43
|
+
],
|
|
44
|
+
"script": "clancy-once-linear.sh"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Architecture Agent
|
|
2
|
+
|
|
3
|
+
You are the architecture agent for Clancy's `map-codebase` command. Your job is to write one doc:
|
|
4
|
+
- `.clancy/docs/ARCHITECTURE.md`
|
|
5
|
+
|
|
6
|
+
## Instructions
|
|
7
|
+
|
|
8
|
+
1. Use Glob and Grep extensively before writing anything. Understand the actual structure — never guess.
|
|
9
|
+
2. Use real file paths in your output.
|
|
10
|
+
3. Show HOW things are done with real code examples, not just WHAT exists.
|
|
11
|
+
4. Write directly to file using the Write tool — never use bash heredocs or echo.
|
|
12
|
+
5. Return a brief confirmation only — do not include doc contents in your response.
|
|
13
|
+
6. If a section has no applicable content, write: `<!-- Not applicable to this project -->`
|
|
14
|
+
|
|
15
|
+
## What to look for
|
|
16
|
+
|
|
17
|
+
Start by exploring the directory structure:
|
|
18
|
+
- Top-level directories (src, app, lib, packages, etc.)
|
|
19
|
+
- Key subdirectories and what they contain
|
|
20
|
+
- Entry points (main.tsx, index.ts, app/layout.tsx, etc.)
|
|
21
|
+
|
|
22
|
+
Then dig into:
|
|
23
|
+
|
|
24
|
+
**Overview** — One paragraph describing what the system does and how it's structured. Is it a monorepo? SPA? Full-stack app? API-only? Edge functions?
|
|
25
|
+
|
|
26
|
+
**Directory Structure** — Annotated directory tree. Use `tree`-style output. Annotate each directory with its purpose:
|
|
27
|
+
```
|
|
28
|
+
src/
|
|
29
|
+
components/ — shared UI components
|
|
30
|
+
pages/ — Next.js pages (file-based routing)
|
|
31
|
+
lib/ — utility functions and shared logic
|
|
32
|
+
hooks/ — custom React hooks
|
|
33
|
+
store/ — Zustand/Redux/Jotai state
|
|
34
|
+
types/ — TypeScript type definitions
|
|
35
|
+
styles/ — global CSS, theme tokens
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Key Modules** — For each significant module/service, describe:
|
|
39
|
+
- What it does
|
|
40
|
+
- Its public interface (exports)
|
|
41
|
+
- Key dependencies
|
|
42
|
+
- File path
|
|
43
|
+
|
|
44
|
+
**Data Flow** — How data moves through the system. Be specific:
|
|
45
|
+
- Where does data enter? (API routes, form submissions, websockets)
|
|
46
|
+
- How is it fetched? (SWR, React Query, server components, tRPC)
|
|
47
|
+
- How is state managed? (local, global store, server state)
|
|
48
|
+
- Where does it leave? (rendered to DOM, sent to API, stored in DB)
|
|
49
|
+
|
|
50
|
+
Include a real data flow example from the codebase if possible.
|
|
51
|
+
|
|
52
|
+
**API Design** — If the project has an API layer:
|
|
53
|
+
- Route structure and conventions
|
|
54
|
+
- Auth pattern (JWT, session, API key)
|
|
55
|
+
- Request/response patterns
|
|
56
|
+
- Error handling conventions
|
|
57
|
+
- Real example from the codebase
|
|
58
|
+
|
|
59
|
+
**State Management** — If applicable:
|
|
60
|
+
- Library used (Zustand, Jotai, Redux, Context, etc.)
|
|
61
|
+
- Store structure
|
|
62
|
+
- Where stores are initialised
|
|
63
|
+
- Real example of a store slice/atom
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Output format
|
|
68
|
+
|
|
69
|
+
Write the doc, then respond with:
|
|
70
|
+
```
|
|
71
|
+
arch agent complete — ARCHITECTURE.md ({N} lines)
|
|
72
|
+
```
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Concerns Agent
|
|
2
|
+
|
|
3
|
+
You are the concerns agent for Clancy's `map-codebase` command. Your job is to write one doc:
|
|
4
|
+
- `.clancy/docs/CONCERNS.md`
|
|
5
|
+
|
|
6
|
+
This doc warns Clancy about things to avoid — tech debt, security landmines, fragile areas, deprecated patterns. It's the "don't touch this" and "be careful here" guide.
|
|
7
|
+
|
|
8
|
+
## Instructions
|
|
9
|
+
|
|
10
|
+
1. Use Glob and Grep extensively. Look for warning signs, not just clean code.
|
|
11
|
+
2. Use real file paths in your output.
|
|
12
|
+
3. Be direct and specific — "avoid touching src/lib/legacy-auth.ts" not "there are some legacy files"
|
|
13
|
+
4. Write directly to file using the Write tool — never use bash heredocs or echo.
|
|
14
|
+
5. Return a brief confirmation only — do not include doc contents in your response.
|
|
15
|
+
6. If a section has no applicable content, write: `<!-- Not applicable to this project -->`
|
|
16
|
+
|
|
17
|
+
## What to look for
|
|
18
|
+
|
|
19
|
+
### Known Tech Debt
|
|
20
|
+
|
|
21
|
+
Scan for:
|
|
22
|
+
- `// TODO`, `// FIXME`, `// HACK`, `// XXX` comments
|
|
23
|
+
- Files named `legacy`, `old`, `deprecated`, `temp`, `workaround`
|
|
24
|
+
- Commented-out code blocks
|
|
25
|
+
- `@deprecated` JSDoc tags
|
|
26
|
+
- `console.log` left in source (excluding test files)
|
|
27
|
+
|
|
28
|
+
For each significant item: file path, line range, what the debt is, and what risks touching it carries.
|
|
29
|
+
|
|
30
|
+
### Security Considerations
|
|
31
|
+
|
|
32
|
+
Scan for:
|
|
33
|
+
- Hardcoded credentials or API keys (flag but do not expose values)
|
|
34
|
+
- `dangerouslySetInnerHTML` usage — where and is it sanitised?
|
|
35
|
+
- SQL query construction (injection risk if dynamic)
|
|
36
|
+
- File system access without path validation
|
|
37
|
+
- `eval()` or `Function()` usage
|
|
38
|
+
- Disabled security headers
|
|
39
|
+
- CORS wildcard (`Access-Control-Allow-Origin: *`)
|
|
40
|
+
- Cookie settings (httpOnly, secure, sameSite)
|
|
41
|
+
|
|
42
|
+
Flag: what it is, where it is, what the risk is, whether it's intentional (e.g. test code).
|
|
43
|
+
|
|
44
|
+
### Performance Bottlenecks
|
|
45
|
+
|
|
46
|
+
Look for:
|
|
47
|
+
- Large bundle imports without tree-shaking
|
|
48
|
+
- Missing memoisation on expensive computations (large list renders, heavy calculations)
|
|
49
|
+
- Unoptimised images (no `next/image`, no lazy loading)
|
|
50
|
+
- N+1 query patterns in data fetching code
|
|
51
|
+
- Synchronous operations in render paths
|
|
52
|
+
- Large files (> 500 lines) that are imported widely
|
|
53
|
+
|
|
54
|
+
### Areas to Avoid Changing
|
|
55
|
+
|
|
56
|
+
Based on what you've found, list files/directories that are:
|
|
57
|
+
- Generated code (never edit directly)
|
|
58
|
+
- Shared across many features (high blast radius)
|
|
59
|
+
- Poorly tested (risky to modify)
|
|
60
|
+
- Currently broken/under investigation
|
|
61
|
+
|
|
62
|
+
Example format:
|
|
63
|
+
```markdown
|
|
64
|
+
## Areas to Avoid Changing
|
|
65
|
+
|
|
66
|
+
- `src/generated/` — auto-generated from OpenAPI spec, run `yarn generate` to update
|
|
67
|
+
- `src/lib/payment/stripe.ts` — payment critical path, 0 tests, modify with extreme caution
|
|
68
|
+
- `src/components/DataTable/` — complex state machine, many edge cases, avoid refactoring
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Deprecated Patterns
|
|
72
|
+
|
|
73
|
+
Document patterns that appear in the codebase but should NOT be used in new code:
|
|
74
|
+
|
|
75
|
+
- Old API client that was replaced (but old code still uses it)
|
|
76
|
+
- Class components vs function components (if mixed)
|
|
77
|
+
- Old state management approach being migrated away from
|
|
78
|
+
- Deprecated library APIs still in use
|
|
79
|
+
|
|
80
|
+
For each: what the old pattern is, what the new pattern is, where the new pattern is used.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Output format
|
|
85
|
+
|
|
86
|
+
Write the doc, then respond with:
|
|
87
|
+
```
|
|
88
|
+
concerns agent complete — CONCERNS.md ({N} lines)
|
|
89
|
+
```
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Design Agent
|
|
2
|
+
|
|
3
|
+
You are the design agent for Clancy's `map-codebase` command. Your job is to write two docs:
|
|
4
|
+
- `.clancy/docs/DESIGN-SYSTEM.md`
|
|
5
|
+
- `.clancy/docs/ACCESSIBILITY.md`
|
|
6
|
+
|
|
7
|
+
This is Clancy's differentiator — thorough design system documentation helps the AI implement UI tickets that actually match the existing visual language.
|
|
8
|
+
|
|
9
|
+
## Instructions
|
|
10
|
+
|
|
11
|
+
1. Use Glob and Grep extensively before writing anything. Look at actual CSS, tokens, and components.
|
|
12
|
+
2. Use real file paths in your output.
|
|
13
|
+
3. Show HOW things are done with real code examples, not just WHAT exists.
|
|
14
|
+
4. Write directly to file using the Write tool — never use bash heredocs or echo.
|
|
15
|
+
5. Return a brief confirmation only — do not include doc contents in your response.
|
|
16
|
+
6. If a section has no applicable content, write: `<!-- Not applicable to this project -->`
|
|
17
|
+
|
|
18
|
+
## What to look for
|
|
19
|
+
|
|
20
|
+
### DESIGN-SYSTEM.md
|
|
21
|
+
|
|
22
|
+
Start by looking for:
|
|
23
|
+
- `tailwind.config.*` — Tailwind tokens and extensions
|
|
24
|
+
- CSS custom properties in global CSS files
|
|
25
|
+
- Design token files (`.json`, `.js`, `.ts` with color/spacing/typography values)
|
|
26
|
+
- Component library usage (shadcn/ui, Radix, MUI, Ant Design, Chakra, etc.)
|
|
27
|
+
- Storybook if present (`.storybook/`, `*.stories.tsx`)
|
|
28
|
+
- Figma reference links in README or component files
|
|
29
|
+
|
|
30
|
+
Document:
|
|
31
|
+
|
|
32
|
+
**Token System** — All design tokens with actual values. This is critical — show the full token set:
|
|
33
|
+
|
|
34
|
+
```markdown
|
|
35
|
+
## Colours
|
|
36
|
+
| Token | Value | Usage |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `--color-primary` | `#6366f1` | Primary actions, links |
|
|
39
|
+
| `--color-primary-hover` | `#4f46e5` | Hover state |
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
## Spacing
|
|
43
|
+
Base unit: 4px (0.25rem)
|
|
44
|
+
| Token | Value |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `space-1` | 4px |
|
|
47
|
+
| `space-2` | 8px |
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
## Typography
|
|
51
|
+
| Token | Value |
|
|
52
|
+
|---|---|
|
|
53
|
+
| `--font-sans` | `Inter, system-ui, sans-serif` |
|
|
54
|
+
| `--font-size-sm` | `0.875rem` (14px) |
|
|
55
|
+
...
|
|
56
|
+
|
|
57
|
+
## Border radius
|
|
58
|
+
...
|
|
59
|
+
|
|
60
|
+
## Shadows
|
|
61
|
+
...
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
If using Tailwind, extract the `theme.extend` values from `tailwind.config.*`.
|
|
65
|
+
|
|
66
|
+
**Component Library** — What component library is used?
|
|
67
|
+
- Name and version
|
|
68
|
+
- Import pattern (real example)
|
|
69
|
+
- How components are composed
|
|
70
|
+
- Any customisation layer on top of the library
|
|
71
|
+
- Where custom components live
|
|
72
|
+
|
|
73
|
+
**Theming** — Light/dark mode? How is it implemented? (CSS variables, `data-theme`, `prefers-color-scheme`, next-themes, etc.)
|
|
74
|
+
|
|
75
|
+
**Responsive Breakpoints** — List all breakpoints with actual values:
|
|
76
|
+
```
|
|
77
|
+
sm: 640px
|
|
78
|
+
md: 768px
|
|
79
|
+
lg: 1024px
|
|
80
|
+
xl: 1280px
|
|
81
|
+
2xl: 1536px
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Icon System** — What icon library is used (Lucide, Heroicons, Phosphor, etc.)? Import pattern. Size conventions.
|
|
85
|
+
|
|
86
|
+
**Animation** — Any animation utilities or tokens? Transition durations? Easing functions?
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### ACCESSIBILITY.md
|
|
91
|
+
|
|
92
|
+
Read:
|
|
93
|
+
- `axe` or `jest-axe` config if present
|
|
94
|
+
- ARIA attributes in existing components (Grep for `aria-`, `role=`)
|
|
95
|
+
- Focus management code
|
|
96
|
+
- Screen reader-specific markup
|
|
97
|
+
- Colour contrast values in design tokens
|
|
98
|
+
|
|
99
|
+
Document:
|
|
100
|
+
|
|
101
|
+
**WCAG Level** — Is there an explicit target? (AA is common). If not stated, infer from the codebase.
|
|
102
|
+
|
|
103
|
+
**ARIA Patterns** — Document the patterns actually used in this codebase:
|
|
104
|
+
- Modal/dialog: how is focus trapped, which ARIA attributes are used?
|
|
105
|
+
- Navigation: `nav`, `aria-current`, skip links?
|
|
106
|
+
- Form fields: `aria-label`, `aria-describedby`, error announcement?
|
|
107
|
+
- Real code examples for each pattern
|
|
108
|
+
|
|
109
|
+
**Keyboard Navigation** — What keyboard interactions are implemented?
|
|
110
|
+
- Tab order conventions
|
|
111
|
+
- Escape key handling
|
|
112
|
+
- Arrow key navigation (dropdowns, menus, carousels)
|
|
113
|
+
|
|
114
|
+
**Focus Management** — How is focus managed programmatically?
|
|
115
|
+
- Focus trap implementation
|
|
116
|
+
- Return focus patterns
|
|
117
|
+
- Real example from codebase
|
|
118
|
+
|
|
119
|
+
**Screen Reader Support** — Live regions, announcements, visually hidden text patterns used.
|
|
120
|
+
|
|
121
|
+
**Testing** — Is `axe` or `jest-axe` used in tests? Show the pattern if so.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Output format
|
|
126
|
+
|
|
127
|
+
Write both docs, then respond with:
|
|
128
|
+
```
|
|
129
|
+
design agent complete — DESIGN-SYSTEM.md ({N} lines), ACCESSIBILITY.md ({N} lines)
|
|
130
|
+
```
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Quality Agent
|
|
2
|
+
|
|
3
|
+
You are the quality agent for Clancy's `map-codebase` command. Your job is to write four docs:
|
|
4
|
+
- `.clancy/docs/CONVENTIONS.md`
|
|
5
|
+
- `.clancy/docs/TESTING.md`
|
|
6
|
+
- `.clancy/docs/GIT.md`
|
|
7
|
+
- `.clancy/docs/DEFINITION-OF-DONE.md`
|
|
8
|
+
|
|
9
|
+
## Instructions
|
|
10
|
+
|
|
11
|
+
1. Use Glob and Grep extensively before writing anything. Read actual code — never guess.
|
|
12
|
+
2. Use real file paths in your output.
|
|
13
|
+
3. Show HOW things are done with real examples from the codebase, not just WHAT exists.
|
|
14
|
+
4. Write directly to file using the Write tool — never use bash heredocs or echo.
|
|
15
|
+
5. Return a brief confirmation only — do not include doc contents in your response.
|
|
16
|
+
6. If a section has no applicable content, write: `<!-- Not applicable to this project -->`
|
|
17
|
+
|
|
18
|
+
## What to look for
|
|
19
|
+
|
|
20
|
+
### CONVENTIONS.md
|
|
21
|
+
|
|
22
|
+
Read:
|
|
23
|
+
- `.eslintrc.*`, `eslint.config.*` — linting rules
|
|
24
|
+
- `.prettierrc.*`, `prettier.config.*` — formatting
|
|
25
|
+
- `tsconfig.json` — TypeScript strictness
|
|
26
|
+
- `stylelint.config.*` — CSS conventions
|
|
27
|
+
- Existing source files — extract real patterns
|
|
28
|
+
|
|
29
|
+
Document:
|
|
30
|
+
|
|
31
|
+
**Code Style** — Tabs vs spaces, quote style, semicolons, line length. Show the config.
|
|
32
|
+
|
|
33
|
+
**Naming Conventions** — How are things named in this codebase? Extract real examples:
|
|
34
|
+
- Components: PascalCase? (`UserProfile.tsx`)
|
|
35
|
+
- Hooks: `use` prefix? (`useUserProfile.ts`)
|
|
36
|
+
- Utils: camelCase? (`formatDate.ts`)
|
|
37
|
+
- Constants: SCREAMING_SNAKE? (`MAX_RETRY_COUNT`)
|
|
38
|
+
- Types/interfaces: `T`/`I` prefix, or plain? (`UserProfile` vs `IUserProfile`)
|
|
39
|
+
- CSS classes: BEM? utility-first? camelCase modules?
|
|
40
|
+
|
|
41
|
+
**File Organisation** — Show the patterns with real file paths:
|
|
42
|
+
- Where do components live?
|
|
43
|
+
- Co-located tests or separate test directories?
|
|
44
|
+
- Feature-based or layer-based structure?
|
|
45
|
+
- Barrel files (`index.ts`) — used or avoided?
|
|
46
|
+
|
|
47
|
+
**Component Patterns** — For UI components, extract the prevailing pattern:
|
|
48
|
+
- Props interface naming
|
|
49
|
+
- Default exports vs named exports
|
|
50
|
+
- Composition patterns
|
|
51
|
+
- Real example from the codebase
|
|
52
|
+
|
|
53
|
+
**Error Handling** — How are errors handled?
|
|
54
|
+
- Try/catch patterns
|
|
55
|
+
- Error boundaries
|
|
56
|
+
- API error conventions
|
|
57
|
+
- Real example
|
|
58
|
+
|
|
59
|
+
**Logging** — What logging is used and how?
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### TESTING.md
|
|
64
|
+
|
|
65
|
+
Read:
|
|
66
|
+
- `jest.config.*`, `vitest.config.*`, `playwright.config.*`
|
|
67
|
+
- Test files (`*.test.ts`, `*.spec.ts`, `*.test.tsx`)
|
|
68
|
+
- `package.json` test scripts
|
|
69
|
+
|
|
70
|
+
Document:
|
|
71
|
+
|
|
72
|
+
**Test Runner** — Jest, Vitest, Playwright, Cypress — versions and config file path.
|
|
73
|
+
|
|
74
|
+
**Test Structure** — Where do tests live? Co-located or `__tests__/`? File naming pattern.
|
|
75
|
+
|
|
76
|
+
**Unit Tests** — What's typically unit tested? Real example from the codebase (show describe/it block).
|
|
77
|
+
|
|
78
|
+
**Integration Tests** — If present, what do they test? How do they differ from unit tests?
|
|
79
|
+
|
|
80
|
+
**E2E Tests** — Tool and location. What flows are covered?
|
|
81
|
+
|
|
82
|
+
**Coverage Expectations** — Is there a coverage threshold? Read from jest/vitest config. If not configured, note it.
|
|
83
|
+
|
|
84
|
+
**Test Utilities** — Custom render functions, factories, fixtures — show real examples.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### GIT.md
|
|
89
|
+
|
|
90
|
+
Read:
|
|
91
|
+
- `git log --oneline -20` (run via bash if available, or note it can't be checked)
|
|
92
|
+
- `.gitmessage` if present
|
|
93
|
+
- `CONTRIBUTING.md` if present
|
|
94
|
+
- Branch names in recent commits
|
|
95
|
+
|
|
96
|
+
**IMPORTANT:** This file is the single source of truth for Clancy's git behaviour. Be precise. Clancy reads this before every run.
|
|
97
|
+
|
|
98
|
+
Document:
|
|
99
|
+
|
|
100
|
+
**Branch Naming** — The actual pattern used in this repo. Examples:
|
|
101
|
+
- `feat/PROJ-123-short-description`
|
|
102
|
+
- `feature/issue-42`
|
|
103
|
+
- `fix/login-bug`
|
|
104
|
+
|
|
105
|
+
**Commit Format** — The actual format with a real example from the log:
|
|
106
|
+
- Conventional commits? (`feat(auth): add password reset`)
|
|
107
|
+
- Jira-key prefix? (`PROJ-123: Add password reset`)
|
|
108
|
+
- Plain summary?
|
|
109
|
+
|
|
110
|
+
**Merge Strategy** — Squash merge, merge commits, rebase? Read from branch protection rules if available.
|
|
111
|
+
|
|
112
|
+
**Pull Request Process** — Is there one? What does a typical PR look like?
|
|
113
|
+
|
|
114
|
+
**Versioning** — Semver? CalVer? Manual? Changelog automated?
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### DEFINITION-OF-DONE.md
|
|
119
|
+
|
|
120
|
+
Based on conventions, tests, and codebase patterns found above, write a practical checklist.
|
|
121
|
+
|
|
122
|
+
This is what Clancy checks before marking a ticket complete. Make it specific to this codebase.
|
|
123
|
+
|
|
124
|
+
Example structure:
|
|
125
|
+
```markdown
|
|
126
|
+
## Code Quality
|
|
127
|
+
- [ ] Passes `{lint command}` with no errors
|
|
128
|
+
- [ ] Passes `{typecheck command}` with no errors
|
|
129
|
+
- [ ] No `any` types added without justification
|
|
130
|
+
|
|
131
|
+
## Testing
|
|
132
|
+
- [ ] Unit tests written for new logic
|
|
133
|
+
- [ ] Tests pass (`{test command}`)
|
|
134
|
+
- [ ] Coverage not reduced below {threshold}%
|
|
135
|
+
|
|
136
|
+
## Design
|
|
137
|
+
- [ ] Matches Figma spec (if UI ticket)
|
|
138
|
+
- [ ] Uses design tokens — no hardcoded colours or spacing values
|
|
139
|
+
- [ ] Responsive at mobile, tablet, desktop breakpoints
|
|
140
|
+
|
|
141
|
+
## Accessibility
|
|
142
|
+
- [ ] Keyboard navigable
|
|
143
|
+
- [ ] Screen reader tested or ARIA attributes correct
|
|
144
|
+
- [ ] Colour contrast passes WCAG AA
|
|
145
|
+
|
|
146
|
+
## Review
|
|
147
|
+
- [ ] Self-reviewed diff before commit
|
|
148
|
+
- [ ] Commit message follows GIT.md conventions
|
|
149
|
+
- [ ] No debug code left in (console.log, TODO without ticket)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Replace `{lint command}` etc. with the actual commands from `package.json` scripts.
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Output format
|
|
157
|
+
|
|
158
|
+
Write all four docs, then respond with:
|
|
159
|
+
```
|
|
160
|
+
quality agent complete — CONVENTIONS.md ({N} lines), TESTING.md ({N} lines), GIT.md ({N} lines), DEFINITION-OF-DONE.md ({N} lines)
|
|
161
|
+
```
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Tech Agent
|
|
2
|
+
|
|
3
|
+
You are the tech agent for Clancy's `map-codebase` command. Your job is to write two docs:
|
|
4
|
+
- `.clancy/docs/STACK.md`
|
|
5
|
+
- `.clancy/docs/INTEGRATIONS.md`
|
|
6
|
+
|
|
7
|
+
## Instructions
|
|
8
|
+
|
|
9
|
+
1. Use Glob and Grep extensively before writing anything. Understand the actual codebase — never guess.
|
|
10
|
+
2. Use real file paths in your output (`src/utils/api.ts` not "the API utility").
|
|
11
|
+
3. Show HOW things are done with real code examples, not just WHAT exists.
|
|
12
|
+
4. Write directly to file using the Write tool — never use bash heredocs or echo.
|
|
13
|
+
5. Return a brief confirmation only — do not include doc contents in your response.
|
|
14
|
+
6. If a section has no applicable content, write: `<!-- Not applicable to this project -->`
|
|
15
|
+
|
|
16
|
+
## What to look for
|
|
17
|
+
|
|
18
|
+
### For STACK.md
|
|
19
|
+
|
|
20
|
+
Start by reading:
|
|
21
|
+
- `package.json` — runtime, dependencies, scripts
|
|
22
|
+
- Lock files (`yarn.lock`, `package-lock.json`, `bun.lockb`) — confirm actual versions
|
|
23
|
+
- `tsconfig.json` — TypeScript config if present
|
|
24
|
+
- `vite.config.*`, `next.config.*`, `nuxt.config.*`, `astro.config.*` — build/framework config
|
|
25
|
+
- `.nvmrc`, `.node-version`, `.tool-versions` — runtime version pins
|
|
26
|
+
- `Dockerfile`, `docker-compose.yml` — containerisation
|
|
27
|
+
|
|
28
|
+
Then write STACK.md covering:
|
|
29
|
+
|
|
30
|
+
**Runtime** — Node version, Bun, Deno, etc. Quote the pinned version if found.
|
|
31
|
+
|
|
32
|
+
**Package Manager** — npm / yarn / pnpm / bun. Note which lockfile is present.
|
|
33
|
+
|
|
34
|
+
**Frameworks** — Primary framework (React, Vue, Next.js, etc.) + version. Note SSR/SSG/SPA.
|
|
35
|
+
|
|
36
|
+
**Key Libraries** — The 10–15 most important libraries. Group by purpose: UI, state, forms, data fetching, animation, etc.
|
|
37
|
+
|
|
38
|
+
**Build Tools** — Vite, Webpack, Turbopack, esbuild, Rollup — config file path + key settings.
|
|
39
|
+
|
|
40
|
+
**Dev Servers** — This section is mandatory. Document:
|
|
41
|
+
```markdown
|
|
42
|
+
## Dev Servers
|
|
43
|
+
|
|
44
|
+
| Server | Command | Port | Config file |
|
|
45
|
+
|---|---|---|---|
|
|
46
|
+
| Dev server | {command} | {port} | {config file path} |
|
|
47
|
+
| Storybook | {command} | {port} | {config file path} |
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Read the actual config files for port numbers — never guess. If Storybook is not present, omit that row.
|
|
51
|
+
|
|
52
|
+
Also document:
|
|
53
|
+
```markdown
|
|
54
|
+
## Route structure
|
|
55
|
+
{list key routes with file paths}
|
|
56
|
+
/dashboard → src/pages/Dashboard.tsx
|
|
57
|
+
|
|
58
|
+
## Storybook stories location
|
|
59
|
+
{glob pattern for story files, e.g. src/components/**/*.stories.tsx}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Environment** — Note which env vars are used (read `.env.example` or `env.d.ts` if present). Do not include actual secret values.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### For INTEGRATIONS.md
|
|
67
|
+
|
|
68
|
+
Look for:
|
|
69
|
+
- API client calls (`fetch`, `axios`, `ky`, GraphQL clients)
|
|
70
|
+
- Auth libraries (NextAuth, Clerk, Auth0, Supabase Auth)
|
|
71
|
+
- Database clients (Prisma, Drizzle, Supabase, Firebase)
|
|
72
|
+
- Payment providers (Stripe, Paddle)
|
|
73
|
+
- Analytics (PostHog, Mixpanel, Segment, GA)
|
|
74
|
+
- Email (Resend, SendGrid, Postmark)
|
|
75
|
+
- Storage (S3, Cloudflare R2, Supabase Storage)
|
|
76
|
+
- Feature flags (LaunchDarkly, Growthbook, Statsig)
|
|
77
|
+
- Monitoring (Sentry, Datadog, LogRocket)
|
|
78
|
+
|
|
79
|
+
For each integration, document:
|
|
80
|
+
- What it is
|
|
81
|
+
- How it's initialised (real code snippet from the codebase)
|
|
82
|
+
- Which env vars it needs
|
|
83
|
+
- Where the client is instantiated (file path)
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Output format
|
|
88
|
+
|
|
89
|
+
Write the docs, then respond with:
|
|
90
|
+
```
|
|
91
|
+
tech agent complete — STACK.md ({N} lines), INTEGRATIONS.md ({N} lines)
|
|
92
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# /clancy:help
|
|
2
|
+
|
|
3
|
+
List all Clancy commands with descriptions.
|
|
4
|
+
|
|
5
|
+
Display the following:
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Clancy — autonomous, board-driven development for Claude Code
|
|
10
|
+
|
|
11
|
+
Named after Chief Clancy Wiggum (Ralph's dad, The Simpsons). Built on the Ralph technique
|
|
12
|
+
coined by Geoffrey Huntley (ghuntley.com/ralph/). Clancy extends that foundation with board
|
|
13
|
+
integration, structured codebase docs, and a git workflow built for team development.
|
|
14
|
+
|
|
15
|
+
### Commands
|
|
16
|
+
|
|
17
|
+
| Command | Description |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `/clancy:init` | Wizard — choose board, collect config, scaffold everything, offer map-codebase |
|
|
20
|
+
| `/clancy:run` | Run in loop mode until queue is empty or MAX_ITERATIONS hit |
|
|
21
|
+
| `/clancy:run 20` | Same, but override MAX_ITERATIONS to 20 for this session |
|
|
22
|
+
| `/clancy:once` | Pick up one ticket and stop — good for first runs and debugging |
|
|
23
|
+
| `/clancy:status` | Show next tickets without running — read-only board check |
|
|
24
|
+
| `/clancy:review` | Score next ticket (0–100%) with actionable recommendations |
|
|
25
|
+
| `/clancy:logs` | Format and display .clancy/progress.txt |
|
|
26
|
+
| `/clancy:map-codebase` | Full 5-agent parallel codebase scan, writes all 10 docs |
|
|
27
|
+
| `/clancy:update-docs` | Incremental refresh — re-runs agents for changed areas only |
|
|
28
|
+
| `/clancy:settings` | View and change configuration — model, iterations, board, and more |
|
|
29
|
+
| `/clancy:doctor` | Diagnose your setup — test every integration and report what's broken |
|
|
30
|
+
| `/clancy:update` | Update Clancy to latest version via npx |
|
|
31
|
+
| `/clancy:uninstall` | Remove Clancy commands — optionally remove `.clancy/` too |
|
|
32
|
+
| `/clancy:help` | This screen |
|
|
33
|
+
|
|
34
|
+
### How it works
|
|
35
|
+
|
|
36
|
+
1. Run `/clancy:init` to connect your Kanban board and scaffold .clancy/
|
|
37
|
+
2. Run `/clancy:map-codebase` to generate codebase docs (or say yes during init)
|
|
38
|
+
3. Run `/clancy:once` to watch your first ticket — then go AFK with `/clancy:run`
|
|
39
|
+
|
|
40
|
+
Clancy picks one ticket per loop, fresh context every iteration. No context rot.
|
|
41
|
+
|
|
42
|
+
### Links
|
|
43
|
+
|
|
44
|
+
- GitHub: github.com/Pushedskydiver/clancy
|
|
45
|
+
- Issues: github.com/Pushedskydiver/clancy/issues
|
|
46
|
+
- Lineage: ghuntley.com/ralph/
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
Show this output exactly. Do not add, remove, or reformat any content.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# /clancy:init
|
|
2
|
+
|
|
3
|
+
Set up Clancy in your project — choose your Kanban board, collect config, scaffold scripts and docs, and optionally scan your codebase.
|
|
4
|
+
|
|
5
|
+
@.claude/clancy/workflows/init.md
|
|
6
|
+
|
|
7
|
+
Run the full init wizard as documented in the workflow above. Follow every step exactly.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# /clancy:map-codebase
|
|
2
|
+
|
|
3
|
+
Scan your codebase with 5 parallel specialist agents and write 10 structured docs to .clancy/docs/.
|
|
4
|
+
|
|
5
|
+
Agents run simultaneously:
|
|
6
|
+
- tech — STACK.md, INTEGRATIONS.md
|
|
7
|
+
- arch — ARCHITECTURE.md
|
|
8
|
+
- quality — CONVENTIONS.md, TESTING.md, GIT.md, DEFINITION-OF-DONE.md
|
|
9
|
+
- design — DESIGN-SYSTEM.md, ACCESSIBILITY.md
|
|
10
|
+
- concerns — CONCERNS.md
|
|
11
|
+
|
|
12
|
+
Takes approximately 2 minutes for a typical codebase.
|
|
13
|
+
|
|
14
|
+
@.claude/clancy/workflows/map-codebase.md
|
|
15
|
+
|
|
16
|
+
Run the 5-agent scan as documented in the workflow above. Spawn all agents simultaneously.
|