the-frame-ai 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 (77) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +335 -0
  3. package/README.ru.md +333 -0
  4. package/bin/the-frame +5 -0
  5. package/bin/the-frame-ai +5 -0
  6. package/package.json +29 -0
  7. package/src/cli.js +84 -0
  8. package/src/doctor.js +164 -0
  9. package/src/init.js +178 -0
  10. package/src/languages.js +141 -0
  11. package/src/manifest.js +55 -0
  12. package/src/update.js +87 -0
  13. package/src/utils.js +55 -0
  14. package/templates/agents/builder.md +240 -0
  15. package/templates/agents/devils-advocate.md +136 -0
  16. package/templates/agents/planner.md +277 -0
  17. package/templates/agents/researcher.md +195 -0
  18. package/templates/agents/reviewer.md +300 -0
  19. package/templates/commands/frame:add-task.md +57 -0
  20. package/templates/commands/frame:build.md +170 -0
  21. package/templates/commands/frame:check-deps.md +118 -0
  22. package/templates/commands/frame:checkpoint.md +158 -0
  23. package/templates/commands/frame:cleanup-memory.md +80 -0
  24. package/templates/commands/frame:context.md +64 -0
  25. package/templates/commands/frame:daily.md +77 -0
  26. package/templates/commands/frame:debug.md +146 -0
  27. package/templates/commands/frame:doctor.md +170 -0
  28. package/templates/commands/frame:estimate.md +105 -0
  29. package/templates/commands/frame:explain.md +84 -0
  30. package/templates/commands/frame:fast.md +89 -0
  31. package/templates/commands/frame:forensics.md +139 -0
  32. package/templates/commands/frame:headless.md +118 -0
  33. package/templates/commands/frame:health.md +86 -0
  34. package/templates/commands/frame:init.md +231 -0
  35. package/templates/commands/frame:migrate.md +107 -0
  36. package/templates/commands/frame:note.md +32 -0
  37. package/templates/commands/frame:pause.md +145 -0
  38. package/templates/commands/frame:performance.md +228 -0
  39. package/templates/commands/frame:plan.md +198 -0
  40. package/templates/commands/frame:refactor.md +161 -0
  41. package/templates/commands/frame:research.md +131 -0
  42. package/templates/commands/frame:resume.md +137 -0
  43. package/templates/commands/frame:retrospective.md +196 -0
  44. package/templates/commands/frame:review.md +174 -0
  45. package/templates/commands/frame:rollback.md +207 -0
  46. package/templates/commands/frame:ship.md +148 -0
  47. package/templates/commands/frame:sprint-check.md +111 -0
  48. package/templates/commands/frame:status.md +103 -0
  49. package/templates/commands/frame:unstuck.md +102 -0
  50. package/templates/commands/frame:wave.md +312 -0
  51. package/templates/commands/frame:where.md +5 -0
  52. package/templates/commands/frame:why.md +57 -0
  53. package/templates/commands/frame:worktree.md +219 -0
  54. package/templates/hooks/git-safety.sh +33 -0
  55. package/templates/hooks/quality-gate.sh +52 -0
  56. package/templates/hooks/safety-net.sh +13 -0
  57. package/templates/hooks/session-init.sh +81 -0
  58. package/templates/planning/pause-state.json +1 -0
  59. package/templates/project/CLAUDE.md +63 -0
  60. package/templates/project/CONTEXT.md +16 -0
  61. package/templates/project/MAP.md +35 -0
  62. package/templates/project/ROADMAP.md +12 -0
  63. package/templates/project/STATE.md +13 -0
  64. package/templates/project/config.json +74 -0
  65. package/templates/project/memory/anti-patterns.md +14 -0
  66. package/templates/project/memory/context.md +23 -0
  67. package/templates/project/memory/conventions.md +19 -0
  68. package/templates/project/memory/decisions.md +20 -0
  69. package/templates/project/memory/dependencies.md +23 -0
  70. package/templates/project/memory/metrics.md +22 -0
  71. package/templates/project/memory/patterns.md +30 -0
  72. package/templates/project/memory/wins.md +11 -0
  73. package/templates/project/settings.local.json +50 -0
  74. package/templates/project/specs/_template/PRD.md +24 -0
  75. package/templates/project/specs/_template/plan.md +25 -0
  76. package/templates/project/specs/_template/spec.md +27 -0
  77. package/templates/project/specs/_template/subagent-prompt.md +43 -0
