company-skill 1.0.0 → 1.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.
- package/README.md +4 -4
- package/hooks/stop-guard.js +49 -23
- package/package.json +1 -1
- package/skill/SKILL.md +51 -25
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ GOAL: "Build the auth system"
|
|
|
35
35
|
Done? Write STATUS.md, report to user.
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
No arbitrary limit. The loop runs until
|
|
38
|
+
No arbitrary limit. The loop runs until ALL criteria in `criteria.json` pass. A Stop Hook blocks Claude from exiting early. To cancel: `touch .company/CANCEL`.
|
|
39
39
|
|
|
40
40
|
## Built-In Roles
|
|
41
41
|
|
|
@@ -120,7 +120,7 @@ Employees show with colors: leads (cyan), workers (green), reviewers (yellow), d
|
|
|
120
120
|
|
|
121
121
|
| Agent | Phase | Color | Role |
|
|
122
122
|
|-------|-------|-------|------|
|
|
123
|
-
| company-lead | THINK |
|
|
123
|
+
| company-lead | THINK | Cyan | Department leads, deciding what to do |
|
|
124
124
|
| company-worker | EXECUTE | Green | Employees doing the actual work |
|
|
125
125
|
| company-reviewer | VERIFY | Yellow | Internal Reviewer, checking quality |
|
|
126
126
|
| company-critic | VERIFY | Yellow | Devil's Advocate, finding holes |
|
|
@@ -146,8 +146,6 @@ Auto-installed on first run:
|
|
|
146
146
|
| gstack | /review, /ship, /qa, /investigate, /browse, /office-hours |
|
|
147
147
|
| GSD | /gsd:plan-phase, /gsd:execute-phase, /gsd:verify-work, /gsd:debug |
|
|
148
148
|
| trailofbits | Security audit, vulnerability detection |
|
|
149
|
-
| claude-mem | Persistent memory compression across sessions |
|
|
150
|
-
| oh-my-claudecode | Team orchestration, 32 specialized employees, autopilot |
|
|
151
149
|
|
|
152
150
|
Install manually for more:
|
|
153
151
|
|
|
@@ -155,6 +153,8 @@ Install manually for more:
|
|
|
155
153
|
/plugin marketplace add obra/superpowers-marketplace
|
|
156
154
|
/plugin marketplace add wshobson/agents
|
|
157
155
|
/plugin marketplace add alirezarezvani/claude-skills
|
|
156
|
+
npm i -g claude-mem
|
|
157
|
+
npm i -g oh-my-claude-sisyphus
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
When installed, employees MUST use them. Raw tools only when no skill matches the task.
|
package/hooks/stop-guard.js
CHANGED
|
@@ -2,50 +2,76 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Stop Hook Guard for /company skill.
|
|
5
|
-
*
|
|
6
|
-
* Blocks Claude from stopping until the goal is verified done.
|
|
5
|
+
* Blocks Claude from stopping until ALL criteria in criteria.json pass.
|
|
7
6
|
* Stolen from oh-my-claudecode's persistent-mode pattern.
|
|
8
|
-
*
|
|
9
|
-
* Install: Add to settings.json hooks.Stop
|
|
10
7
|
*/
|
|
11
8
|
|
|
12
9
|
const fs = require('fs');
|
|
13
10
|
const path = require('path');
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
const criteriaPath = path.join(process.cwd(), '.company', 'criteria.json');
|
|
16
13
|
const goalPath = path.join(process.cwd(), '.company', 'GOAL.md');
|
|
17
|
-
const
|
|
14
|
+
const cancelPath = path.join(process.cwd(), '.company', 'CANCEL');
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
// No company running, allow stop
|
|
17
|
+
if (!fs.existsSync(goalPath) && !fs.existsSync(criteriaPath)) {
|
|
21
18
|
process.exit(0);
|
|
22
19
|
}
|
|
23
20
|
|
|
24
|
-
//
|
|
25
|
-
if (fs.existsSync(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
// Cancel signal, allow stop
|
|
22
|
+
if (fs.existsSync(cancelPath)) {
|
|
23
|
+
try { fs.unlinkSync(cancelPath); } catch (e) {}
|
|
24
|
+
process.exit(0);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Check criteria.json
|
|
28
|
+
if (fs.existsSync(criteriaPath)) {
|
|
29
|
+
try {
|
|
30
|
+
const data = JSON.parse(fs.readFileSync(criteriaPath, 'utf8'));
|
|
31
|
+
const all = data.criteria || [];
|
|
32
|
+
const passing = all.filter(c => c.passes === true && c.evidence);
|
|
33
|
+
const failing = all.filter(c => !c.passes || !c.evidence);
|
|
34
|
+
|
|
35
|
+
if (all.length > 0 && failing.length === 0) {
|
|
36
|
+
// All criteria pass, allow stop
|
|
37
|
+
process.exit(0);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Some criteria still failing, block stop
|
|
41
|
+
const failList = failing.map(c => `- ${c.description}`).join('\n');
|
|
42
|
+
const output = {
|
|
43
|
+
continue: false,
|
|
44
|
+
stopReason: `${failing.length}/${all.length} criteria not met. Continuing.`,
|
|
45
|
+
hookSpecificOutput: {
|
|
46
|
+
hookEventName: "Stop",
|
|
47
|
+
additionalContext: `COMPANY GOAL NOT ACHIEVED. ${failing.length} of ${all.length} criteria still failing:\n${failList}\n\nContinue the THINK > EXECUTE > VERIFY cycle. Read .company/criteria.json and the latest cycle briefing.`
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
console.log(JSON.stringify(output));
|
|
51
|
+
process.exit(0);
|
|
52
|
+
} catch (e) {
|
|
53
|
+
// criteria.json malformed, allow stop to prevent deadlock
|
|
29
54
|
process.exit(0);
|
|
30
55
|
}
|
|
31
56
|
}
|
|
32
57
|
|
|
33
|
-
//
|
|
34
|
-
const
|
|
35
|
-
if (fs.existsSync(
|
|
36
|
-
fs.
|
|
37
|
-
|
|
58
|
+
// No criteria.json but goal exists, check STATUS.md
|
|
59
|
+
const statusPath = path.join(process.cwd(), '.company', 'STATUS.md');
|
|
60
|
+
if (fs.existsSync(statusPath)) {
|
|
61
|
+
const status = fs.readFileSync(statusPath, 'utf8');
|
|
62
|
+
if (status.includes('ACHIEVED')) {
|
|
63
|
+
process.exit(0);
|
|
64
|
+
}
|
|
38
65
|
}
|
|
39
66
|
|
|
40
|
-
//
|
|
41
|
-
const goal = fs.readFileSync(goalPath, 'utf8');
|
|
67
|
+
// Default: block stop
|
|
68
|
+
const goal = fs.existsSync(goalPath) ? fs.readFileSync(goalPath, 'utf8').substring(0, 500) : 'Unknown goal';
|
|
42
69
|
const output = {
|
|
43
70
|
continue: false,
|
|
44
|
-
stopReason: "Company goal not yet achieved.
|
|
71
|
+
stopReason: "Company goal not yet achieved.",
|
|
45
72
|
hookSpecificOutput: {
|
|
46
73
|
hookEventName: "Stop",
|
|
47
|
-
additionalContext: `
|
|
74
|
+
additionalContext: `Goal not achieved. Continue cycles.\n\n${goal}`
|
|
48
75
|
}
|
|
49
76
|
};
|
|
50
|
-
|
|
51
77
|
console.log(JSON.stringify(output));
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -146,16 +146,45 @@ mkdir -p .company/cycles .company/messages .company/memory
|
|
|
146
146
|
grep -q "^\.company/" .gitignore 2>/dev/null || echo ".company/" >> .gitignore 2>/dev/null || true
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
Write `.company/GOAL.md
|
|
149
|
+
Write `.company/GOAL.md` with STRUCTURED checkable criteria (not free text):
|
|
150
150
|
```markdown
|
|
151
151
|
# Goal
|
|
152
152
|
{the user's goal}
|
|
153
153
|
|
|
154
154
|
# Success Criteria
|
|
155
|
-
|
|
155
|
+
Each criterion MUST be a yes/no checkable statement. No vague language.
|
|
156
|
+
|
|
157
|
+
- [ ] {specific measurable criterion 1}
|
|
158
|
+
- [ ] {specific measurable criterion 2}
|
|
159
|
+
- [ ] {specific measurable criterion 3}
|
|
160
|
+
|
|
161
|
+
Bad examples (REJECT these):
|
|
162
|
+
- "Code is clean" (vague)
|
|
163
|
+
- "Performance is good" (not measurable)
|
|
164
|
+
- "Implementation is complete" (not checkable)
|
|
165
|
+
|
|
166
|
+
Good examples:
|
|
167
|
+
- "Function X returns Y when given input Z"
|
|
168
|
+
- "Compression ratio > 20x measured with honest byte counting"
|
|
169
|
+
- "All tests pass with 0 failures"
|
|
170
|
+
- "README has install instructions that work on a fresh machine"
|
|
156
171
|
```
|
|
157
172
|
|
|
158
|
-
Write `.company/
|
|
173
|
+
Write `.company/criteria.json` (machine-checkable state):
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"goal": "{the user's goal}",
|
|
177
|
+
"criteria": [
|
|
178
|
+
{"id": 1, "description": "{criterion 1}", "passes": false, "evidence": null},
|
|
179
|
+
{"id": 2, "description": "{criterion 2}", "passes": false, "evidence": null},
|
|
180
|
+
{"id": 3, "description": "{criterion 3}", "passes": false, "evidence": null}
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The loop ONLY exits when ALL criteria have `"passes": true` with non-null evidence.
|
|
186
|
+
|
|
187
|
+
Write `.company/cycles/cycle-0-briefing.md` with: goal, criteria, team structure, rules, any previous state.
|
|
159
188
|
|
|
160
189
|
## Step 4: Run Loop (repeat until verified)
|
|
161
190
|
|
|
@@ -251,33 +280,30 @@ This is what makes the loop work. Launch TWO built-in reviewers:
|
|
|
251
280
|
```
|
|
252
281
|
You are the Internal Reviewer. Cycle {N} just completed.
|
|
253
282
|
|
|
254
|
-
|
|
255
|
-
SUCCESS CRITERIA: {from .company/GOAL.md}
|
|
256
|
-
|
|
257
|
-
Read ALL of these:
|
|
258
|
-
- All .company/messages/*.jsonl from this cycle
|
|
259
|
-
- All .company/{dept}/*.md employee findings
|
|
260
|
-
- Any code changes (git diff if applicable)
|
|
283
|
+
Read .company/criteria.json and ALL .company/messages/*.jsonl and .company/{dept}/*.md findings.
|
|
261
284
|
|
|
262
|
-
|
|
285
|
+
VERIFICATION RULES:
|
|
286
|
+
- For EACH criterion in criteria.json with "passes": false, check if this cycle produced evidence.
|
|
287
|
+
- Every finding MUST have a SOURCE field. REJECT any finding without one.
|
|
288
|
+
- For priority 4-5 findings, RE-RUN the experiment or RE-CHECK the source file yourself.
|
|
289
|
+
- If a number is claimed, read the actual output file that produced it.
|
|
290
|
+
- Any claim you cannot independently verify: mark UNVERIFIED.
|
|
263
291
|
|
|
264
|
-
|
|
265
|
-
-
|
|
266
|
-
-
|
|
267
|
-
- If a finding says "24x compression", verify by reading the actual experiment output file.
|
|
268
|
-
- If a finding cites a paper, verify the paper exists via WebSearch.
|
|
269
|
-
- Any claim you cannot independently verify gets marked UNVERIFIED.
|
|
292
|
+
UPDATE .company/criteria.json:
|
|
293
|
+
- For each criterion where evidence now exists, set "passes": true, fill "evidence" with proof.
|
|
294
|
+
- If no evidence, keep "passes": false.
|
|
270
295
|
|
|
271
296
|
Write to .company/cycles/cycle-{N}-review.md:
|
|
272
297
|
For each criterion:
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
FINAL VERDICT:
|
|
280
|
-
If
|
|
298
|
+
ID: {from criteria.json}
|
|
299
|
+
DESCRIPTION: {criterion}
|
|
300
|
+
PASSES: true/false
|
|
301
|
+
EVIDENCE: {file path, URL, or command output}
|
|
302
|
+
VERIFIED: YES/NO
|
|
303
|
+
|
|
304
|
+
FINAL VERDICT:
|
|
305
|
+
- If ALL criteria in criteria.json have "passes": true with non-null evidence: DONE
|
|
306
|
+
- If ANY has "passes": false: NOT DONE, list exactly what next cycle must do
|
|
281
307
|
```
|
|
282
308
|
|
|
283
309
|
**Devil's Advocate:**
|