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,148 @@
1
+ # /frame:ship -- Git + PR
2
+
3
+ Prepares a git commit, optionally pushes and creates a PR.
4
+
5
+ ## Instructions
6
+
7
+ ### Step 0: Fail-fast + update STATE.md (IN_PROGRESS)
8
+
9
+ **Fail-fast checks:**
10
+ ```bash
11
+ git rev-parse --is-inside-work-tree 2>/dev/null || { echo "ERROR: Not a git repository. Run from the project root."; exit 1; }
12
+ ```
13
+
14
+ Update `.planning/STATE.md` before starting:
15
+ ```markdown
16
+ ## Current Position
17
+ - Phase: SHIP
18
+ - Status: IN_PROGRESS
19
+ - Started: {timestamp}
20
+ ```
21
+
22
+ Read `.planning/STATE.md` and verify:
23
+ - `Phase: REVIEW` ✓
24
+ - `Status:` is `approve` OR `Shipped` OR contains `ready to ship` ✓ (not `request changes`)
25
+
26
+ If conditions not met → **STOP**:
27
+ ```
28
+ ❌ Ship blocked. Review not completed or not approved.
29
+ Current status: {status}
30
+ Run /frame:review first.
31
+ ```
32
+
33
+ Check `Deps Audit` in STATE.md:
34
+ - If `Deps Status: CRITICAL` → **STOP**: fix critical vulnerabilities before shipping
35
+ - If audit date is older than 7 days → warn: `⚠️ Deps audit is stale. Consider running /frame:check-deps`
36
+
37
+ ### Step 1: Quality gate
38
+
39
+ ```bash
40
+ {quality.commands.typecheck} && {quality.commands.test}
41
+ ```
42
+
43
+ If fails → **STOP**, do not commit broken code.
44
+
45
+ ### Step 2: Check git status
46
+
47
+ ```bash
48
+ git status
49
+ git diff --stat
50
+ ```
51
+
52
+ **D-step**: Identify which files have changed.
53
+
54
+ ### Step 3: Select files for commit
55
+
56
+ **NEVER use `git add -A` or `git add .`**
57
+
58
+ Add only the relevant files:
59
+ ```bash
60
+ git add path/to/file1.ts path/to/file2.tsx
61
+ ```
62
+
63
+ ### Step 4: Create commit
64
+
65
+ Commit format: `{type}({scope}): {description}`
66
+
67
+ Types:
68
+ - `feat` -- new feature
69
+ - `fix` -- bug fix
70
+ - `refactor` -- refactoring
71
+ - `test` -- tests
72
+ - `docs` -- documentation
73
+ - `chore` -- maintenance
74
+
75
+ Examples:
76
+ ```bash
77
+ git commit -m "feat(chat): add streaming support"
78
+ git commit -m "fix(auth): handle expired token"
79
+ git commit -m "refactor(api): extract proxy logic"
80
+ ```
81
+
82
+ **D-step**: Commit is successful.
83
+
84
+ ### Step 5: Optional -- Push
85
+
86
+ Ask the user:
87
+ ```
88
+ Push to {branch}? (y/n)
89
+ ```
90
+
91
+ If yes:
92
+ ```bash
93
+ git push origin {branch}
94
+ ```
95
+
96
+ ### Step 6: Optional -- PR
97
+
98
+ If a PR needs to be created:
99
+ ```bash
100
+ gh pr create --title "{title}" --body "{description}"
101
+ ```
102
+
103
+ ### Step 6.5: Update memory files
104
+
105
+ Update `.planning/context.md`:
106
+ - `Current Focus` → remove the completed feature
107
+ - `Recent Decisions` → add an entry about what was shipped
108
+
109
+ If an architectural decision was made during ship (branch choice, PR strategy, rollback), add to `.planning/memory/decisions.md`:
110
+ ```markdown
111
+ ## [DEC-{XXX}] {Decision name}
112
+ - **Date**: {date}
113
+ - **Status**: accepted
114
+ - **Context**: {why the decision was needed}
115
+ - **Decision**: {what was decided}
116
+ - **Consequences**: {what follows from this}
117
+ ```
118
+
119
+ ### Step 7: Update STATE.md
120
+
121
+ Update `.planning/STATE.md`:
122
+ ```markdown
123
+ ## Current Position
124
+ - Phase: SHIP
125
+ - Feature: {feature}
126
+ - Commit: {hash}
127
+ - Branch: {branch}
128
+ - Tasks: {completed}/{total}
129
+ - Review: approve / {N} warnings
130
+ - Shipped: {timestamp}
131
+ - Status: Shipped
132
+ ```
133
+
134
+ ## Rules
135
+
136
+ - **Always specific files** -- never `git add -A`
137
+ - **Descriptive commit messages** -- `{type}({scope}): {description}`
138
+ - **One commit per task** -- atomic commits
139
+ - **Check git status before commit** -- ensure no sensitive files are included
140
+ - **Push only with confirmation** -- always ask before pushing
141
+
142
+ ## Result
143
+
144
+ - Git commit created
145
+ - Optionally: git push (with confirmation), PR created
146
+ - `.planning/context.md` updated
147
+ - `.planning/memory/decisions.md` updated (if architectural decision made)
148
+ - `.planning/STATE.md` updated
@@ -0,0 +1,111 @@
1
+ # /frame:sprint-check -- Sprint Planning Check
2
+
3
+ Checks ROADMAP progress and velocity.
4
+
5
+ ## Instructions
6
+
7
+ Check project progress.
8
+
9
+ ### Step 0: Fail-fast validation + Update STATE.md (IN_PROGRESS)
10
+
11
+ **Before doing anything**, check:
12
+ ```bash
13
+ git rev-parse --is-inside-work-tree 2>/dev/null || { echo "ERROR: Not a git repository. Run from project root."; exit 1; }
14
+ ```
15
+
16
+ Check `.planning/ROADMAP.md` exists — if missing, STOP: "Run /frame:init first — ROADMAP.md not found."
17
+
18
+ Update `.planning/STATE.md`:
19
+ ```markdown
20
+ ## Current Position
21
+ - Phase: SPRINT-CHECK
22
+ - Status: IN_PROGRESS
23
+ - Started: {timestamp}
24
+ ```
25
+
26
+ ### Step 1: Read ROADMAP
27
+
28
+ ```bash
29
+ cat .planning/ROADMAP.md
30
+ ```
31
+
32
+ ### Step 2: Git Stats for last 2 weeks
33
+
34
+ **Heartbeat**: report "Reading git history..." before running.
35
+
36
+ ```bash
37
+ git log --since="2 weeks ago" --oneline | wc -l # commits
38
+ git log --since="2 weeks ago" --oneline | head -10 # recent
39
+ ```
40
+
41
+ ### Step 3: Read STATE.md and plan.md
42
+
43
+ ```bash
44
+ cat .planning/STATE.md
45
+ ```
46
+
47
+ Find the current plan.md and count completed tasks:
48
+ ```bash
49
+ find docs/specs -name "plan.md" | head -1
50
+ ```
51
+ Read plan.md and count:
52
+ - `[DONE]` tasks — completed this sprint
53
+ - `[ ]` tasks — remaining
54
+ - `[BLOCKED]` tasks — blocked
55
+
56
+ ### Step 4: Identify blockers
57
+
58
+ Check for:
59
+ - Open tasks
60
+ - Blocked tasks
61
+ - Overdue items
62
+
63
+ ### Step 5: Create report and update velocity
64
+
65
+ ```bash
66
+ mkdir -p .planning/reports/sprint
67
+ ```
68
+
69
+ Create `.planning/reports/sprint/{date}.md`:
70
+
71
+ ```markdown
72
+ # Sprint Check -- {date}
73
+
74
+ ## Progress
75
+ - Commits last 2 weeks: N
76
+ - Completed tasks (DONE): N
77
+ - Remaining tasks: N
78
+ - Blocked tasks: N
79
+
80
+ ## Velocity
81
+ - Average: N tasks/week (based on [DONE] tasks in plan.md)
82
+
83
+ ## Blockers
84
+ - {blocker 1}
85
+ - {blocker 2}
86
+
87
+ ## Recommendations
88
+ 1. {recommendation}
89
+ ```
90
+
91
+ Append velocity data to `.planning/memory/metrics.md` under `## Velocity`:
92
+ ```
93
+ - {date}: {N} tasks/week, {N} commits/week
94
+ ```
95
+
96
+ If a `## Velocity` section doesn't exist, create it.
97
+
98
+ ### Step 6: Update STATE.md (COMPLETE)
99
+
100
+ Update `.planning/STATE.md`:
101
+ ```markdown
102
+ ## Current Position
103
+ - Phase: SPRINT-CHECK
104
+ - Status: COMPLETE
105
+ - Finished: {timestamp}
106
+ ```
107
+
108
+ ## Result
109
+
110
+ - `.planning/reports/sprint/{date}.md` — sprint report created
111
+ - `.planning/STATE.md` updated (COMPLETE)
@@ -0,0 +1,103 @@
1
+ # /frame:status -- Project Status
2
+
3
+ > Full technical dump: STATE.md, ROADMAP, git, memory, blockers.
4
+ > For daily orientation use `/frame:daily` instead.
5
+
6
+ Shows current status: STATE.md, ROADMAP.md, CONTEXT.md, git status.
7
+
8
+ ## Instructions
9
+
10
+ ### Step 0: Fail-fast validation
11
+
12
+ **Before any action** check:
13
+ - `.planning/STATE.md` exists — if not, STOP: "Run /frame:init first — STATE.md not found."
14
+
15
+ ### Step 1: Read STATE.md
16
+
17
+ Read `.planning/STATE.md` and capture:
18
+ - Current phase
19
+ - Current feature
20
+ - Task progress
21
+ - Latest commit
22
+ - Blockers
23
+
24
+ **D-step**: STATE.md read, data captured.
25
+
26
+ ### Step 2: Read ROADMAP.md
27
+
28
+ Read `.planning/ROADMAP.md` (if exists) and capture:
29
+ - Current milestone
30
+ - Task progress
31
+ - Upcoming plans
32
+
33
+ Also grep for blocked tasks:
34
+ ```bash
35
+ grep -i "BLOCKED" .planning/ROADMAP.md 2>/dev/null
36
+ grep -i "BLOCKED" docs/specs/*/plan.md 2>/dev/null | head -10
37
+ ```
38
+
39
+ **D-step**: ROADMAP.md read or noted as absent.
40
+
41
+ ### Step 3: Read CONTEXT.md
42
+
43
+ Read `.planning/CONTEXT.md` (if exists) and capture:
44
+ - Active feature
45
+ - Key files
46
+ - Tech context
47
+
48
+ **D-step**: CONTEXT.md read or noted as absent.
49
+
50
+ ### Step 4: Git Status
51
+
52
+ ```bash
53
+ git status
54
+ git log --oneline -5
55
+ ```
56
+
57
+ **Heartbeat**: "Git status retrieved, reading memory..."
58
+
59
+ **D-step**: Git commands executed, output captured.
60
+
61
+ ### Step 5: Show Context (if available)
62
+
63
+ Read `.planning/memory/context.md` and capture a brief summary of current focus and health.
64
+
65
+ ### Step 6: Show Memory (if available)
66
+
67
+ Read `.planning/memory/patterns.md` and capture a brief summary with confidence levels.
68
+
69
+ ### Step 7: Output Format
70
+
71
+ ```
72
+ ============================================================
73
+ FRAME STATUS
74
+ ============================================================
75
+
76
+ Phase: {current phase}
77
+ Feature: {current feature}
78
+ Tasks: {completed}/{total}
79
+ Commit: {hash}
80
+ Milestone: {milestone from ROADMAP or "—"}
81
+
82
+ ============================================================
83
+ BLOCKERS:
84
+ {list of BLOCKED tasks from plan.md and ROADMAP.md, or "none"}
85
+
86
+ ============================================================
87
+ MEMORY:
88
+ {brief summary from context.md or "—"}
89
+
90
+ ============================================================
91
+ GIT:
92
+ {git status --short}
93
+ {last 5 commits}
94
+
95
+ ============================================================
96
+ ```
97
+
98
+ ## Result
99
+
100
+ - Current project status displayed
101
+ - All key files read
102
+ - Git status shown
103
+ - Next step: `/frame:health` for technical checks or `/frame:research <topic>` for a new feature
@@ -0,0 +1,102 @@
1
+ # /frame:unstuck -- Get Unblocked
2
+
3
+ When you're stuck on a task, feature, or decision and don't know how to proceed.
4
+
5
+ ## Instructions
6
+
7
+ ### Step 1: Understand the block
8
+
9
+ Ask if not provided: "What are you stuck on? Describe the problem in one sentence."
10
+
11
+ Read:
12
+ - `.planning/STATE.md` — current phase, feature, task
13
+ - `.planning/memory/context.md` — active blockers
14
+ - `.planning/memory/anti-patterns.md` — known traps
15
+
16
+ ```bash
17
+ git log --oneline -5
18
+ git diff --stat HEAD~3..HEAD 2>/dev/null | tail -5
19
+ ```
20
+
21
+ ### Step 2: Classify the block
22
+
23
+ Determine which type:
24
+ - **Technical** — don't know how to implement something
25
+ - **Decision** — two+ valid approaches, can't choose
26
+ - **Scope creep** — task grew beyond original estimate
27
+ - **External** — waiting on something outside your control
28
+ - **Motivation** — overwhelmed, lost context, don't know where to start
29
+
30
+ ### Step 3: Check memory for prior solutions
31
+
32
+ ```bash
33
+ grep -i "{keywords from block}" .planning/memory/decisions.md 2>/dev/null | head -5
34
+ grep -i "{keywords from block}" .planning/memory/anti-patterns.md 2>/dev/null | head -5
35
+ grep -i "{keywords from block}" .planning/memory/patterns.md 2>/dev/null | head -5
36
+ ```
37
+
38
+ ### Step 4: Output 3 options
39
+
40
+ Always give exactly 3 options, ordered from least to most disruptive:
41
+
42
+ ```
43
+ ╔══════════════════════════════════════════╗
44
+ ║ FRAME UNSTUCK ║
45
+ ╠══════════════════════════════════════════╣
46
+ ║ Block: {one-line description} ║
47
+ ║ Type: {Technical/Decision/Scope/...} ║
48
+ ╠══════════════════════════════════════════╣
49
+ ║ Option 1 — Smallest step ║
50
+ ║ {concrete action, < 30 min} ║
51
+ ║ → {command to run} ║
52
+ ╠══════════════════════════════════════════╣
53
+ ║ Option 2 — Reframe ║
54
+ ║ {different angle or scope reduction} ║
55
+ ║ → {command to run} ║
56
+ ╠══════════════════════════════════════════╣
57
+ ║ Option 3 — Reset ║
58
+ ║ {rollback / simplify / skip for now} ║
59
+ ║ → {command to run} ║
60
+ ╚══════════════════════════════════════════╝
61
+ ```
62
+
63
+ Option templates by block type:
64
+
65
+ **Technical:**
66
+ 1. Find a working example in the codebase → `/frame:why`
67
+ 2. Spike a minimal proof-of-concept → `/frame:fast`
68
+ 3. Simplify the requirement → `/frame:plan`
69
+
70
+ **Decision:**
71
+ 1. Pick the option with fewer dependencies and proceed
72
+ 2. Run devil's advocate on both options → use `@devils-advocate` agent
73
+ 3. Time-box 30 min on option A, then decide → `/frame:fast`
74
+
75
+ **Scope creep:**
76
+ 1. Cut to the original requirement, defer extras → `/frame:add-task`
77
+ 2. Re-estimate and update plan → `/frame:estimate`
78
+ 3. Checkpoint and start fresh sub-task → `/frame:checkpoint` then `/frame:fast`
79
+
80
+ **External:**
81
+ 1. Document the blocker and work on something else → `/frame:note anti: waiting on {X}`
82
+ 2. Mock/stub the external dependency → `/frame:fast`
83
+ 3. Escalate or find a workaround
84
+
85
+ **Motivation:**
86
+ 1. Run `/frame:daily` to rebuild context
87
+ 2. Pick the smallest open task → `/frame:fast`
88
+ 3. Take a break, set a 25-min timer, come back to `/frame:build`
89
+
90
+ ### Step 5: Save blocker to context
91
+
92
+ Append to `.planning/memory/context.md` under `## Active Blockers`:
93
+ ```
94
+ - {date}: {block description} — {chosen option}
95
+ ```
96
+
97
+ ## Rules
98
+
99
+ - Always give exactly 3 options
100
+ - Options must be concrete — no vague advice
101
+ - Option 1 must be actionable in < 30 min
102
+ - No code changes