@@ -0,0 +1,105 @@
1
+ # /frame:estimate -- Task Estimation
2
+
3
+ Quick pre-planning estimate: scope, risks, time. Helps decide whether to start now.
4
+
5
+ ## Instructions
6
+
7
+ ### Step 0: Fail-fast
8
+
9
+ Check: task/feature description provided — if missing, STOP: "What do you want to estimate?"
10
+
11
+ ### Step 1: Read project context
12
+
13
+ ```bash
14
+ find . -name "*.ts" -o -name "*.js" -o -name "*.py" -o -name "*.go" | grep -v node_modules | grep -v .git | wc -l
15
+ ```
16
+
17
+ Read:
18
+ - `.planning/MAP.md` — architecture, key directories
19
+ - `.planning/memory/context.md` — current focus, blockers
20
+ - `.planning/memory/patterns.md` — Core section only
21
+
22
+ ### Step 2: Scope analysis
23
+
24
+ Estimate which files/modules will be touched:
25
+ ```bash
26
+ grep -r "{keywords}" --include="*.ts" --include="*.js" -l | head -20
27
+ ```
28
+
29
+ Count: files likely affected, modules involved, external dependencies needed.
30
+
31
+ ### Step 3: Risk assessment
32
+
33
+ | Factor | Low | Medium | High |
34
+ |--------|-----|--------|------|
35
+ | Files touched | 1-3 | 4-8 | 9+ |
36
+ | New dependencies | 0 | 1 | 2+ |
37
+ | Touches auth/data/core | No | Partially | Yes |
38
+ | Has existing tests | Yes | Partial | No |
39
+
40
+ ### Step 4: Historical calibration
41
+
42
+ Check if metrics.md has past estimates for this project:
43
+
44
+ ```bash
45
+ grep "estimate" .planning/memory/metrics.md 2>/dev/null | tail -20
46
+ ```
47
+
48
+ If data exists, calculate actual vs estimated accuracy:
49
+ - Find tasks of similar size (XS/S/M/L/XL) that were completed
50
+ - Note if estimates were consistently over or under
51
+
52
+ Include in output if data available:
53
+ ```
54
+ ║ Historical (your project): ║
55
+ ║ M tasks avg: {N} hours actual ║
56
+ ║ Estimate accuracy: {over/under/good} ║
57
+ ```
58
+
59
+ ### Step 5: Output
60
+
61
+ Based on scope and risk:
62
+ - **XS** (< 30 min): 1-2 files, no new deps, clear pattern exists
63
+ - **S** (30-60 min): 2-4 files, minor changes, pattern exists
64
+ - **M** (1-3 hours): 4-8 files, some new logic, 1 new dep
65
+ - **L** (3-8 hours): 8+ files, new architecture, multiple deps
66
+ - **XL** (1+ day): cross-cutting change, new subsystem
67
+
68
+ ### Step 6: Output
69
+
70
+ ```
71
+ ╔══════════════════════════════════════════╗
72
+ ║ FRAME ESTIMATE ║
73
+ ╠══════════════════════════════════════════╣
74
+ ║ Task: {task description} ║
75
+ ╠══════════════════════════════════════════╣
76
+ ║ Scope: ║
77
+ ║ Files: ~{N} files affected ║
78
+ ║ Modules: {list} ║
79
+ ╠══════════════════════════════════════════╣
80
+ ║ Risks: ║
81
+ ║ {risk 1} ║
82
+ ║ {risk 2} ║
83
+ ╠══════════════════════════════════════════╣
84
+ ║ Estimate: {XS/S/M/L/XL} ({time range}) ║
85
+ ║ Confidence: {low/medium/high} ║
86
+ ╠══════════════════════════════════════════╣
87
+ ║ Recommendation: ║
88
+ ║ {start now / break down / research} ║
89
+ ╚══════════════════════════════════════════╝
90
+ ```
91
+
92
+ **Recommendation rules**:
93
+ - XS/S → "Start now with /frame:fast"
94
+ - M → "Start with /frame:research then /frame:plan"
95
+ - L/XL → "Break into smaller tasks first"
96
+ - Any HIGH risk → "Run /frame:research first"
97
+
98
+ ## Rules
99
+
100
+ - No code changes
101
+ - If MAP.md missing: estimate based on task description only, note low confidence
102
+ - After output: append estimate to `.planning/memory/metrics.md`:
103
+ ```
104
+ - {date}: estimate "{task}" → {XS/S/M/L/XL} ({time range}), confidence: {low/medium/high}
105
+ ```
@@ -0,0 +1,84 @@
1
+ # /frame:explain -- Explain Code Decision History
2
+
3
+ Why does this code look the way it does? Surfaces decisions, patterns, and history behind a file or function.
4
+
5
+ ## Instructions
6
+
7
+ ### Step 0: Fail-fast
8
+
9
+ Require a file path or function/symbol name. If missing, STOP: "What do you want explained? Provide a file path or function name."
10
+
11
+ ### Step 1: Read the target
12
+
13
+ ```bash
14
+ cat {file_path} 2>/dev/null | head -100
15
+ ```
16
+
17
+ If a function name was given, find it:
18
+ ```bash
19
+ grep -rn "function {name}\|const {name}\|def {name}\|func {name}" . \
20
+ --include="*.ts" --include="*.js" --include="*.py" --include="*.go" \
21
+ --include="*.rs" | grep -v node_modules | head -10
22
+ ```
23
+
24
+ ### Step 2: Search decisions memory
25
+
26
+ ```bash
27
+ grep -i "{keywords}" .planning/memory/decisions.md 2>/dev/null | head -10
28
+ grep -i "{keywords}" .planning/memory/anti-patterns.md 2>/dev/null | head -10
29
+ grep -i "{keywords}" .planning/memory/patterns.md 2>/dev/null | head -10
30
+ ```
31
+
32
+ ### Step 3: Search git history
33
+
34
+ ```bash
35
+ git log --oneline --follow -- {file_path} 2>/dev/null | head -10
36
+ git log --oneline -S "{function_name}" 2>/dev/null | head -5
37
+ git log --oneline --grep="{keywords}" 2>/dev/null | head -5
38
+ ```
39
+
40
+ Read the most relevant commit messages in full:
41
+ ```bash
42
+ git show {commit_hash} --stat --format="%B" 2>/dev/null | head -30
43
+ ```
44
+
45
+ ### Step 4: Check forensics reports
46
+
47
+ ```bash
48
+ ls .planning/forensics/ 2>/dev/null
49
+ grep -l "{keywords}" .planning/forensics/*.md 2>/dev/null | head -3
50
+ ```
51
+
52
+ Read any matching forensics reports (first 40 lines each).
53
+
54
+ ### Step 5: Output explanation
55
+
56
+ ```
57
+ ## Why {file or function}?
58
+
59
+ ### What it does
60
+ {1-2 sentences on the current behavior}
61
+
62
+ ### Why it looks this way
63
+ {Key decisions that shaped this code — from memory, git, forensics}
64
+
65
+ ### Decisions
66
+ {List of relevant DEC-XXX from decisions.md, or "No recorded decisions"}
67
+
68
+ ### Patterns applied
69
+ {Patterns from patterns.md that apply here, or "None recorded"}
70
+
71
+ ### Watch out for
72
+ {Anti-patterns from anti-patterns.md relevant to this area, or "None recorded"}
73
+
74
+ ### History
75
+ {Key commits that changed this file/function, with dates}
76
+ ```
77
+
78
+ If nothing was found in memory or git: say so explicitly — "No recorded history found. This code has no documented decisions."
79
+
80
+ ## Rules
81
+
82
+ - No code changes
83
+ - Output only — no file writes
84
+ - If file doesn't exist: "File not found: {path}"
@@ -0,0 +1,89 @@
1
+ # /frame:fast -- Quick Task
2
+
3
+ Executes a quick task without the full workflow: mini Research -> mini Plan -> Build.
4
+
5
+ ## Instructions
6
+
7
+ Execute the quick task: **$ARGUMENTS**
8
+
9
+ ### Step 0: Initialize (10 sec)
10
+
11
+ Write to `.planning/STATE.md`:
12
+ ```markdown
13
+ ## Current Position
14
+ - Phase: BUILD
15
+ - Feature: {task description}
16
+ - Status: IN_PROGRESS
17
+ ```
18
+
19
+ Quickly check:
20
+ - `memory/anti-patterns.md` — any similar case already solved
21
+ - `memory/patterns.md` — expected pattern for this area
22
+
23
+ **Scope limit**: if the task will take more than 30 minutes — warn the user and suggest `/frame:build`, but continue if they want to proceed.
24
+
25
+ ### Step 1: Mini Research (30 sec)
26
+
27
+ Quickly analyze:
28
+ - What needs to be done
29
+ - Where the relevant files are (use `.planning/MAP.md`)
30
+ - Whether similar patterns exist in the project
31
+
32
+ ### Step 2: Mini Plan (30 sec)
33
+
34
+ Determine:
35
+ - Which files to change
36
+ - What test to write (if needed)
37
+ - Which verification command to use
38
+
39
+ ### Step 3: Build (2-5 min)
40
+
41
+ Execute:
42
+ 1. If a test is needed -- write the test first (RED)
43
+ 2. Write the code (GREEN)
44
+ 3. Refactor if needed
45
+ 4. Run quality gates: `{quality.commands.typecheck} && {quality.commands.test} && {quality.commands.lint}`
46
+ 5. Git commit: `git add {files} && git commit -m "{type}({scope}): {description}"`
47
+
48
+ ### Step 4: Update STATE.md and wins
49
+
50
+ Update `.planning/STATE.md`:
51
+ ```markdown
52
+ ## Current Position
53
+ - Phase: BUILD
54
+ - Feature: {task description}
55
+ - Status: Fast task completed
56
+ - Last fast task: {date} — {task description}
57
+ ```
58
+
59
+ Append to `.planning/memory/wins.md`:
60
+ ```markdown
61
+ - {date}: {task description} — {files changed, 1 line summary}
62
+ ```
63
+
64
+ If a new pattern or anti-pattern was discovered during the task — record it in the appropriate memory file.
65
+
66
+ ## Rules
67
+
68
+ - **Fast** -- entire task should take ≤30 minutes
69
+ - **Scope** -- if clearly >30 min, warn and suggest `/frame:build`
70
+ - **Tests optional** -- only if logic changed
71
+ - **Quality gates mandatory** -- typecheck + test + lint
72
+ - **Specific files** -- never `git add -A`
73
+
74
+ ## When to Use
75
+
76
+ - "Add a button"
77
+ - "Change a color"
78
+ - "Add an icon"
79
+ - "Fix a typo"
80
+ - "Add padding/margin"
81
+ - "Rename a function"
82
+ - "Add a field to a type"
83
+ - "Add an env variable"
84
+
85
+ ## Result
86
+
87
+ - Task completed in 2-5 minutes
88
+ - Quality gates passed
89
+ - Git commit created
@@ -0,0 +1,139 @@
1
+ # /frame:forensics -- Deep Debugging
2
+
3
+ Systematic root cause analysis with logs, git history, and monitoring.
4
+
5
+ > Use when `frame:debug` hasn't found the cause in 30 minutes, or the problem is systemic/recurring.
6
+
7
+ ## Instructions
8
+
9
+ Debug the problem deeply: **$ARGUMENTS**
10
+
11
+ ### Step 0: Initialize
12
+
13
+ Write to `STATE.md`:
14
+ ```markdown
15
+ - Phase: FORENSICS
16
+ - Issue: {description from $ARGUMENTS}
17
+ - Status: IN_PROGRESS
18
+ - Started: {timestamp}
19
+ ```
20
+
21
+ Check memory before any investigation:
22
+ - `memory/anti-patterns.md` → similar symptom may have been investigated before
23
+ - `memory/decisions.md` → does the problem contradict an accepted decision
24
+
25
+ ### Phase 1: Evidence Collection
26
+
27
+ 1. **Git History**
28
+ ```bash
29
+ git log --oneline -20
30
+ git log --all --oneline --graph | head -30
31
+ git blame {affected_file}
32
+ git diff {suspect_commit}^ {suspect_commit}
33
+ ```
34
+
35
+ 2. **Monitoring Logs (if available)**
36
+ - What errors appeared recently?
37
+ - What is the stack trace?
38
+ - What triggers the error?
39
+
40
+ 3. **Codebase**
41
+ ```bash
42
+ grep -r "{error_keyword}" --include="*.ts" --include="*.tsx" | head -20
43
+ find . -name "*{affected_file}*"
44
+ ```
45
+
46
+ ### Phase 2: Root Cause Analysis (D→P→D)
47
+
48
+ Apply "5 Whys" — confirm each answer with a deterministic step:
49
+
50
+ 1. What broke? **[D]** reproduce / find in logs
51
+ 2. Why? → **[P]** hypothesis → **[D]** confirm with grep/test
52
+ 3. Why did that happen? → **[P]** hypothesis → **[D]** confirm
53
+ 4. Why was the implementation like that? → **[P]** hypothesis → **[D]** confirm
54
+ 5. Why was it not prevented? → **[P]** hypothesis → **[D]** confirm
55
+
56
+ > Root cause is a confirmed fact, not a guess.
57
+
58
+ ### Phase 3: Timeline Reconstruction
59
+
60
+ ```
61
+ T-N days: commit X (possible cause)
62
+ T-3 days: first occurrence of error
63
+ T-2 days: commit Y (attempted fix)
64
+ T-1 day: error worsened
65
+ T-0: now (incident)
66
+ ```
67
+
68
+ ### Phase 4: Create Report
69
+
70
+ Create `.planning/forensics/{issue-id}.md`:
71
+
72
+ ```markdown
73
+ # Forensic Report: {Issue}
74
+
75
+ ## Incident Summary
76
+ {What happened, when, impact, who is affected}
77
+
78
+ ## Root Cause
79
+ {5 Whys analysis with confirmed facts}
80
+
81
+ ## Timeline
82
+ |T|Event|
83
+ |---|---|
84
+ |...|...|
85
+
86
+ ## Evidence
87
+ ### Git History
88
+ {relevant commits}
89
+
90
+ ### Code Analysis
91
+ {problematic code}
92
+
93
+ ### Related Issues
94
+ {monitoring links, PRs}
95
+
96
+ ## Fix
97
+ {What needs to be fixed}
98
+
99
+ ## Prevention
100
+ {How to avoid this in the future}
101
+ ```
102
+
103
+ ### Phase 5: Update Memory
104
+
105
+ **anti-patterns.md** — if a new anti-pattern was found:
106
+ ```markdown
107
+ ## Anti-pattern: {name}
108
+ - **Why it's bad**: {reason}
109
+ - **Correct approach**: {how to do it}
110
+ - **Related decision**: {DEC-XXX or empty}
111
+ - **Occurrences**: 1
112
+ ```
113
+
114
+ **decisions.md** — if an architectural decision is needed:
115
+ ```markdown
116
+ ## [DEC-{XXX}] {Title}
117
+ - **Date**: {date}
118
+ - **Status**: accepted
119
+ - **Context**: {why the decision was needed}
120
+ - **Decision**: {what was decided}
121
+ - **Consequences**: {what follows from this}
122
+ ```
123
+
124
+ **Update STATE.md**:
125
+ ```markdown
126
+ - Phase: FORENSICS
127
+ - Issue: {issue}
128
+ - Status: COMPLETED
129
+ ```
130
+
131
+ Then run `/frame:retrospective` to capture lessons learned.
132
+
133
+ ## Result
134
+
135
+ - Root cause identified and confirmed deterministically
136
+ - Report created in `.planning/forensics/`
137
+ - Timeline reconstructed
138
+ - Memory updated (anti-patterns.md / decisions.md)
139
+ - STATE.md updated
@@ -0,0 +1,118 @@
1
+ # /frame:headless -- Autonomous Execution (CI mode)
2
+
3
+ Runs the full FRAME workflow without interaction: Research -> Plan -> Build -> Review -> Ship.
4
+
5
+ ## Instructions
6
+
7
+ Execute the task fully autonomously: **$ARGUMENTS**
8
+
9
+ ### Constraint
10
+
11
+ This command runs **without interaction** -- no confirmations, no input prompts.
12
+ Use it for CI/CD pipelines or when fully automated execution is needed.
13
+
14
+ ### Step 0: Check state
15
+
16
+ Read `.planning/STATE.md`. If there is unfinished work (status `IN_PROGRESS`) — record it in the report as `INTERRUPTED` and start fresh for `$ARGUMENTS`.
17
+
18
+ Extract the feature name from `$ARGUMENTS` (first 2-4 words, snake_case) — this is `{feature}`, used in all subsequent steps.
19
+
20
+ ### Step 1: Research
21
+
22
+ Execute the instructions of `/frame:research` for the topic `$ARGUMENTS`.
23
+
24
+ Result: `docs/specs/{feature}/research.md` created.
25
+
26
+ ### Step 2: Plan
27
+
28
+ Execute the instructions of `/frame:plan` for feature `{feature}`.
29
+
30
+ Result: `docs/specs/{feature}/spec.md` and `docs/specs/{feature}/plan.md` created.
31
+
32
+ ### Step 3: Build
33
+
34
+ Execute the instructions of `/frame:build`.
35
+
36
+ If a task gets stuck (Stuck Detection — 3 attempts without progress):
37
+ - Mark the task as `[BLOCKED]` in plan.md
38
+ - Record in the report: `Build: PARTIAL`
39
+ - Continue with the next task
40
+
41
+ Result: code implemented, tests pass, commits created.
42
+
43
+ ### Step 4: Review
44
+
45
+ Execute the instructions of `/frame:review`.
46
+
47
+ If review returns `REVIEW_FAILED`:
48
+ - Automatically apply fixes from `Action Items` in review.md
49
+ - Re-run review (maximum 2 attempts)
50
+ - If still `REVIEW_FAILED` after 2 attempts — record in the report and continue to Ship
51
+
52
+ Result: `docs/specs/{feature}/review.md` created.
53
+
54
+ ### Step 5: Ship
55
+
56
+ Execute the instructions of `/frame:ship`, skipping the interactive push question (do not push).
57
+
58
+ Result: git commit created.
59
+
60
+ ### Step 6: Retrospective
61
+
62
+ Execute the instructions of `/frame:retrospective`.
63
+
64
+ Result: memory updated.
65
+
66
+ ### Step 7: Create report
67
+
68
+ Create `docs/specs/{feature}/headless-report.md`:
69
+
70
+ ```markdown
71
+ # Headless Execution Report: {Feature}
72
+
73
+ ## Summary
74
+ - **Started**: {timestamp}
75
+ - **Completed**: {timestamp}
76
+ - **Duration**: {total time}
77
+ - **Result**: SUCCESS | PARTIAL | FAILED
78
+
79
+ ## Phases
80
+ | Phase | Status | Time | Notes |
81
+ |-------|--------|------|-------|
82
+ | Research | DONE | X min | |
83
+ | Plan | DONE | X min | Tasks: N |
84
+ | Build | DONE/PARTIAL | X min | Commits: N, Blocked: N |
85
+ | Review | DONE | X min | Attempts: N |
86
+ | Ship | DONE | X min | Commit: {hash} |
87
+ | Reflect | DONE | X min | |
88
+
89
+ ## Changes
90
+ - Files changed: N
91
+ - Tests added: N
92
+ - Commits: N
93
+
94
+ ## Quality Gates
95
+ - Typecheck: {quality.commands.typecheck} — PASS/FAIL
96
+ - Tests: {quality.commands.test} — PASS/FAIL
97
+ - Lint: {quality.commands.lint} — PASS/FAIL
98
+ - Build: {quality.commands.build} — PASS/FAIL
99
+
100
+ ## Blocked Tasks (if any)
101
+ - {task}: {reason}
102
+ ```
103
+
104
+ ## Rules
105
+
106
+ - **Never stop** -- execute all phases
107
+ - **Never ask for input** -- do everything automatically
108
+ - **Always log** -- create a report with final status SUCCESS/PARTIAL/FAILED
109
+ - **Always run quality gates** -- use `{quality.commands.*}` from project config
110
+ - **Always commit** -- capture changes, but do not push without explicit request
111
+ - **Blocked does not mean stop** -- skip blocked tasks, record them, and move on
112
+ - **Retrospective is mandatory** -- memory update is part of the cycle
113
+
114
+ ## Result
115
+
116
+ - Task executed fully autonomously
117
+ - All phases completed (or recorded as PARTIAL/FAILED)
118
+ - Report created with final status
@@ -0,0 +1,86 @@
1
+ # /frame:health -- Daily Health Check
2
+
3
+ Daily project health check.
4
+
5
+ ## Instructions
6
+
7
+ Run a project health check and create a report.
8
+
9
+ ### Step 1: Read project context
10
+
11
+ Read `.planning/STATE.md` — note current phase and blockers.
12
+ Read `.planning/memory/context.md` — note last retrospective date and open anti-patterns.
13
+
14
+ ### Step 2: Technical checks
15
+
16
+ 1. **Security audit**
17
+ ```bash
18
+ {quality.commands.audit} 2>/dev/null | tail -5
19
+ ```
20
+
21
+ 2. **Outdated dependencies**
22
+ ```bash
23
+ {quality.commands.outdated} 2>/dev/null | head -10
24
+ ```
25
+
26
+ 3. **Type check**
27
+ ```bash
28
+ {quality.commands.typecheck} 2>&1 | tail -3
29
+ ```
30
+
31
+ 4. **Tests**
32
+ ```bash
33
+ {quality.commands.test} 2>&1 | tail -5
34
+ ```
35
+
36
+ 5. **Disk size**
37
+ ```bash
38
+ du -sh . --exclude=node_modules --exclude=.git 2>/dev/null || du -sh $(find . -maxdepth 1 -not -name "node_modules" -not -name ".git" -not -name "." | tr '\n' ' ') 2>/dev/null
39
+ ```
40
+
41
+ 6. **Git status** (uncommitted changes)
42
+ ```bash
43
+ git status --short
44
+ git log --oneline -5
45
+ ```
46
+
47
+ ### Step 3: History (last 7 days)
48
+
49
+ Read reports from `.planning/reports/daily/` for the last 7 days and determine each day's status: HEALTHY=`+`, ISSUES=`~`, CRITICAL=`!`, missing=`.`.
50
+
51
+ ### Step 4: Determine status and actions
52
+
53
+ - **HEALTHY** — all checks passed, no blockers
54
+ - **ISSUES** — outdated dependencies, type warnings, or uncommitted changes
55
+ - **CRITICAL** — tests failed, audit found vulnerabilities, or open blockers
56
+
57
+ For each failed check, add a concrete action item to the "Action Items" section.
58
+
59
+ ### Step 5: Create report
60
+
61
+ Create `.planning/reports/daily/{date}.md`:
62
+
63
+ ```markdown
64
+ # Daily Health Check -- {date}
65
+
66
+ ## Status: HEALTHY | ISSUES | CRITICAL
67
+
68
+ ## Project
69
+ - Phase: {phase from STATE.md}
70
+ - Blockers: {blockers or "none"}
71
+ - Last retrospective: {date from context.md}
72
+
73
+ ## Technical Checks
74
+ - [x] Audit: {result or "clean"}
75
+ - [x] Outdated: {count or "none"}
76
+ - [x] Types: PASS/FAIL
77
+ - [x] Tests: PASS/FAIL
78
+ - [x] Disk: {size}
79
+ - [x] Git: {count of uncommitted files or "clean"}
80
+
81
+ ## Action Items
82
+ - [ ] {concrete action for each failed check}
83
+
84
+ ## History (7 days)
85
+ {date}: {+|~|!|.} {date}: {+|~|!|.} ...
86
+ ```