the-frame-ai 0.7.0 → 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
|
@@ -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
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md — {{PROJECT_NAME}}
|
|
2
|
-
|
|
3
|
-
## Tech Stack
|
|
4
|
-
|
|
5
|
-
(to be filled after /frame:init scan)
|
|
6
|
-
|
|
7
|
-
## Architecture
|
|
8
|
-
|
|
9
|
-
(to be filled after /frame:init scan)
|
|
10
|
-
|
|
11
|
-
## Key Patterns
|
|
12
|
-
|
|
13
|
-
(to be filled after /frame:init scan)
|
|
14
|
-
|
|
15
|
-
## Code Conventions
|
|
16
|
-
|
|
17
|
-
- **File naming**: (define your convention)
|
|
18
|
-
- **Imports**: (define your import order)
|
|
19
|
-
- **TypeScript**: Strict mode
|
|
20
|
-
- **Git**: `{type}({scope}): {description}` — types: feat, fix, refactor, test, docs, chore
|
|
21
|
-
- **Tests**: co-located or `__tests__/` directory
|
|
22
|
-
|
|
23
|
-
## Rules (MUST follow)
|
|
24
|
-
|
|
25
|
-
1. Always run quality checks before commit
|
|
26
|
-
2. Use error reporting (not console.log)
|
|
27
|
-
3. No `any` type — use `unknown` + type guard
|
|
28
|
-
4. New features require tests
|
|
29
|
-
|
|
30
|
-
## FRAME Framework
|
|
31
|
-
|
|
32
|
-
This project uses FRAME (Framework for AI-Assisted Solo Development).
|
|
33
|
-
|
|
34
|
-
**Commands**:
|
|
35
|
-
- `/frame:init` — initialize project
|
|
36
|
-
- `/frame:status` — current state
|
|
37
|
-
- `/frame:fast <task>` — quick task
|
|
38
|
-
- `/frame:research <topic>` — domain research
|
|
39
|
-
- `/frame:plan <feature>` — plan feature
|
|
40
|
-
- `/frame:build` — implement with TDD
|
|
41
|
-
- `/frame:review` — code review
|
|
42
|
-
- `/frame:security` — security audit (secrets, OWASP, infra, AI)
|
|
43
|
-
- `/frame:ship` — git + PR
|
|
44
|
-
- `/frame:debug <issue>` — systematic debugging
|
|
45
|
-
- `/frame:retrospective` — retrospective + memory update
|
|
46
|
-
- `/frame:cleanup-memory` — trim and archive memory files
|
|
47
|
-
|
|
48
|
-
**Key files**:
|
|
49
|
-
- `.planning/STATE.md` — current position
|
|
50
|
-
- `.planning/MAP.md` — project map
|
|
51
|
-
- `.planning/ROADMAP.md` — roadmap
|
|
52
|
-
- `.frame/config.json` — FRAME configuration
|
|
53
|
-
- `.planning/memory/` — project memory
|
|
54
|
-
|
|
55
|
-
**Quality Gates** (D→P→D):
|
|
56
|
-
- `{quality.commands.typecheck}` — Type check
|
|
57
|
-
- `{quality.commands.test}` — Test check
|
|
58
|
-
- `{quality.commands.lint}` — Lint check
|
|
59
|
-
- `{quality.commands.build}` — Build check (before Ship)
|
|
60
|
-
|
|
61
|
-
## Anti-Patterns (NEVER do)
|
|
62
|
-
|
|
63
|
-
- ❌ Skip verification steps (D→P→D is mandatory)
|
|
64
|
-
- ❌ `any` type (use `unknown` + type guard)
|