dev-workflows 0.3.0 → 0.5.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/README.md +68 -21
- package/dist/bridges/types.d.ts +20 -0
- package/dist/bridges/types.d.ts.map +1 -1
- package/dist/bridges/types.js +5 -1
- package/dist/bridges/types.js.map +1 -1
- package/dist/commands/add.d.ts +26 -0
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +517 -57
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/compile.d.ts +1 -0
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +8 -3
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/doctor.d.ts +3 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +49 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +15 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +51 -17
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +111 -22
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/watch.js +1 -1
- package/dist/commands/watch.js.map +1 -1
- package/dist/core/assets.d.ts +28 -0
- package/dist/core/assets.d.ts.map +1 -0
- package/dist/core/assets.js +169 -0
- package/dist/core/assets.js.map +1 -0
- package/dist/core/converter.d.ts +18 -0
- package/dist/core/converter.d.ts.map +1 -0
- package/dist/core/converter.js +113 -0
- package/dist/core/converter.js.map +1 -0
- package/dist/core/parser.d.ts.map +1 -1
- package/dist/core/parser.js +28 -0
- package/dist/core/parser.js.map +1 -1
- package/dist/core/settings-merge.d.ts +6 -0
- package/dist/core/settings-merge.d.ts.map +1 -0
- package/dist/core/settings-merge.js +41 -0
- package/dist/core/settings-merge.js.map +1 -0
- package/dist/utils/cache.d.ts +10 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +43 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/github.d.ts +13 -0
- package/dist/utils/github.d.ts.map +1 -0
- package/dist/utils/github.js +76 -0
- package/dist/utils/github.js.map +1 -0
- package/package.json +2 -2
- package/content/blocks/nextjs-approuter.yml +0 -37
- package/content/blocks/react-conventions.yml +0 -36
- package/content/blocks/supabase-rls.yml +0 -30
- package/content/blocks/tailwind.yml +0 -28
- package/content/blocks/testing-basics.yml +0 -36
- package/content/blocks/typescript-strict.yml +0 -33
- package/dist/blocks/installer.d.ts +0 -4
- package/dist/blocks/installer.d.ts.map +0 -1
- package/dist/blocks/installer.js +0 -119
- package/dist/blocks/installer.js.map +0 -1
- package/dist/blocks/registry.d.ts +0 -18
- package/dist/blocks/registry.d.ts.map +0 -1
- package/dist/blocks/registry.js +0 -85
- package/dist/blocks/registry.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Define rules once. Compile them everywhere.
|
|
8
8
|
|
|
9
|
-
A local-first CLI to define AI coding rules and
|
|
9
|
+
A local-first CLI to define AI coding rules, slash commands, templates, and hooks — compiled for every editor and agent.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -14,21 +14,33 @@ A local-first CLI to define AI coding rules and compile them for every editor an
|
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
npx dev-workflows init
|
|
17
|
-
devw add
|
|
17
|
+
devw add typescript/strict
|
|
18
18
|
devw compile
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
Or bootstrap a full spec-driven workflow:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
devw init --preset spec-driven -y
|
|
25
|
+
```
|
|
26
|
+
|
|
21
27
|
---
|
|
22
28
|
|
|
23
29
|
## What it does
|
|
24
30
|
|
|
25
31
|
```
|
|
26
32
|
.dwf/rules/*.yml → devw compile → CLAUDE.md
|
|
27
|
-
.cursor/rules
|
|
33
|
+
.cursor/rules/devworkflows.mdc
|
|
28
34
|
GEMINI.md
|
|
35
|
+
.windsurf/rules/devworkflows.md
|
|
36
|
+
.github/copilot-instructions.md
|
|
37
|
+
|
|
38
|
+
.dwf/assets/commands/* → devw compile → .claude/commands/*.md
|
|
39
|
+
.dwf/assets/templates/* → devw compile → docs/specs/*.md
|
|
40
|
+
.dwf/assets/hooks/* → devw compile → .claude/settings.local.json
|
|
29
41
|
```
|
|
30
42
|
|
|
31
|
-
You define rules in YAML. The compiler generates each editor's native format. Change a rule, recompile — every editor stays in sync.
|
|
43
|
+
You define rules in YAML and assets in Markdown/JSON. The compiler generates each editor's native format. Change a rule, recompile — every editor stays in sync.
|
|
32
44
|
|
|
33
45
|
---
|
|
34
46
|
|
|
@@ -37,29 +49,64 @@ You define rules in YAML. The compiler generates each editor's native format. Ch
|
|
|
37
49
|
| Command | Description |
|
|
38
50
|
|---------|-------------|
|
|
39
51
|
| `devw init` | Initialize a `.dwf/` ruleset in your project |
|
|
40
|
-
| `devw
|
|
41
|
-
| `devw
|
|
42
|
-
| `devw
|
|
52
|
+
| `devw init --preset <name>` | Initialize with a preset (e.g., `spec-driven`) |
|
|
53
|
+
| `devw add <category>/<name>` | Install a rule from the registry |
|
|
54
|
+
| `devw add command/<name>` | Install a slash command |
|
|
55
|
+
| `devw add template/<name>` | Install a spec template |
|
|
56
|
+
| `devw add hook/<name>` | Install an editor hook |
|
|
57
|
+
| `devw add preset/<name>` | Install a preset (bundle of rules + assets) |
|
|
58
|
+
| `devw remove <category>/<name>` | Remove a rule or asset |
|
|
59
|
+
| `devw compile` | Generate editor configs and deploy assets |
|
|
43
60
|
| `devw watch` | Watch `.dwf/` and recompile on changes |
|
|
44
|
-
| `devw doctor` | Validate config and detect
|
|
61
|
+
| `devw doctor` | Validate config and detect drift |
|
|
45
62
|
| `devw list rules` | List all active rules |
|
|
46
|
-
| `devw list
|
|
63
|
+
| `devw list assets` | List installed assets |
|
|
47
64
|
| `devw list tools` | List configured editors |
|
|
48
65
|
|
|
49
66
|
---
|
|
50
67
|
|
|
51
|
-
##
|
|
68
|
+
## Rules Registry
|
|
69
|
+
|
|
70
|
+
Install rules from the registry with `devw add <category>/<rule>`.
|
|
71
|
+
|
|
72
|
+
| Rule | Description |
|
|
73
|
+
|------|-------------|
|
|
74
|
+
| `typescript/strict` | Strict TypeScript patterns |
|
|
75
|
+
| `javascript/react` | React component and hook conventions |
|
|
76
|
+
| `javascript/nextjs` | Next.js App Router best practices |
|
|
77
|
+
| `css/tailwind` | Utility-first styling conventions |
|
|
78
|
+
| `testing/vitest` | Test naming and structure rules |
|
|
79
|
+
| `security/supabase-rls` | Database security and RLS rules |
|
|
80
|
+
| `security/auth-patterns` | Authentication best practices |
|
|
81
|
+
| `frontend/design-guidelines` | UI/UX design conventions |
|
|
82
|
+
| `frontend/accessibility` | Accessibility (a11y) rules |
|
|
83
|
+
| `frontend/performance` | Frontend performance patterns |
|
|
84
|
+
| `workflow/git-conventions` | Git commit and branch conventions |
|
|
85
|
+
| `workflow/debugging` | Systematic debugging methodology |
|
|
86
|
+
| `workflow/spec-driven` | Spec-driven development workflow |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Assets
|
|
91
|
+
|
|
92
|
+
Beyond rules, dev-workflows manages **assets** — slash commands, templates, and hooks that power AI workflows.
|
|
93
|
+
|
|
94
|
+
| Asset | Type | Description |
|
|
95
|
+
|-------|------|-------------|
|
|
96
|
+
| `command/spec` | Command | Generate a feature spec through guided questions |
|
|
97
|
+
| `command/plan` | Command | Create an implementation plan from a spec |
|
|
98
|
+
| `command/build` | Command | Execute a plan step by step with verification |
|
|
99
|
+
| `command/learn` | Command | Capture a lesson learned as a project rule |
|
|
100
|
+
| `template/feature-spec` | Template | Markdown template for feature specifications |
|
|
101
|
+
| `hook/auto-format` | Hook | Auto-format files after AI edits |
|
|
102
|
+
|
|
103
|
+
### Presets
|
|
52
104
|
|
|
53
|
-
|
|
105
|
+
Presets bundle rules and assets into a single install.
|
|
54
106
|
|
|
55
|
-
|
|
|
56
|
-
|
|
57
|
-
| `
|
|
58
|
-
| `react-conventions` | Common React component and hook rules |
|
|
59
|
-
| `nextjs-approuter` | Next.js App Router best practices |
|
|
60
|
-
| `tailwind` | Utility-first styling conventions |
|
|
61
|
-
| `supabase-rls` | Database security and RLS rules |
|
|
62
|
-
| `testing-basics` | Test naming and structure rules |
|
|
107
|
+
| Preset | Includes |
|
|
108
|
+
|--------|----------|
|
|
109
|
+
| `preset/spec-driven` | `workflow/spec-driven` rule + all 4 commands + feature-spec template + auto-format hook |
|
|
63
110
|
|
|
64
111
|
---
|
|
65
112
|
|
|
@@ -72,7 +119,7 @@ Bridges generate editor-compatible rule files. One adapter per tool.
|
|
|
72
119
|
| Claude Code | `CLAUDE.md` |
|
|
73
120
|
| Cursor | `.cursor/rules/devworkflows.mdc` |
|
|
74
121
|
| Gemini CLI | `GEMINI.md` |
|
|
75
|
-
| Windsurf | `.
|
|
122
|
+
| Windsurf | `.windsurf/rules/devworkflows.md` |
|
|
76
123
|
| VS Code Copilot | `.github/copilot-instructions.md` |
|
|
77
124
|
|
|
78
125
|
---
|
|
@@ -99,4 +146,4 @@ Issues and PRs welcome. If you find a bug or have an idea, [open an issue](https
|
|
|
99
146
|
|
|
100
147
|
## License
|
|
101
148
|
|
|
102
|
-
MIT
|
|
149
|
+
MIT
|
package/dist/bridges/types.d.ts
CHANGED
|
@@ -6,6 +6,12 @@ export interface Rule {
|
|
|
6
6
|
tags?: string[];
|
|
7
7
|
enabled: boolean;
|
|
8
8
|
sourceBlock?: string;
|
|
9
|
+
source?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PulledEntry {
|
|
12
|
+
path: string;
|
|
13
|
+
version: string;
|
|
14
|
+
pulled_at: string;
|
|
9
15
|
}
|
|
10
16
|
export interface ProjectConfig {
|
|
11
17
|
version: string;
|
|
@@ -16,6 +22,20 @@ export interface ProjectConfig {
|
|
|
16
22
|
tools: string[];
|
|
17
23
|
mode: 'copy' | 'link';
|
|
18
24
|
blocks: string[];
|
|
25
|
+
pulled: PulledEntry[];
|
|
26
|
+
assets: AssetEntry[];
|
|
27
|
+
}
|
|
28
|
+
export declare const ASSET_TYPE: {
|
|
29
|
+
readonly Command: "command";
|
|
30
|
+
readonly Template: "template";
|
|
31
|
+
readonly Hook: "hook";
|
|
32
|
+
};
|
|
33
|
+
export type AssetType = typeof ASSET_TYPE[keyof typeof ASSET_TYPE];
|
|
34
|
+
export interface AssetEntry {
|
|
35
|
+
type: AssetType;
|
|
36
|
+
name: string;
|
|
37
|
+
version: string;
|
|
38
|
+
installed_at: string;
|
|
19
39
|
}
|
|
20
40
|
export interface Bridge {
|
|
21
41
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/bridges/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/bridges/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEnE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpE"}
|
package/dist/bridges/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/bridges/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/bridges/types.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC"}
|
package/dist/commands/add.d.ts
CHANGED
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
import type { Command } from 'commander';
|
|
2
|
+
import { convert } from '../core/converter.js';
|
|
3
|
+
import type { PulledEntry, AssetEntry, AssetType } from '../bridges/types.js';
|
|
4
|
+
export declare const BACK_VALUE = "__back__";
|
|
5
|
+
export declare function pluralRules(count: number): string;
|
|
2
6
|
export interface AddOptions {
|
|
3
7
|
list?: boolean;
|
|
4
8
|
noCompile?: boolean;
|
|
9
|
+
force?: boolean;
|
|
10
|
+
dryRun?: boolean;
|
|
5
11
|
}
|
|
12
|
+
export declare function validateInput(input: string): {
|
|
13
|
+
category: string;
|
|
14
|
+
name: string;
|
|
15
|
+
} | null;
|
|
16
|
+
interface CachedRegistry {
|
|
17
|
+
categories: Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
rules: Array<{
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
}>;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
export declare function fetchRegistry(cwd: string): Promise<CachedRegistry | null>;
|
|
26
|
+
export declare function generateYamlOutput(category: string, name: string, result: ReturnType<typeof convert>, pulledAt: string): string;
|
|
27
|
+
export declare function updateConfig(cwd: string, entry: PulledEntry): Promise<void>;
|
|
28
|
+
export declare function updateConfigAssets(cwd: string, entry: AssetEntry): Promise<void>;
|
|
29
|
+
export declare function downloadAndInstallAsset(cwd: string, type: AssetType, name: string, options: AddOptions): Promise<boolean>;
|
|
30
|
+
export declare function installPreset(cwd: string, presetName: string, options: AddOptions): Promise<boolean>;
|
|
6
31
|
export declare function registerAddCommand(program: Command): void;
|
|
32
|
+
export {};
|
|
7
33
|
//# sourceMappingURL=add.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/comm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