the-frame-ai 0.7.2 → 0.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "the-frame-ai",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "FRAME — Framework for AI-Assisted Solo Development",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,113 @@
1
+ # /frame:arch — Module Architecture
2
+
3
+ Analyse a module and generate `docs/arch/{module}.md` with its architecture description.
4
+
5
+ ## Instructions
6
+
7
+ ### Step 0: Fail-fast
8
+
9
+ Require a module name or path. If missing, STOP: "Which module? Provide a module name or path (e.g. `/frame:arch chat` or `/frame:arch src/payments`)."
10
+
11
+ ### Step 1: Locate the module
12
+
13
+ Find relevant files:
14
+ ```bash
15
+ find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.py" -o -name "*.go" \) \
16
+ | grep -i "{module}" | grep -v node_modules | grep -v dist | head -30
17
+ ```
18
+
19
+ If nothing found, try broader search:
20
+ ```bash
21
+ grep -rn "{module}" . --include="*.ts" --include="*.js" --include="*.py" --include="*.go" \
22
+ -l | grep -v node_modules | grep -v dist | head -20
23
+ ```
24
+
25
+ If still nothing: STOP — "Module '{module}' not found. Check the name and try again."
26
+
27
+ ### Step 2: Read the files
28
+
29
+ Read all located files fully. For large files (>200 lines), focus on:
30
+ - Exports / public API
31
+ - Main classes, functions, types
32
+ - Imports (what this module depends on)
33
+
34
+ ### Step 3: Find entry points and dependencies
35
+
36
+ ```bash
37
+ grep -rn "import.*{module}\|require.*{module}\|from.*{module}" . \
38
+ --include="*.ts" --include="*.js" --include="*.py" --include="*.go" \
39
+ | grep -v node_modules | grep -v dist | head -20
40
+ ```
41
+
42
+ This shows who depends on this module.
43
+
44
+ ### Step 4: Check existing doc
45
+
46
+ ```bash
47
+ cat docs/arch/{module}.md 2>/dev/null
48
+ ```
49
+
50
+ If it exists, note what has changed since it was written.
51
+
52
+ ### Step 5: Generate the document
53
+
54
+ Create or overwrite `docs/arch/{module}.md`:
55
+
56
+ ```markdown
57
+ # {Module} — Architecture
58
+
59
+ > Generated: {date}
60
+
61
+ ## Overview
62
+
63
+ {2-3 sentences: what this module does and why it exists}
64
+
65
+ ## Responsibilities
66
+
67
+ - {responsibility 1}
68
+ - {responsibility 2}
69
+ - ...
70
+
71
+ ## File Structure
72
+
73
+ | File | Role |
74
+ |------|------|
75
+ | {file} | {what it does} |
76
+
77
+ ## Public API
78
+
79
+ {Key exports, functions, classes with one-line descriptions}
80
+
81
+ ## Dependencies
82
+
83
+ **Depends on:**
84
+ - {internal module or external package} — {why}
85
+
86
+ **Used by:**
87
+ - {module or file} — {how}
88
+
89
+ ## Data Flow
90
+
91
+ {Describe how data enters, transforms, and exits this module. Use plain text or a simple ASCII diagram.}
92
+
93
+ ## Key Decisions
94
+
95
+ {Non-obvious design choices, constraints, or trade-offs. If none — omit this section.}
96
+ ```
97
+
98
+ Write the file:
99
+ ```bash
100
+ mkdir -p docs/arch
101
+ ```
102
+ Then write `docs/arch/{module}.md` with the generated content.
103
+
104
+ ### Step 6: Confirm
105
+
106
+ Report: "Architecture documented → `docs/arch/{module}.md`" and list the files analysed.
107
+
108
+ ## Rules
109
+
110
+ - Overwrite if file already exists — always reflect current state
111
+ - No code changes, only the doc file
112
+ - Keep the doc factual — describe what exists, not what should exist
113
+ - If the module spans many files, summarise patterns rather than listing every detail