@amiirbazzii/designflow 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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +131 -0
  3. package/dist/main.js +19710 -0
  4. package/package.json +60 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 amiirbazzii
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,131 @@
1
+ # designflow
2
+
3
+ Your AI workforce in the terminal.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g designflow
9
+ ```
10
+
11
+ ## First run
12
+
13
+ The first invocation introduces itself and lays out its application directory:
14
+
15
+ ```
16
+ $ designflow
17
+
18
+ Welcome to DesignFlow.
19
+
20
+ Your AI workforce in the terminal.
21
+
22
+ ──────────────────────────────────────────────
23
+
24
+ Set up ~/.designflow
25
+
26
+ config.json settings you can edit
27
+ history/ your previous runs
28
+ cache/ working space
29
+
30
+ Nothing leaves this machine. There is no account to create.
31
+ ```
32
+
33
+ It then continues straight into the application. Later runs skip the welcome.
34
+
35
+ ## Use
36
+
37
+ ```bash
38
+ designflow # interactive
39
+ designflow list # available AI workers
40
+ designflow run design-engineer # put a worker to work
41
+ designflow history # previous runs
42
+ designflow settings # where things are kept
43
+ designflow --version
44
+ designflow --help
45
+ ```
46
+
47
+ Interactive mode is the main menu:
48
+
49
+ ```
50
+ DesignFlow AI
51
+ ──────────────────────────────────────────────
52
+
53
+ Options:
54
+
55
+ 1. Use an AI Worker
56
+ 2. View History
57
+ 3. Settings
58
+ 4. Exit
59
+ ```
60
+
61
+ Option 1 reads the worker registry, so a worker package you install appears
62
+ without an upgrade. Scriptable too:
63
+
64
+ ```bash
65
+ printf 'homepage.fig\nreact\nbrand/Header, brand/Footer\napprove\n' \
66
+ | designflow run design-engineer
67
+ ```
68
+
69
+ Blank answers take the placeholder, so you can press through the form.
70
+
71
+ ## Configuration
72
+
73
+ `~/.designflow/config.json`, written on first run:
74
+
75
+ ```json
76
+ {
77
+ "version": 1,
78
+ "firstRunCompleted": true,
79
+ "environment": "local",
80
+ "databasePath": "history/runs.json",
81
+ "settings": {}
82
+ }
83
+ ```
84
+
85
+ Edit it by hand — `settings` shows you the path. Three properties hold:
86
+
87
+ - **Safe reading.** A broken file never blocks a run. Values that parse are
88
+ kept field by field, so one bad setting costs one setting.
89
+ - **Safe writing.** Written to a temp file and renamed, so an interrupted write
90
+ leaves the previous config intact.
91
+ - **Migration-friendly.** `version` is an open integer, so a file from a newer
92
+ CLI is read rather than discarded. Additive settings go in `settings`.
93
+
94
+ There is no account, no API key and no endpoint to configure. Set
95
+ `DESIGNFLOW_HOME` to move the whole directory.
96
+
97
+ No native modules, no database server — the CLI runs on any Node 18+.
98
+
99
+ ## When something fails
100
+
101
+ Errors say what went wrong and what to try, and print no stack trace:
102
+
103
+ ```
104
+ $ DESIGNFLOW_HOME=/some/file/home designflow list
105
+
106
+ DesignFlow's directory path runs through a file, not a folder.
107
+
108
+ Check DESIGNFLOW_HOME — one of the names in that path is a file.
109
+ ```
110
+
111
+ `DESIGNFLOW_DEBUG=1` adds the full trace when you need to diagnose one.
112
+
113
+ ## Architecture
114
+
115
+ ```
116
+ designflow CLI → @designflow/product → workflows → engine
117
+
118
+ @designflow/workers (the worker catalogue: metadata only)
119
+ ```
120
+
121
+ A worker is a product-facing name wrapping one or more workflows. `designflow
122
+ list` shows workers; workflow ids are still accepted by `run` so nothing is
123
+ unreachable, but they are no longer part of the vocabulary.
124
+
125
+ `src/services/cli-runner.ts` is the composition root and the only file that
126
+ imports the engine. Commands and rendering speak `@designflow/product` alone; a
127
+ test enforces that. `src/services/home.ts` does the first-run filesystem work
128
+ and prints nothing — the onboarding text lives in `src/ui/terminal.ts`.
129
+
130
+ Full rationale: `docs/adr/20260728-designflow-cli.md` and
131
+ `docs/adr/20260730-first-run-experience.md`.