company-skill 3.1.1 → 3.1.2

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.
@@ -8,12 +8,9 @@ const companyDir = path.join(cwd, '.company');
8
8
  const criteriaPath = path.join(companyDir, 'criteria.json');
9
9
  const goalPath = path.join(companyDir, 'GOAL.md');
10
10
  const cancelPath = path.join(companyDir, 'CANCEL');
11
- const counterPath = path.join(companyDir, '.stop-counter');
12
11
 
13
12
  // No company running
14
- if (!fs.existsSync(goalPath) && !fs.existsSync(criteriaPath)) {
15
- process.exit(0);
16
- }
13
+ if (!fs.existsSync(goalPath) && !fs.existsSync(criteriaPath)) process.exit(0);
17
14
 
18
15
  // Cancel signal
19
16
  if (fs.existsSync(cancelPath)) {
@@ -21,8 +18,6 @@ if (fs.existsSync(cancelPath)) {
21
18
  process.exit(0);
22
19
  }
23
20
 
24
- // No limit. Runs until done or user cancels (touch .company/CANCEL).
25
-
26
21
  // Check criteria
27
22
  if (fs.existsSync(criteriaPath)) {
28
23
  try {
@@ -30,24 +25,21 @@ if (fs.existsSync(criteriaPath)) {
30
25
  const all = data.criteria || [];
31
26
  const failing = all.filter(c => !c.passes || !c.evidence);
32
27
 
33
- if (all.length > 0 && failing.length === 0) {
34
- try { fs.unlinkSync(counterPath); } catch (e) {}
35
- process.exit(0); // All pass, allow stop
36
- }
28
+ if (all.length > 0 && failing.length === 0) process.exit(0);
37
29
 
38
30
  const failList = failing.map(c => c.description).join(', ');
39
31
  console.log(JSON.stringify({
40
- continue: false,
41
- message: "[COMPANY CYCLE] " + failing.length + "/" + all.length + " criteria not met: " + failList + ". Continue THINK > EXECUTE > VERIFY. Read .company/criteria.json."
32
+ decision: "block",
33
+ reason: "[COMPANY] " + failing.length + "/" + all.length + " criteria not met: " + failList + ". Continue THINK > EXECUTE > VERIFY. Read .company/criteria.json."
42
34
  }));
43
35
  process.exit(0);
44
36
  } catch (e) {
45
- process.exit(0); // Malformed, allow stop
37
+ process.exit(0);
46
38
  }
47
39
  }
48
40
 
49
41
  // No criteria but goal exists
50
42
  console.log(JSON.stringify({
51
- continue: false,
52
- message: "[COMPANY] Goal not achieved. Read .company/GOAL.md and create criteria.json, then start THINK > EXECUTE > VERIFY."
43
+ decision: "block",
44
+ reason: "[COMPANY] Goal not achieved. Read .company/GOAL.md, create criteria.json, start THINK > EXECUTE > VERIFY."
53
45
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "company-skill",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "Goal-driven multi-employee company for Claude Code. Give it a goal, it runs until done.",
5
5
  "bin": {
6
6
  "company-skill": "./bin/install.js"