Skip to content

Commit 985a2f2

Browse files
korallisclaude
andcommitted
feat: add standards compliance and package manager detection to workflow commands
## Standards Compliance - All workflow commands now read ALL standards from droidz/standards/**/*.md - Added Step 0: Load Standards to /shape-spec, /write-spec, /create-tasks - Completed missing workflow instructions in /orchestrate-tasks - Completed 2-shape-spec.md and 2-create-tasks-list.md subagent files ## Package Manager Detection - Commands now detect package manager from lockfiles (bun, pnpm, yarn, npm) - Added detection to /create-tasks, /orchestrate-tasks, /implement-tasks - Updated implementation-verifier to use detected package manager - Updated CI/CD pipeline skill with package manager mapping table ## Files Updated - 18 files across claude and droid_cli payloads - install.sh version bumped to 4.11.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b7c9e74 commit 985a2f2

File tree

19 files changed

+611
-35
lines changed

19 files changed

+611
-35
lines changed

droidz_installer/payloads/claude/default/agents/implementation-verifier.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@ For each task:
3838

3939
### Step 3: Run All Tests
4040

41-
Execute comprehensive test suite:
42-
```bash
43-
# Unit tests
44-
npm test
45-
46-
# Integration tests
47-
npm run test:integration
48-
49-
# E2E tests
50-
npm run test:e2e
51-
52-
# Type checking
53-
npm run type-check
54-
55-
# Linting
56-
npm run lint
57-
```
41+
**First, detect the project's package manager** by checking for lockfiles:
42+
- `bun.lockb` → Use **bun**
43+
- `pnpm-lock.yaml` → Use **pnpm**
44+
- `yarn.lock` → Use **yarn**
45+
- `package-lock.json` → Use **npm**
46+
47+
Execute comprehensive test suite using the **detected package manager**:
48+
49+
| Test Type | npm | yarn | pnpm | bun |
50+
|-----------|-----|------|------|-----|
51+
| Unit tests | `npm test` | `yarn test` | `pnpm test` | `bun test` |
52+
| Integration | `npm run test:integration` | `yarn test:integration` | `pnpm test:integration` | `bun run test:integration` |
53+
| E2E tests | `npm run test:e2e` | `yarn test:e2e` | `pnpm test:e2e` | `bun run test:e2e` |
54+
| Type check | `npm run type-check` | `yarn type-check` | `pnpm type-check` | `bun run type-check` |
55+
| Linting | `npm run lint` | `yarn lint` | `pnpm lint` | `bun run lint` |
56+
57+
**Note**: Only run tests that are available in the project's `package.json` scripts.
5858

5959
### Step 4: Create Verification Report
6060

