@sbswang2002/flash 0.1.49
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/LICENSE +21 -0
- package/README.md +354 -0
- package/dist/cli.mjs +19140 -0
- package/package.json +57 -0
- package/skills/flash/SKILL.md +174 -0
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sbswang2002/flash",
|
|
3
|
+
"version": "0.1.49",
|
|
4
|
+
"packageManager": "pnpm@11.1.1",
|
|
5
|
+
"description": "Run a coding agent in a loop inside a git repo, one commit per successful iteration",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"flash": "dist/cli.mjs"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsdown",
|
|
12
|
+
"dev": "tsdown --watch",
|
|
13
|
+
"start": "node dist/cli.mjs",
|
|
14
|
+
"lint": "eslint src",
|
|
15
|
+
"format": "prettier --write src",
|
|
16
|
+
"format:check": "prettier --check src",
|
|
17
|
+
"typecheck": "tsc -p tsconfig.typecheck.json --noEmit",
|
|
18
|
+
"test": "pnpm run build && vitest run",
|
|
19
|
+
"test:e2e": "pnpm run build && vitest run e2e/",
|
|
20
|
+
"test:coverage": "vitest run --coverage --exclude \"e2e/**\""
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"commander": "^14.0.3",
|
|
24
|
+
"js-yaml": "^4.1.1"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@eslint/js": "^9.0.0",
|
|
28
|
+
"@types/js-yaml": "^4.0.9",
|
|
29
|
+
"@types/node": "^22.0.0",
|
|
30
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
31
|
+
"acp-mock": "^1.1.0",
|
|
32
|
+
"acpx": "^0.6.1",
|
|
33
|
+
"eslint": "^9.0.0",
|
|
34
|
+
"eslint-config-prettier": "^10.0.0",
|
|
35
|
+
"prettier": "^3.0.0",
|
|
36
|
+
"tsdown": "^0.21.7",
|
|
37
|
+
"typescript": "^5.8.0",
|
|
38
|
+
"typescript-eslint": "^8.0.0",
|
|
39
|
+
"vitest": "^4.1.2"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist",
|
|
43
|
+
"skills",
|
|
44
|
+
"LICENSE",
|
|
45
|
+
"README.md"
|
|
46
|
+
],
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "git+https://github.com/gwang-indoc/gnhf_update.git"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=20"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flash
|
|
3
|
+
description: Use when the user asks to run FLASH, says they are going to sleep or leaving and wants an agent-managed coding run, asks to supervise, steer, or review an active FLASH run, or gives feedback on FLASH results.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# FLASH
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
FLASH is an agent orchestrator: it repeatedly calls another coding agent until a natural-language stop condition is met. This skill teaches the host agent to prepare one durable run and, in Companion mode, steer or review it.
|
|
11
|
+
|
|
12
|
+
Core rule: the host agent orchestrates; FLASH executes. Do not manually implement inside the same scope while a FLASH worker is responsible for it unless the user explicitly changes the delegation.
|
|
13
|
+
|
|
14
|
+
In Companion mode, FLASH completion is not user acceptance. "Stop condition met" only means the worker stopped; the host still compares the result to the user's latest requirements and fresh verification.
|
|
15
|
+
|
|
16
|
+
## Modes
|
|
17
|
+
|
|
18
|
+
Choose exactly one mode for the run.
|
|
19
|
+
|
|
20
|
+
### Hands-Off
|
|
21
|
+
|
|
22
|
+
Use when the task is bounded, verification is clear, and the user wants one configured run to proceed without steering.
|
|
23
|
+
|
|
24
|
+
- Prepare a precise prompt with constraints, non-goals, verification, and stop condition.
|
|
25
|
+
- Launch FLASH and wait for completion.
|
|
26
|
+
- Intervene early only for hard failure, runaway scope, destructive behavior, or impossible prerequisites.
|
|
27
|
+
- Report the final FLASH status after exit.
|
|
28
|
+
|
|
29
|
+
Examples:
|
|
30
|
+
|
|
31
|
+
- English: "I'm going to bed. Use FLASH with Copilot to keep working on this branch and stop when the test suite passes."
|
|
32
|
+
- Chinese: "我要睡了。用 FLASH 接着跑这个分支,测试都过了就停。"
|
|
33
|
+
|
|
34
|
+
### Companion
|
|
35
|
+
|
|
36
|
+
Use when the task is uncertain, exploratory, design-heavy, research-heavy, or likely to need course correction.
|
|
37
|
+
|
|
38
|
+
Default to Companion when the user asks to iterate until satisfied, requests multi-round work, provides review findings, asks for design/skill/documentation improvement, or asks for supervision.
|
|
39
|
+
|
|
40
|
+
- Keep a note of original intent, branch, session id, and last known result.
|
|
41
|
+
- Poll the active FLASH process until exit or until an intervention point appears.
|
|
42
|
+
- Intervene when the worker optimizes the wrong thing, repeats failed fixes, skips requested research, drifts scope, or claims success without evidence.
|
|
43
|
+
- Treat review findings as the next acceptance criteria.
|
|
44
|
+
- Prefer a new bounded FLASH prompt over manually taking over implementation.
|
|
45
|
+
|
|
46
|
+
Examples:
|
|
47
|
+
|
|
48
|
+
- English: "Run FLASH for a few rounds on this onboarding flow. Check the diff between rounds and tighten the next prompt if it starts polishing the wrong thing."
|
|
49
|
+
- Chinese: "用 FLASH 多跑几轮这个 onboarding 流程。每轮看一下 diff,如果它开始改偏了,就收窄下一轮 prompt。"
|
|
50
|
+
|
|
51
|
+
## Launch
|
|
52
|
+
|
|
53
|
+
Check the installed CLI before relying on flags:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
flash --help
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Known shape:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
flash \
|
|
63
|
+
--agent <claude|codex|rovodev|opencode|copilot|pi|acp:<target>> \
|
|
64
|
+
--max-iterations <n> \
|
|
65
|
+
--stop-when "<observable completion condition>" \
|
|
66
|
+
--prevent-sleep on \
|
|
67
|
+
"<worker prompt>"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If FLASH has no `--model` flag, put model requirements in the worker prompt or backend config. Do not invent unsupported flags.
|
|
71
|
+
|
|
72
|
+
Before launch:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
git status --short
|
|
76
|
+
git branch --show-current
|
|
77
|
+
git log --oneline --max-count=5
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Prompt skeleton:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
Objective: <one concrete outcome>.
|
|
84
|
+
|
|
85
|
+
Use <agent/model requirement>. Work in this repo. Treat this as a long-running FLASH task.
|
|
86
|
+
|
|
87
|
+
Before coding, inspect the current repo, relevant docs, and recent commits. Preserve user changes. Do not make unrelated refactors.
|
|
88
|
+
|
|
89
|
+
After each meaningful slice, run relevant verification. If blocked, commit no fake success; leave notes with the blocker and evidence.
|
|
90
|
+
|
|
91
|
+
Stop only when: <observable completion condition>.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Steer
|
|
95
|
+
|
|
96
|
+
In Companion mode, evaluate after each iteration or meaningful output chunk:
|
|
97
|
+
|
|
98
|
+
| Signal | Action |
|
|
99
|
+
| ------------------------------------------------------------- | -------------------------------------------------------------------- |
|
|
100
|
+
| Worker found a real blocker | Stop or relaunch with blocker-specific instructions |
|
|
101
|
+
| Good partial slice | Let it continue or tighten the next stop condition |
|
|
102
|
+
| Skipped requested research | Relaunch with research as explicit first deliverable |
|
|
103
|
+
| Worker changes unrelated files | Stop and review before continuing |
|
|
104
|
+
| Worker claims success without verification | Review immediately; relaunch only with evidence-based stop condition |
|
|
105
|
+
| Reviewer finds a blocking issue or user says not satisfactory | Relaunch with that finding as the sole bounded correction |
|
|
106
|
+
|
|
107
|
+
Steering prompt:
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
Continue from the current repo state. The previous run partially succeeded: <evidence>.
|
|
111
|
+
|
|
112
|
+
Do not redo completed work. Focus only on <bounded correction>.
|
|
113
|
+
|
|
114
|
+
The issue to fix now is <specific observed issue>. Verify with <commands/checks>.
|
|
115
|
+
|
|
116
|
+
Stop only when <observable condition>.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Companion Review
|
|
120
|
+
|
|
121
|
+
Use only in Companion mode, when the host is supervising quality or deciding whether to continue with another bounded run.
|
|
122
|
+
|
|
123
|
+
1. Inspect branch, status, commits, changed files, and diff.
|
|
124
|
+
2. Read FLASH notes/logs as claims, not evidence.
|
|
125
|
+
3. Run independent verification: tests, lint, build, typecheck, manual QA, or domain-specific checks.
|
|
126
|
+
4. Compare the result to the stop condition and the user's latest feedback.
|
|
127
|
+
5. Decide: **Mergeable**, **Needs follow-up FLASH run**, or **Do not merge**.
|
|
128
|
+
|
|
129
|
+
If the result needs follow-up, continue in Companion mode instead of presenting the run as complete. Do not merge unless explicitly authorized.
|
|
130
|
+
|
|
131
|
+
## Findings
|
|
132
|
+
|
|
133
|
+
Use when the user provides findings such as "not preserved", "scope drift", "missing requirement", or "why did you stop".
|
|
134
|
+
|
|
135
|
+
1. Treat the run as Companion mode.
|
|
136
|
+
2. Convert each finding into an observable correction. Preserve severity, file/line scope, and the user's wording.
|
|
137
|
+
3. Relaunch on the same candidate branch when salvageable.
|
|
138
|
+
4. Prompt the worker to fix only the bounded finding, preserve completed valid work, verify, and stop only when the finding is no longer true.
|
|
139
|
+
5. Review again after the follow-up.
|
|
140
|
+
6. Repeat until no blocking findings remain, verification passes, or a real blocker is found.
|
|
141
|
+
|
|
142
|
+
## Morning Review
|
|
143
|
+
|
|
144
|
+
Use when the user returns with "good morning", "how did last night's run go?", or similar after a FLASH run.
|
|
145
|
+
|
|
146
|
+
Do not ask what to review first. Reconstruct state:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
git status --short
|
|
150
|
+
git branch --show-current
|
|
151
|
+
git log --oneline --decorate --max-count=20
|
|
152
|
+
pgrep -fl 'flash|claude|codex|copilot|opencode|rovodev' || true
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Inspect likely FLASH branches, notes, logs, terminal sessions, and changed files. If a FLASH process is still running, report that first.
|
|
156
|
+
|
|
157
|
+
Report mode, agent, branch, status, changes, verification, stop-condition result, quality assessment, and recommended next action. Never summarize an overnight run from memory.
|
|
158
|
+
|
|
159
|
+
## Agent
|
|
160
|
+
|
|
161
|
+
- `copilot`: explicit GitHub Copilot CLI request or local Copilot config.
|
|
162
|
+
- `codex`: repo-aware code work or review-heavy tasks.
|
|
163
|
+
- `claude`: reasoning-heavy implementation or prose-heavy planning when configured.
|
|
164
|
+
- `pi`: explicit Pi request or local Pi configuration.
|
|
165
|
+
- `opencode` / `rovodev`: explicit request or repo-specific setup.
|
|
166
|
+
- `acp:<target>`: explicit ACP target request, or when the user wants to drive a custom ACP-compatible agent through FLASH.
|
|
167
|
+
|
|
168
|
+
## Safety
|
|
169
|
+
|
|
170
|
+
- Preserve user changes. Never run destructive git commands to clean up a FLASH branch.
|
|
171
|
+
- In Companion mode, do not trust a worker's success summary without fresh verification.
|
|
172
|
+
- Keep prompts outcome-based and evidence-based.
|
|
173
|
+
- Use concrete stop conditions. Bad: "looks good". Good: "the target workflow succeeds, relevant checks pass, and no unrelated files changed."
|
|
174
|
+
- If the user is away, produce branches and a status report, not irreversible changes, unless explicitly authorized.
|