bun-sticky 1.0.2 → 1.0.4
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/.claude/commands/test.md +1 -1
- package/.github/workflows/ci.yml +0 -3
- package/CLAUDE.md +3 -1
- package/LICENSE +21 -0
- package/PRODUCT-SHEET.md +124 -0
- package/PUBLISH-PROTOCOL.md +5 -2
- package/README.md +9 -9
- package/index.ts +48 -10
- package/package.json +2 -2
- package/project.faf +1 -1
package/.claude/commands/test.md
CHANGED
package/.github/workflows/ci.yml
CHANGED
package/CLAUDE.md
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Fastest bun under the sum. Bun-native .faf CLI with Wolfejam slot-based scoring.
|
|
4
4
|
|
|
5
|
+
**🏆 100% Trophy** - 9/9 slots filled
|
|
6
|
+
|
|
5
7
|
## Quick Commands
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
bun test # Run WJTTC test suite (
|
|
10
|
+
bun test # Run WJTTC test suite (328 tests)
|
|
9
11
|
bun run index.ts score # Score current project
|
|
10
12
|
bun run index.ts help # Show commands
|
|
11
13
|
bun publish # Publish to npm (see PUBLISH-PROTOCOL.md)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2025 wolfejam
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/PRODUCT-SHEET.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# bun-sticky
|
|
2
|
+
|
|
3
|
+
## Fastest bun under the sum
|
|
4
|
+
|
|
5
|
+
**Bun-native FAF scoring CLI with Wolfejam slot-based scoring**
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
### Zero Dependencies
|
|
12
|
+
Pure Bun APIs only. No node_modules bloat. No supply chain risk.
|
|
13
|
+
|
|
14
|
+
### TypeScript Native
|
|
15
|
+
No build step. No transpilation. Bun runs TypeScript directly.
|
|
16
|
+
|
|
17
|
+
### Wolfejam Slot-Based Scoring
|
|
18
|
+
21 slots across 5 categories. Type-aware scoring that knows CLI differs from fullstack.
|
|
19
|
+
|
|
20
|
+
### Instant Feedback
|
|
21
|
+
Cold start <50ms. Score command <100ms. Fast enough you'll actually use it.
|
|
22
|
+
|
|
23
|
+
### Bi-Sync
|
|
24
|
+
Keep project.faf and CLAUDE.md in sync. Non-destructive - preserves your content.
|
|
25
|
+
|
|
26
|
+
### Championship Testing
|
|
27
|
+
328 tests. WJTTC certified. Full Bun test API coverage.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Commands
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
faf score # Show FAF score + tier
|
|
35
|
+
faf init myapp # Create project.faf
|
|
36
|
+
faf sync # Sync to CLAUDE.md
|
|
37
|
+
faf help # Show commands
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Tier System
|
|
43
|
+
|
|
44
|
+
| Score | Tier | Status |
|
|
45
|
+
|-------|------|--------|
|
|
46
|
+
| 100% | Trophy | Perfect |
|
|
47
|
+
| 99%+ | Gold | Exceptional |
|
|
48
|
+
| 95%+ | Silver | Excellent |
|
|
49
|
+
| 85%+ | Bronze | Production ready |
|
|
50
|
+
| 70%+ | Green | Solid |
|
|
51
|
+
| 55%+ | Yellow | Needs work |
|
|
52
|
+
| <55% | Red | Critical |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
# Specifications
|
|
57
|
+
|
|
58
|
+
## Scoring Categories
|
|
59
|
+
|
|
60
|
+
| Category | Slots | Fields |
|
|
61
|
+
|----------|-------|--------|
|
|
62
|
+
| Project | 3 | name, goal, main_language |
|
|
63
|
+
| Frontend | 4 | frontend, css_framework, ui_library, state_management |
|
|
64
|
+
| Backend | 5 | backend, api_type, runtime, database, connection |
|
|
65
|
+
| Universal | 3 | hosting, build, cicd |
|
|
66
|
+
| Human | 6 | who, what, why, where, when, how |
|
|
67
|
+
|
|
68
|
+
## Type-Aware Slot Counts
|
|
69
|
+
|
|
70
|
+
| Project Type | Applicable Slots |
|
|
71
|
+
|--------------|------------------|
|
|
72
|
+
| CLI | 9 |
|
|
73
|
+
| Library | 9 |
|
|
74
|
+
| API | 17 |
|
|
75
|
+
| Webapp | 16 |
|
|
76
|
+
| Fullstack | 21 |
|
|
77
|
+
|
|
78
|
+
## Formula
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Score = (Filled Slots / Applicable Slots) × 100
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Performance
|
|
85
|
+
|
|
86
|
+
| Metric | Target | Actual |
|
|
87
|
+
|--------|--------|--------|
|
|
88
|
+
| Cold start | <50ms | <50ms |
|
|
89
|
+
| Score command | <100ms | <100ms |
|
|
90
|
+
| Dependencies | 0 | 0 |
|
|
91
|
+
|
|
92
|
+
## Technical
|
|
93
|
+
|
|
94
|
+
| Spec | Value |
|
|
95
|
+
|------|-------|
|
|
96
|
+
| Runtime | Bun >=1.0.0 |
|
|
97
|
+
| Language | TypeScript (native) |
|
|
98
|
+
| Tests | 328 |
|
|
99
|
+
| License | MIT |
|
|
100
|
+
| Package Size | 24.4 kB |
|
|
101
|
+
|
|
102
|
+
## Installation
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# npm
|
|
106
|
+
npm install -g bun-sticky
|
|
107
|
+
|
|
108
|
+
# bunx (run directly)
|
|
109
|
+
bunx bun-sticky score
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Links
|
|
113
|
+
|
|
114
|
+
| Resource | URL |
|
|
115
|
+
|----------|-----|
|
|
116
|
+
| npm | https://npmjs.com/package/bun-sticky |
|
|
117
|
+
| GitHub | https://github.com/Wolfe-Jam/bun-sticky |
|
|
118
|
+
| FAF Ecosystem | https://faf.one |
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
*Part of the FAF ecosystem. Built for Bun. Made for Claude Code.*
|
|
123
|
+
|
|
124
|
+
**v1.0.3** | MIT License | Zero Dependencies
|
package/PUBLISH-PROTOCOL.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Pre-Publish Checklist
|
|
4
4
|
|
|
5
5
|
### 1. Code Quality
|
|
6
|
-
- [x] All
|
|
6
|
+
- [x] All 328 tests passing (`bun test`)
|
|
7
7
|
- [x] Zero TypeScript errors
|
|
8
8
|
- [x] Zero runtime dependencies
|
|
9
9
|
- [x] Pure Bun APIs only
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
### 3. Test Suite
|
|
19
19
|
```bash
|
|
20
20
|
bun test
|
|
21
|
-
# Expect:
|
|
21
|
+
# Expect: 328 pass, 0 fail
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
### 4. Manual Verification
|
|
@@ -54,6 +54,9 @@ bunx bun-sticky help
|
|
|
54
54
|
|---------|------|-------|
|
|
55
55
|
| 1.0.0 | 2024-12-22 | Initial release - Wolfejam slot-based scoring, 177 tests |
|
|
56
56
|
| 1.0.1 | 2024-12-22 | Proper publish ceremony, version consistency |
|
|
57
|
+
| 1.0.2 | 2025-12-22 | Test fixes (rounding, TIERS export, Empty tier) |
|
|
58
|
+
| 1.0.3 | 2025-12-22 | Fix sync command overwriting CLAUDE.md |
|
|
59
|
+
| 1.0.4 | 2025-12-22 | Binary renamed to `faf` for ecosystem consistency |
|
|
57
60
|
|
|
58
61
|
---
|
|
59
62
|
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Fastest bun under the sum. Zero dependencies. Pure Bun.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
|
|
6
|
+
faf score
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
```
|
|
@@ -18,7 +18,7 @@ bunx bun-sticky score
|
|
|
18
18
|
████ █▄▀ ▀▄▀ █ █
|
|
19
19
|
▀▀
|
|
20
20
|
|
|
21
|
-
🥐 Bun Sticky v1.0.
|
|
21
|
+
🥐 Bun Sticky v1.0.4 .faf CLI
|
|
22
22
|
Fastest bun under the sum.
|
|
23
23
|
|
|
24
24
|
────────────────────────────────────────────────
|
|
@@ -29,14 +29,14 @@ bunx bun-sticky score
|
|
|
29
29
|
Project ████████████ 3/3
|
|
30
30
|
Human ████████░░░░ 4/6
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
🟢 78% Green
|
|
33
33
|
Filled: 7/9 slots
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## Install
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
|
|
39
|
+
npm install -g bun-sticky
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Or run directly:
|
|
@@ -48,10 +48,10 @@ bunx bun-sticky score
|
|
|
48
48
|
## Commands
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
faf score # Show FAF score + tier
|
|
52
|
+
faf init myapp # Create project.faf
|
|
53
|
+
faf sync # Sync to CLAUDE.md
|
|
54
|
+
faf help # Show commands
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
## What is FAF?
|
|
@@ -97,7 +97,7 @@ Built for Bun's speed:
|
|
|
97
97
|
|
|
98
98
|
## Testing
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
328 tests. Championship-grade WJTTC test suite.
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
103
|
bun test
|
package/index.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { getTier } from "./lib/tier.ts";
|
|
|
20
20
|
// CONSTANTS
|
|
21
21
|
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
22
22
|
|
|
23
|
-
const VERSION = "1.0.
|
|
23
|
+
const VERSION = "1.0.4";
|
|
24
24
|
|
|
25
25
|
// Standard colors only (B/W version - color reserved for ZIG poster child)
|
|
26
26
|
const GREEN = "\x1b[32m";
|
|
@@ -61,7 +61,7 @@ async function cmdScore(): Promise<void> {
|
|
|
61
61
|
|
|
62
62
|
if (!(await file.exists())) {
|
|
63
63
|
console.log(`${RED}No project.faf found${RESET}`);
|
|
64
|
-
console.log(`${DIM}Run:
|
|
64
|
+
console.log(`${DIM}Run: faf init <name>${RESET}`);
|
|
65
65
|
process.exit(1);
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -218,7 +218,7 @@ stack:
|
|
|
218
218
|
await Bun.write("project.faf", template);
|
|
219
219
|
console.log(BANNER);
|
|
220
220
|
console.log(` ${GREEN}Created${RESET} project.faf`);
|
|
221
|
-
console.log(` ${DIM}Run:
|
|
221
|
+
console.log(` ${DIM}Run: faf score${RESET}`);
|
|
222
222
|
console.log();
|
|
223
223
|
}
|
|
224
224
|
|
|
@@ -237,20 +237,58 @@ async function cmdSync(): Promise<void> {
|
|
|
237
237
|
const result = calculateScore(faf);
|
|
238
238
|
const tier = getTier(result.score);
|
|
239
239
|
|
|
240
|
-
|
|
241
|
-
const
|
|
240
|
+
const scoreBadge = `**${tier.emoji} ${result.score}% ${tier.name}** - ${result.filled}/${result.total} slots filled`;
|
|
241
|
+
const claudeFile = Bun.file("CLAUDE.md");
|
|
242
|
+
|
|
243
|
+
if (await claudeFile.exists()) {
|
|
244
|
+
// Update existing CLAUDE.md - preserve content, update/insert score badge
|
|
245
|
+
let existing = await claudeFile.text();
|
|
246
|
+
const badgePattern = /^\*\*[🏆🥇🥈🥉🟢🟡🔴⚪🍊]\s*\d+%.*\*\*.*slots filled$/mu;
|
|
247
|
+
|
|
248
|
+
if (badgePattern.test(existing)) {
|
|
249
|
+
// Replace existing badge
|
|
250
|
+
existing = existing.replace(badgePattern, scoreBadge);
|
|
251
|
+
} else {
|
|
252
|
+
// Insert badge after first paragraph (after title + description)
|
|
253
|
+
const lines = existing.split("\n");
|
|
254
|
+
let insertIndex = 1;
|
|
255
|
+
|
|
256
|
+
// Find first empty line after title
|
|
257
|
+
for (let i = 1; i < lines.length; i++) {
|
|
258
|
+
if (lines[i].trim() === "") {
|
|
259
|
+
insertIndex = i + 1;
|
|
260
|
+
// Skip consecutive empty lines
|
|
261
|
+
while (insertIndex < lines.length && lines[insertIndex].trim() === "") {
|
|
262
|
+
insertIndex++;
|
|
263
|
+
}
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
242
267
|
|
|
243
|
-
|
|
268
|
+
// Check if next line is already a heading, insert before it
|
|
269
|
+
if (lines[insertIndex]?.startsWith("#")) {
|
|
270
|
+
lines.splice(insertIndex, 0, scoreBadge, "");
|
|
271
|
+
} else {
|
|
272
|
+
lines.splice(insertIndex, 0, "", scoreBadge);
|
|
273
|
+
}
|
|
274
|
+
existing = lines.join("\n");
|
|
275
|
+
}
|
|
244
276
|
|
|
245
|
-
|
|
277
|
+
await Bun.write("CLAUDE.md", existing);
|
|
278
|
+
} else {
|
|
279
|
+
// Create new minimal CLAUDE.md
|
|
280
|
+
const claudeMd = `# ${name}
|
|
246
281
|
|
|
247
|
-
|
|
282
|
+
${goal}
|
|
283
|
+
|
|
284
|
+
${scoreBadge}
|
|
248
285
|
|
|
249
286
|
---
|
|
250
287
|
*Synced by Bun Sticky*
|
|
251
288
|
`;
|
|
289
|
+
await Bun.write("CLAUDE.md", claudeMd);
|
|
290
|
+
}
|
|
252
291
|
|
|
253
|
-
await Bun.write("CLAUDE.md", claudeMd);
|
|
254
292
|
console.log(BANNER);
|
|
255
293
|
console.log(` ${GREEN}Synced${RESET} project.faf → CLAUDE.md`);
|
|
256
294
|
console.log();
|
|
@@ -289,7 +327,7 @@ switch (cmd) {
|
|
|
289
327
|
case "init":
|
|
290
328
|
const name = args[1];
|
|
291
329
|
if (!name) {
|
|
292
|
-
console.log(`${RED}Usage:
|
|
330
|
+
console.log(`${RED}Usage: faf init <name>${RESET}`);
|
|
293
331
|
process.exit(1);
|
|
294
332
|
}
|
|
295
333
|
await cmdInit(name);
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bun-sticky",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Fastest bun under the sum. FAF scoring CLI for Bun.",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"
|
|
8
|
+
"faf": "./index.ts"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "bun run index.ts",
|