droidz_installer/payloads/claude/default/commands/2-create-tasks-list.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,24 @@ NEXT STEP 👉 Run `/implement-tasks` (simple, effective) or `/orchestrate-tasks
1616

1717
IMPORTANT: Ensure that the tasks list is ALIGNED and DOES NOT CONFLICT with the user's preferences and standards as detailed in the following files:
1818

19+
### Standards Loading Instructions
20+
21+
Before creating the tasks list, check for and load project standards:
22+
23+
1. **Check if standards exist**: Look for `droidz/standards/` directory
24+
2. **If standards exist**, **read ALL standards files recursively**:
25+
- Use glob pattern `droidz/standards/**/*.md` to find all markdown files
26+
- This includes all subdirectories (global, frontend, backend, infrastructure, and any custom directories the user has created)
27+
- Read every `.md` file found in the standards directory tree
28+
29+
3. **Apply ALL loaded standards to task creation** by ensuring:
30+
- Tasks follow documented coding principles and patterns
31+
- Task groupings align with documented architectural boundaries
32+
- Sub-tasks include necessary standards compliance (e.g., testing requirements)
33+
- Tasks don't propose approaches that conflict with established conventions
34+
- Error handling, security, and other concerns from standards are reflected in relevant tasks
35+
36+
If no standards directory exists, proceed normally but note to the user:
37+
```
38+
ℹ️ No project standards found. Consider running /shape-standards to establish conventions.
39+
```

droidz_installer/payloads/claude/default/commands/2-shape-spec.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,23 @@ Spec initialized successfully!
2828

2929
IMPORTANT: Ensure that your research questions and insights are ALIGNED and DOES NOT CONFLICT with the user's preferences and standards as detailed in the following files:
3030

31+
### Standards Loading Instructions
32+
33+
Before proceeding, check for and load project standards:
34+
35+
1. **Check if standards exist**: Look for `droidz/standards/` directory
36+
2. **If standards exist**, **read ALL standards files recursively**:
37+
- Use glob pattern `droidz/standards/**/*.md` to find all markdown files
38+
- This includes all subdirectories (global, frontend, backend, infrastructure, and any custom directories the user has created)
39+
- Read every `.md` file found in the standards directory tree
40+
41+
3. **Apply ALL loaded standards to your research** by ensuring:
42+
- Questions align with established architectural patterns
43+
- Proposed approaches don't conflict with documented conventions
44+
- Requirements gathering considers existing coding principles
45+
- Design decisions follow documented best practices
46+
47+
If no standards directory exists, proceed normally but note to the user:
48+
```
49+
ℹ️ No project standards found. Consider running /shape-standards to establish conventions.
50+
```

droidz_installer/payloads/claude/default/commands/create-tasks.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,57 @@
22

33
You are creating a tasks breakdown from a given spec and requirements for a new feature.
44

5+
## User Standards & Preferences Compliance
6+
7+
**IMPORTANT**: Before creating tasks, you MUST check for and adhere to the user's project standards.
8+
9+
### Step 0: Load Standards & Detect Project Configuration
10+
11+
#### 0a. Load Standards
12+
13+
Check if standards exist and load them:
14+
15+
1. Check for standards directory: `droidz/standards/`
16+
2. If it exists, **read ALL standards files recursively**:
17+
- Use glob pattern `droidz/standards/**/*.md` to find all markdown files
18+
- This includes all subdirectories (global, frontend, backend, infrastructure, and any custom directories the user has created)
19+
- Read every `.md` file found in the standards directory tree
20+
21+
3. When creating the tasks list, ensure adherence to ALL loaded standards:
22+
- Tasks follow documented coding principles and patterns
23+
- Task groupings align with documented architectural boundaries
24+
- Sub-tasks include necessary standards compliance (e.g., testing requirements)
25+
- Tasks don't propose approaches that conflict with established conventions
26+
27+
If no standards directory exists, proceed without standards constraints but inform the user:
28+
```
29+
ℹ️ No project standards found at droidz/standards/
30+
Consider running /shape-standards to establish project conventions.
31+
```
32+
33+
#### 0b. Detect Package Manager
34+
35+
**IMPORTANT**: Detect the project's package manager by checking for lockfiles. Use the detected package manager for ALL tasks involving package installation, script running, or dependency management.
36+
37+
**Detection Order** (first match wins):
38+
1. `bun.lockb` → Use **bun** (`bun install`, `bun run`, `bunx`)
39+
2. `pnpm-lock.yaml` → Use **pnpm** (`pnpm install`, `pnpm run`, `pnpm dlx`)
40+
3. `yarn.lock` → Use **yarn** (`yarn install`, `yarn run`, `yarn dlx`)
41+
4. `package-lock.json` → Use **npm** (`npm install`, `npm run`, `npx`)
42+
5. No lockfile found → Default to **npm** but note in tasks that the user should verify their preferred package manager
43+
44+
**Command Mapping**:
45+
| Action | npm | yarn | pnpm | bun |
46+
|--------|-----|------|------|-----|
47+
| Install deps | `npm install` | `yarn install` | `pnpm install` | `bun install` |
48+
| Add package | `npm install <pkg>` | `yarn add <pkg>` | `pnpm add <pkg>` | `bun add <pkg>` |
49+
| Run script | `npm run <script>` | `yarn <script>` | `pnpm <script>` | `bun run <script>` |
50+
| Execute bin | `npx <cmd>` | `yarn dlx <cmd>` | `pnpm dlx <cmd>` | `bunx <cmd>` |
51+
52+
When creating tasks, **always use the detected package manager commands** instead of hardcoding npm/npx.
53+
54+
---
55+
556
## PHASE 1: Get and read the spec.md and/or requirements document(s)
657

758
You will need ONE OR BOTH of these files to inform your tasks breakdown:

droidz_installer/payloads/claude/default/commands/implement-tasks.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,35 @@ PHASE 3: After ALL task groups have been implemented, delegate to implementation
88

99
Follow each of these phases and their individual workflows IN SEQUENCE:
1010

11+
## Pre-Requisite: Detect Project Configuration
12+
13+
### Detect Package Manager
14+
15+
**IMPORTANT**: Before implementing any tasks, detect the project's package manager by checking for lockfiles. Use the detected package manager for ALL implementation commands.
16+
17+
**Detection Order** (first match wins):
18+
1. `bun.lockb` → Use **bun** (`bun install`, `bun run`, `bunx`)
19+
2. `pnpm-lock.yaml` → Use **pnpm** (`pnpm install`, `pnpm run`, `pnpm dlx`)
20+
3. `yarn.lock` → Use **yarn** (`yarn install`, `yarn run`, `yarn dlx`)
21+
4. `package-lock.json` → Use **npm** (`npm install`, `npm run`, `npx`)
22+
5. No lockfile found → Default to **npm** but note that the user should verify their preferred package manager
23+
24+
**Command Mapping**:
25+
| Action | npm | yarn | pnpm | bun |
26+
|--------|-----|------|------|-----|
27+
| Install deps | `npm install` | `yarn install` | `pnpm install` | `bun install` |
28+
| Add package | `npm install <pkg>` | `yarn add <pkg>` | `pnpm add <pkg>` | `bun add <pkg>` |
29+
| Run script | `npm run <script>` | `yarn <script>` | `pnpm <script>` | `bun run <script>` |
30+
| Execute bin | `npx <cmd>` | `yarn dlx <cmd>` | `pnpm dlx <cmd>` | `bunx <cmd>` |
31+
32+
Store the detected package manager and use it when:
33+
- Running tests, builds, or dev servers
34+
- Installing new dependencies
35+
- Executing CLI tools
36+
- Generating any bash scripts
37+
38+
---
39+
1140
## Multi-Phase Process
1241

1342
### PHASE 1: Determine which task group(s) to implement

droidz_installer/payloads/claude/default/commands/orchestrate-tasks.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@ Now that we have a spec and tasks list ready for implementation, we will proceed
44

55
Follow each of these phases and their individual workflows IN SEQUENCE:
66

7+
## Pre-Requisite: Detect Project Configuration
8+
9+
### Detect Package Manager
10+
11+
**IMPORTANT**: Before orchestrating any tasks, detect the project's package manager by checking for lockfiles. Use the detected package manager for ALL implementation prompts and commands.
12+
13+
**Detection Order** (first match wins):
14+
1. `bun.lockb` → Use **bun** (`bun install`, `bun run`, `bunx`)
15+
2. `pnpm-lock.yaml` → Use **pnpm** (`pnpm install`, `pnpm run`, `pnpm dlx`)
16+
3. `yarn.lock` → Use **yarn** (`yarn install`, `yarn run`, `yarn dlx`)
17+
4. `package-lock.json` → Use **npm** (`npm install`, `npm run`, `npx`)
18+
5. No lockfile found → Default to **npm** but note that the user should verify their preferred package manager
19+
20+
**Command Mapping**:
21+
| Action | npm | yarn | pnpm | bun |
22+
|--------|-----|------|------|-----|
23+
| Install deps | `npm install` | `yarn install` | `pnpm install` | `bun install` |
24+
| Add package | `npm install <pkg>` | `yarn add <pkg>` | `pnpm add <pkg>` | `bun add <pkg>` |
25+
| Run script | `npm run <script>` | `yarn <script>` | `pnpm <script>` | `bun run <script>` |
26+
| Execute bin | `npx <cmd>` | `yarn dlx <cmd>` | `pnpm dlx <cmd>` | `bunx <cmd>` |
27+
28+
Store the detected package manager and use it when:
29+
- Generating implementation prompts
30+
- Writing orchestration.yml
31+
- Creating any bash scripts or commands for specialists
32+
33+
---
34+
735
## Multi-Phase Process
836

937
### FIRST: Get tasks.md for this spec
@@ -149,6 +177,34 @@ For each delegation, provide the specialist with:
149177

150178
In addition to the above items, also instruct the specialist to closely adhere to the user's standards & preferences as specified in the following files. To build the list of file references to give to the specialist, follow these instructions:
151179

180+
#### Building the Standards File List for a Task Group
181+
182+
For each task group, look up its `standards` entry in `orchestration.yml` and resolve it to actual file paths:
183+
184+
1. **If `standards` contains "all"**:
185+
- Include all files from `droidz/standards/global/*.md`
186+
- Include all files from `droidz/standards/frontend/*.md`
187+
- Include all files from `droidz/standards/backend/*.md`
188+
- Include all files from `droidz/standards/infrastructure/*.md`
189+
190+
2. **If `standards` contains a wildcard pattern** (e.g., "global/*", "frontend/*"):
191+
- Include all `.md` files from `droidz/standards/[pattern]/`
192+
- Example: "backend/*" → all files in `droidz/standards/backend/`
193+
194+
3. **If `standards` contains a specific file path** (e.g., "frontend/components.md"):
195+
- Include that specific file: `droidz/standards/[path]`
196+
- Example: "frontend/components.md" → `droidz/standards/frontend/components.md`
197+
198+
4. **If `standards` is missing or contains "none"**:
199+
- Do not include any standards files for this task group
200+
201+
5. **Format the file list** for the specialist as markdown file references:
202+
```
203+
- @droidz/standards/global/coding-principles.md
204+
- @droidz/standards/global/error-handling.md
205+
- @droidz/standards/frontend/components.md
206+
```
207+
152208
Provide all of the above to the specialist when delegating tasks for it to implement.
153209

154210
### NEXT: Generate prompts
@@ -176,6 +232,38 @@ In the content template below, replace "[spec-title]" and "[this-spec]" with the
176232

177233
To replace "[orchestrated-standards]", use the following workflow:
178234

235+
1. **Look up this task group in `orchestration.yml`** to find its `standards` entries
236+
2. **Resolve each standards entry to actual file paths** using the same logic from "Building the Standards File List for a Task Group" above:
237+
- "all" → list all files from all standards subdirectories
238+
- "global/*" → list all files from `droidz/standards/global/`
239+
- "frontend/components.md" → `droidz/standards/frontend/components.md`
240+
- "none" or missing → leave [orchestrated-standards] empty or write "No specific standards assigned."
241+
242+
3. **Format as markdown file references**:
243+
```
244+
- @droidz/standards/global/coding-principles.md
245+
- @droidz/standards/global/error-handling.md
246+
- @droidz/standards/frontend/components.md
247+
```
248+
249+
4. **Replace [orchestrated-standards]** in the prompt template with the formatted list
250+
251+
**Example**: If `orchestration.yml` has:
252+
```yaml
253+
- name: user-dashboard
254+
standards:
255+
- global/*
256+
- frontend/components.md
257+
```
258+
259+
Then [orchestrated-standards] becomes:
260+
```
261+
- @droidz/standards/global/coding-principles.md
262+
- @droidz/standards/global/error-handling.md
263+
- @droidz/standards/global/testing.md
264+
- @droidz/standards/global/security.md
265+
- @droidz/standards/frontend/components.md
266+
```
179267

180268
#### Prompt file content template:
181269

droidz_installer/payloads/claude/default/commands/shape-spec.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22

33
You are helping me shape and plan the scope for a new feature. The following process is aimed at documenting our key decisions regarding scope, design and architecture approach. We will use our findings from this process later when we write the formal spec document (but we are NOT writing the formal spec yet).
44

5+
## User Standards & Preferences Compliance
6+
7+
**IMPORTANT**: Before proceeding with spec shaping, you MUST check for and adhere to the user's project standards.
8+
9+
### Step 0: Load Standards
10+
11+
Check if standards exist and load them:
12+
13+
1. Check for standards directory: `droidz/standards/`
14+
2. If it exists, **read ALL standards files recursively**:
15+
- Use glob pattern `droidz/standards/**/*.md` to find all markdown files
16+
- This includes all subdirectories (global, frontend, backend, infrastructure, and any custom directories the user has created)
17+
- Read every `.md` file found in the standards directory tree
18+
19+
3. Keep ALL standards in mind throughout the spec shaping process to ensure:
20+
- Research questions align with established patterns
21+
- Proposed approaches don't conflict with existing standards
22+
- Architecture decisions follow documented conventions
23+
24+
If no standards directory exists, proceed without standards constraints but inform the user:
25+
```
26+
ℹ️ No project standards found at droidz/standards/
27+
Consider running /shape-standards to establish project conventions.
28+
```
29+
30+
---
31+
532
This process will follow 3 main phases, each with their own workflow steps:
633

734
Process overview (details to follow)

droidz_installer/payloads/claude/default/commands/write-spec.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22

33
You are creating a comprehensive specification for a new feature.
44

5+
## User Standards & Preferences Compliance
6+
7+
**IMPORTANT**: Before writing the spec, you MUST check for and adhere to the user's project standards.
8+
9+
### Step 0: Load Standards
10+
11+
Check if standards exist and load them:
12+
13+
1. Check for standards directory: `droidz/standards/`
14+
2. If it exists, **read ALL standards files recursively**:
15+
- Use glob pattern `droidz/standards/**/*.md` to find all markdown files
16+
- This includes all subdirectories (global, frontend, backend, infrastructure, and any custom directories the user has created)
17+
- Read every `.md` file found in the standards directory tree
18+
19+
3. Ensure the specification document adheres to ALL loaded standards:
20+
- Follows documented coding principles and patterns
21+
- References appropriate standards where relevant
22+
- Does not propose approaches that conflict with established conventions
23+
- Aligns technical decisions with documented best practices
24+
25+
If no standards directory exists, proceed without standards constraints but inform the user:
26+
```
27+
ℹ️ No project standards found at droidz/standards/
28+
Consider running /shape-standards to establish project conventions.
29+
```
30+
31+
---
32+
533
Use the **spec-writer** subagent to create the specification document for this spec:
634

735
Provide the spec-writer with:

droidz_installer/payloads/claude/default/skills/ci-cd-pipeline/SKILL.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@ description: Set up and maintain continuous integration and continuous deploymen
55

66
# CI/CD Pipeline - Automating Build, Test, and Deployment
77

8+
## Package Manager Detection
9+
10+
**IMPORTANT**: Before creating CI/CD configurations, detect the project's package manager by checking for lockfiles and adapt all commands accordingly.
11+
12+
**Detection Order** (first match wins):
13+
1. `bun.lockb` → Use **bun**
14+
2. `pnpm-lock.yaml` → Use **pnpm**
15+
3. `yarn.lock` → Use **yarn**
16+
4. `package-lock.json` → Use **npm**
17+
18+
**Command Mapping** - Adapt examples in this skill to use the detected package manager:
19+
20+
| Action | npm | yarn | pnpm | bun |
21+
|--------|-----|------|------|-----|
22+
| Install (CI) | `npm ci` | `yarn install --frozen-lockfile` | `pnpm install --frozen-lockfile` | `bun install --frozen-lockfile` |
23+
| Run script | `npm run <script>` | `yarn <script>` | `pnpm <script>` | `bun run <script>` |
24+
| Execute bin | `npx <cmd>` | `yarn dlx <cmd>` | `pnpm dlx <cmd>` | `bunx <cmd>` |
25+
| Cache key | `package-lock.json` | `yarn.lock` | `pnpm-lock.yaml` | `bun.lockb` |
26+
| Cache path | `~/.npm` | `~/.yarn/cache` | `~/.pnpm-store` | `~/.bun/install/cache` |
27+
28+
**Note**: The examples below use npm by default. When implementing, replace with the appropriate commands for your detected package manager.
29+
30+
---
31+
832
## When to use this skill
933

1034
- Setting up GitHub Actions or GitLab CI workflows

0 commit comments

Comments
 (0)