@bastani/atomic 0.6.5 → 0.6.6-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/.agents/skills/ado-commit/SKILL.md +2 -0
- package/.agents/skills/ado-create-pr/SKILL.md +2 -0
- package/.agents/skills/advanced-evaluation/SKILL.md +2 -0
- package/.agents/skills/ast-grep/SKILL.md +2 -0
- package/.agents/skills/bdi-mental-states/SKILL.md +2 -0
- package/.agents/skills/bun/SKILL.md +156 -122
- package/.agents/skills/context-compression/SKILL.md +2 -0
- package/.agents/skills/context-degradation/SKILL.md +2 -0
- package/.agents/skills/context-fundamentals/SKILL.md +2 -0
- package/.agents/skills/context-optimization/SKILL.md +2 -0
- package/.agents/skills/create-spec/SKILL.md +2 -0
- package/.agents/skills/docx/SKILL.md +2 -0
- package/.agents/skills/evaluation/SKILL.md +2 -0
- package/.agents/skills/explain-code/SKILL.md +2 -0
- package/.agents/skills/filesystem-context/SKILL.md +2 -0
- package/.agents/skills/find-skills/SKILL.md +2 -0
- package/.agents/skills/gh-commit/SKILL.md +2 -0
- package/.agents/skills/gh-create-pr/SKILL.md +2 -0
- package/.agents/skills/hosted-agents/SKILL.md +2 -0
- package/.agents/skills/impeccable/SKILL.md +117 -304
- package/.agents/skills/impeccable/agents/openai.yaml +4 -0
- package/.agents/skills/{adapt/SKILL.md → impeccable/reference/adapt.md} +2 -11
- package/.agents/skills/{animate/SKILL.md → impeccable/reference/animate.md} +15 -15
- package/.agents/skills/{audit/SKILL.md → impeccable/reference/audit.md} +8 -22
- package/.agents/skills/{bolder/SKILL.md → impeccable/reference/bolder.md} +9 -13
- package/.agents/skills/impeccable/reference/brand.md +114 -0
- package/.agents/skills/{clarify/SKILL.md → impeccable/reference/clarify.md} +2 -11
- package/.agents/skills/{colorize/SKILL.md → impeccable/reference/colorize.md} +23 -12
- package/.agents/skills/impeccable/reference/craft.md +152 -29
- package/.agents/skills/{critique/SKILL.md → impeccable/reference/critique.md} +25 -37
- package/.agents/skills/{delight/SKILL.md → impeccable/reference/delight.md} +9 -11
- package/.agents/skills/{distill/SKILL.md → impeccable/reference/distill.md} +2 -13
- package/.agents/skills/impeccable/reference/document.md +427 -0
- package/.agents/skills/impeccable/reference/extract.md +1 -1
- package/.agents/skills/{harden/SKILL.md → impeccable/reference/harden.md} +1 -43
- package/.agents/skills/{layout/SKILL.md → impeccable/reference/layout.md} +27 -11
- package/.agents/skills/impeccable/reference/live.md +594 -0
- package/.agents/skills/impeccable/reference/motion-design.md +12 -2
- package/.agents/skills/impeccable/reference/onboard.md +234 -0
- package/.agents/skills/{optimize/SKILL.md → impeccable/reference/optimize.md} +4 -12
- package/.agents/skills/{overdrive/SKILL.md → impeccable/reference/overdrive.md} +9 -21
- package/.agents/skills/{critique → impeccable}/reference/personas.md +1 -1
- package/.agents/skills/{polish/SKILL.md → impeccable/reference/polish.md} +31 -23
- package/.agents/skills/impeccable/reference/product.md +62 -0
- package/.agents/skills/{quieter/SKILL.md → impeccable/reference/quieter.md} +7 -11
- package/.agents/skills/impeccable/reference/shape.md +151 -0
- package/.agents/skills/impeccable/reference/teach.md +156 -0
- package/.agents/skills/{typeset/SKILL.md → impeccable/reference/typeset.md} +19 -11
- package/.agents/skills/impeccable/reference/typography.md +31 -14
- package/.agents/skills/impeccable/scripts/cleanup-deprecated.mjs +87 -17
- package/.agents/skills/impeccable/scripts/command-metadata.json +94 -0
- package/.agents/skills/impeccable/scripts/design-parser.mjs +820 -0
- package/.agents/skills/impeccable/scripts/detect-csp.mjs +198 -0
- package/.agents/skills/impeccable/scripts/is-generated.mjs +69 -0
- package/.agents/skills/impeccable/scripts/live-accept.mjs +595 -0
- package/.agents/skills/impeccable/scripts/live-browser.js +4781 -0
- package/.agents/skills/impeccable/scripts/live-inject.mjs +445 -0
- package/.agents/skills/impeccable/scripts/live-poll.mjs +186 -0
- package/.agents/skills/impeccable/scripts/live-server.mjs +694 -0
- package/.agents/skills/impeccable/scripts/live-wrap.mjs +571 -0
- package/.agents/skills/impeccable/scripts/live.mjs +247 -0
- package/.agents/skills/impeccable/scripts/load-context.mjs +141 -0
- package/.agents/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/.agents/skills/impeccable/scripts/pin.mjs +214 -0
- package/.agents/skills/init/SKILL.md +2 -0
- package/.agents/skills/liteparse/SKILL.md +1 -0
- package/.agents/skills/memory-systems/SKILL.md +2 -0
- package/.agents/skills/multi-agent-patterns/SKILL.md +2 -0
- package/.agents/skills/opentui/SKILL.md +1 -0
- package/.agents/skills/pdf/SKILL.md +2 -0
- package/.agents/skills/playwright-cli/SKILL.md +51 -5
- package/.agents/skills/playwright-cli/references/playwright-tests.md +1 -1
- package/.agents/skills/playwright-cli/references/running-code.md +10 -0
- package/.agents/skills/playwright-cli/references/session-management.md +56 -0
- package/.agents/skills/playwright-cli/references/spec-driven-testing.md +305 -0
- package/.agents/skills/playwright-cli/references/test-generation.md +49 -3
- package/.agents/skills/pptx/SKILL.md +2 -0
- package/.agents/skills/project-development/SKILL.md +2 -0
- package/.agents/skills/prompt-engineer/SKILL.md +2 -0
- package/.agents/skills/research-codebase/SKILL.md +2 -0
- package/.agents/skills/ripgrep/SKILL.md +2 -0
- package/.agents/skills/skill-creator/LICENSE.txt +1 -1
- package/.agents/skills/skill-creator/SKILL.md +2 -0
- package/.agents/skills/sl-commit/SKILL.md +2 -0
- package/.agents/skills/sl-submit-diff/SKILL.md +2 -0
- package/.agents/skills/tdd/SKILL.md +4 -0
- package/.agents/skills/tool-design/SKILL.md +2 -0
- package/.agents/skills/typescript-advanced-types/SKILL.md +2 -1
- package/.agents/skills/typescript-expert/SKILL.md +7 -1
- package/.agents/skills/typescript-react-reviewer/SKILL.md +2 -1
- package/.agents/skills/workflow-creator/SKILL.md +75 -72
- package/.agents/skills/workflow-creator/references/session-config.md +48 -1
- package/.agents/skills/xlsx/SKILL.md +2 -0
- package/.opencode/opencode.json +4 -2
- package/dist/sdk/runtime/executor.d.ts +8 -0
- package/dist/sdk/runtime/executor.d.ts.map +1 -1
- package/dist/sdk/runtime/port-discovery.d.ts +71 -0
- package/dist/sdk/runtime/port-discovery.d.ts.map +1 -0
- package/dist/sdk/runtime/tmux.d.ts +10 -0
- package/dist/sdk/runtime/tmux.d.ts.map +1 -1
- package/dist/sdk/types.d.ts +1 -0
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/deep-research-codebase/opencode/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/open-claude-design/opencode/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/ralph/claude/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/ralph/copilot/index.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/ralph/helpers/prompts.d.ts +15 -0
- package/dist/sdk/workflows/builtin/ralph/helpers/prompts.d.ts.map +1 -1
- package/dist/sdk/workflows/builtin/ralph/opencode/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/sdk/runtime/executor.test.ts +254 -1
- package/src/sdk/runtime/executor.ts +135 -89
- package/src/sdk/runtime/port-discovery.test.ts +573 -0
- package/src/sdk/runtime/port-discovery.ts +496 -0
- package/src/sdk/runtime/tmux.ts +16 -0
- package/src/sdk/types.ts +1 -0
- package/src/sdk/workflows/builtin/deep-research-codebase/opencode/index.ts +24 -6
- package/src/sdk/workflows/builtin/open-claude-design/opencode/index.ts +52 -13
- package/src/sdk/workflows/builtin/ralph/claude/index.ts +31 -3
- package/src/sdk/workflows/builtin/ralph/copilot/index.ts +16 -0
- package/src/sdk/workflows/builtin/ralph/helpers/prompts.ts +70 -3
- package/src/sdk/workflows/builtin/ralph/opencode/index.ts +50 -6
- package/.agents/skills/shape/SKILL.md +0 -96
- /package/.agents/skills/{critique → impeccable}/reference/cognitive-load.md +0 -0
- /package/.agents/skills/{critique → impeccable}/reference/heuristics-scoring.md +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ado-commit
|
|
3
3
|
description: Create well-formatted conventional commits in a repository hosted on Azure DevOps (ADO / Azure Repos). Use this whenever the user asks to commit changes and the project is on Azure DevOps — dev.azure.com, visualstudio.com, or explicit mentions of ADO, Azure Repos, or work item IDs like `AB#1234`. Automatically appends `AB#<id>` work-item trailers when the branch name or staged changes reference one, and attributes AI-assisted authorship.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# ADO Commit
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ado-create-pr
|
|
3
3
|
description: Commit, push, and open a pull request in Azure DevOps. Use whenever the user wants to open, update, or draft a PR and the project is hosted on Azure DevOps (`dev.azure.com`, `visualstudio.com`, or explicit mentions of ADO, Azure Repos, or work item IDs like `AB#1234`). Links work items to the PR, sets reviewers, and supports draft-by-default.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# ADO Create Pull Request
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: advanced-evaluation
|
|
3
3
|
description: This skill should be used when the user asks to "implement LLM-as-judge", "compare model outputs", "create evaluation rubrics", "mitigate evaluation bias", or mentions direct scoring, pairwise comparison, position bias, evaluation pipelines, or automated quality assessment. Part of the context engineering skill suite — also activates when the user mentions "context engineering" or "context-engineering" in the context of evaluating LLM output quality.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Advanced Evaluation
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ast-grep
|
|
3
3
|
description: Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for code patterns, find specific language constructs, or locate code with particular structural characteristics.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# ast-grep Code Search
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bdi-mental-states
|
|
3
3
|
description: This skill should be used when the user asks to "model agent mental states", "implement BDI architecture", "create belief-desire-intention models", "transform RDF to beliefs", "build cognitive agent", or mentions BDI ontology, mental state modeling, rational agency, or neuro-symbolic AI integration. Part of the context engineering skill suite — also activates when the user mentions "context engineering" or "context-engineering" in the context of belief-based agent reasoning.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# BDI Mental State Modeling
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Bun
|
|
3
|
-
description: Use when building, testing,
|
|
3
|
+
description: Use when building, testing, and deploying JavaScript/TypeScript applications. Reach for Bun when you need to run scripts, manage dependencies, bundle code, or test applications with a single unified tool.
|
|
4
4
|
metadata:
|
|
5
|
+
provider: atomic
|
|
5
6
|
mintlify-proj: bun
|
|
6
7
|
version: "1.0"
|
|
7
8
|
internal: true
|
|
@@ -11,86 +12,108 @@ metadata:
|
|
|
11
12
|
|
|
12
13
|
## Product Summary
|
|
13
14
|
|
|
14
|
-
Bun is
|
|
15
|
+
Bun is a unified JavaScript runtime, package manager, bundler, and test runner written in Zig. It replaces Node.js, npm, esbuild, and Jest with a single fast binary. Key files: `bunfig.toml` (configuration), `bun.lock` (lockfile), `package.json` (project metadata). Primary commands: `bun run`, `bun install`, `bun build`, `bun test`. Bun is 4x faster than Node.js on startup and 25x faster than npm for installations. Visit https://bun.com/docs for comprehensive documentation.
|
|
15
16
|
|
|
16
17
|
## When to Use
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
- **Bundling**:
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
19
|
+
Use Bun when:
|
|
20
|
+
- **Running scripts**: Execute TypeScript/JavaScript files directly without compilation steps (`bun run file.ts`)
|
|
21
|
+
- **Managing dependencies**: Install, add, remove, or update packages faster than npm/yarn/pnpm (`bun install`, `bun add`)
|
|
22
|
+
- **Bundling code**: Build JavaScript/TypeScript for browser or server targets with `bun build`
|
|
23
|
+
- **Testing**: Run Jest-compatible tests with built-in test runner (`bun test`)
|
|
24
|
+
- **Building full-stack apps**: Bundle server and client code together into single executables
|
|
25
|
+
- **Monorepo workflows**: Use workspaces and filtering to manage multiple packages
|
|
26
|
+
- **Replacing Node.js**: Run any Node.js-compatible code with better performance
|
|
27
|
+
|
|
28
|
+
Do not use Bun for: type checking (use `tsc` separately), generating type declarations, or projects requiring exact Node.js compatibility for native modules.
|
|
26
29
|
|
|
27
30
|
## Quick Reference
|
|
28
31
|
|
|
29
32
|
### Essential Commands
|
|
30
33
|
|
|
31
|
-
| Task | Command |
|
|
32
|
-
| -------------------- |
|
|
33
|
-
| Run
|
|
34
|
-
| Run
|
|
35
|
-
| Install dependencies | `bun install`
|
|
36
|
-
| Add
|
|
37
|
-
| Remove
|
|
38
|
-
| Run tests | `bun test`
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
### Configuration Files
|
|
47
|
-
|
|
48
|
-
| File | Purpose |
|
|
49
|
-
| --------------- | ------------------------------------------------------------- |
|
|
50
|
-
| `bunfig.toml` | Bun-specific configuration (optional, zero-config by default) |
|
|
51
|
-
| `package.json` | Project metadata, scripts, dependencies |
|
|
52
|
-
| `bun.lock` | Lockfile (text-based, replaces package-lock.json) |
|
|
53
|
-
| `tsconfig.json` | TypeScript configuration (Bun respects this) |
|
|
54
|
-
|
|
55
|
-
### Key bunfig.toml Sections
|
|
34
|
+
| Task | Command | Notes |
|
|
35
|
+
| -------------------- | ------------------------------------------ | -------------------------------------------------- |
|
|
36
|
+
| Run TypeScript file | `bun run file.ts` | Transpiles on-the-fly; omit `run` for short form |
|
|
37
|
+
| Run package script | `bun run dev` | Executes script from `package.json` |
|
|
38
|
+
| Install dependencies | `bun install` | Creates `bun.lock` lockfile |
|
|
39
|
+
| Add package | `bun add react` | Adds to `dependencies`; use `-d` for dev |
|
|
40
|
+
| Remove package | `bun remove react` | Removes from `package.json` and `node_modules` |
|
|
41
|
+
| Run tests | `bun test` | Finds `*.test.ts`, `*.spec.ts` files automatically |
|
|
42
|
+
| Build bundle | `bun build ./src/index.ts --outdir ./dist` | Bundles with tree-shaking, minification optional |
|
|
43
|
+
| Watch mode | `bun --watch run file.ts` | Re-runs on file changes |
|
|
44
|
+
| Create project | `bun init` | Scaffolds new project with templates |
|
|
45
|
+
|
|
46
|
+
### Configuration File: bunfig.toml
|
|
47
|
+
|
|
48
|
+
Located at project root or `~/.bunfig.toml` (global). Optional but useful for customization.
|
|
56
49
|
|
|
57
50
|
```toml
|
|
58
51
|
[install]
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
dev = true # Install devDependencies
|
|
53
|
+
optional = true # Install optionalDependencies
|
|
54
|
+
peer = true # Install peerDependencies
|
|
55
|
+
linker = "hoisted" # "hoisted" or "isolated" (pnpm-style)
|
|
56
|
+
saveTextLockfile = true # Use text bun.lock instead of binary
|
|
57
|
+
|
|
58
|
+
[serve]
|
|
59
|
+
port = 3000 # Default port for Bun.serve()
|
|
63
60
|
|
|
64
61
|
[test]
|
|
65
|
-
root = "."
|
|
66
|
-
coverage = false
|
|
67
|
-
|
|
62
|
+
root = "." # Test root directory
|
|
63
|
+
coverage = false # Enable coverage reporting
|
|
64
|
+
timeout = 5000 # Per-test timeout in ms
|
|
65
|
+
preload = ["./setup.ts"] # Scripts to run before tests
|
|
68
66
|
|
|
69
67
|
[run]
|
|
70
|
-
shell = "system"
|
|
71
|
-
bun = true
|
|
68
|
+
shell = "system" # "system" or "bun" (Windows defaults to "bun")
|
|
69
|
+
bun = true # Auto-alias node to bun in scripts
|
|
72
70
|
```
|
|
73
71
|
|
|
74
|
-
### File
|
|
72
|
+
### File Types Supported
|
|
73
|
+
|
|
74
|
+
Bun natively handles: `.js`, `.jsx`, `.ts`, `.tsx`, `.json`, `.jsonc`, `.toml`, `.yaml`, `.html`, `.css`, `.wasm`, `.node`. No configuration needed—just import and use.
|
|
75
|
+
|
|
76
|
+
### Key Bun APIs
|
|
75
77
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
| API | Purpose | Example |
|
|
79
|
+
| ---------------- | ----------------- | ------------------------------------------- |
|
|
80
|
+
| `Bun.serve()` | Start HTTP server | `Bun.serve({ port: 3000, fetch: handler })` |
|
|
81
|
+
| `Bun.file()` | Read/write files | `await Bun.file("path.txt").text()` |
|
|
82
|
+
| `Bun.write()` | Write to disk | `await Bun.write("out.txt", data)` |
|
|
83
|
+
| `Bun.build()` | Bundle code | `await Bun.build({ entrypoints, outdir })` |
|
|
84
|
+
| `Bun.Transpiler` | Transpile code | `new Bun.Transpiler({ loader: "tsx" })` |
|
|
85
|
+
| `Bun.spawn()` | Run child process | `Bun.spawn(["ls", "-la"])` |
|
|
82
86
|
|
|
83
87
|
## Decision Guidance
|
|
84
88
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
89
|
+
### When to Use Hoisted vs Isolated Linker
|
|
90
|
+
|
|
91
|
+
| Scenario | Use | Reason |
|
|
92
|
+
| ----------------------------- | ---------- | ------------------------------------------------- |
|
|
93
|
+
| New monorepo/workspaces | `isolated` | Prevents phantom dependencies, stricter isolation |
|
|
94
|
+
| New single-package project | `hoisted` | Traditional npm behavior, simpler |
|
|
95
|
+
| Existing project (pre-v1.3.2) | `hoisted` | Backward compatibility |
|
|
96
|
+
| Migrating from pnpm | `isolated` | Matches pnpm's approach |
|
|
97
|
+
|
|
98
|
+
Set in `bunfig.toml`: `linker = "isolated"` or via CLI: `bun install --linker isolated`
|
|
99
|
+
|
|
100
|
+
### When to Use bun build vs bun run
|
|
101
|
+
|
|
102
|
+
| Use Case | Tool | Why |
|
|
103
|
+
| --------------------------- | ------------------------- | ------------------------------------ |
|
|
104
|
+
| Execute TypeScript directly | `bun run` | Fast transpilation, no output files |
|
|
105
|
+
| Prepare for production | `bun build` | Minification, tree-shaking, bundling |
|
|
106
|
+
| Ship single executable | `bun build --compile` | Creates standalone binary |
|
|
107
|
+
| Development server | `bun run` + `Bun.serve()` | Hot reload, fast iteration |
|
|
108
|
+
|
|
109
|
+
### When to Use --concurrent in Tests
|
|
110
|
+
|
|
111
|
+
| Scenario | Use `--concurrent` | Reason |
|
|
112
|
+
| ----------------------- | ------------------ | --------------------------------------------- |
|
|
113
|
+
| Independent async tests | Yes | Parallel execution speeds up suite |
|
|
114
|
+
| Tests with shared state | No | Use `test.serial()` for order-dependent tests |
|
|
115
|
+
| Database/API tests | Maybe | Only if tests don't interfere |
|
|
116
|
+
| Unit tests | Yes | Usually safe and faster |
|
|
94
117
|
|
|
95
118
|
## Workflow
|
|
96
119
|
|
|
@@ -99,100 +122,111 @@ Bun natively transpiles and executes:
|
|
|
99
122
|
bun init my-app
|
|
100
123
|
cd my-app
|
|
101
124
|
```
|
|
102
|
-
Choose template: Blank, React, or Library. Creates `package.json`, `tsconfig.json`,
|
|
125
|
+
Choose template: Blank, React, or Library. Creates `package.json`, `tsconfig.json`, `.gitignore`.
|
|
103
126
|
|
|
104
127
|
### 2. Install Dependencies
|
|
105
128
|
```bash
|
|
106
129
|
bun install
|
|
107
|
-
# or add specific packages
|
|
108
|
-
bun add react
|
|
109
|
-
bun add -d @types/node typescript
|
|
110
130
|
```
|
|
111
|
-
|
|
131
|
+
Reads `package.json`, downloads packages, creates `bun.lock`. Much faster than npm.
|
|
112
132
|
|
|
113
|
-
### 3.
|
|
114
|
-
|
|
133
|
+
### 3. Add Packages
|
|
134
|
+
```bash
|
|
135
|
+
bun add react
|
|
136
|
+
bun add -d @types/react typescript
|
|
137
|
+
```
|
|
138
|
+
Updates `package.json` and `bun.lock` automatically.
|
|
115
139
|
|
|
116
|
-
### 4. Run Code
|
|
140
|
+
### 4. Write and Run Code
|
|
117
141
|
```bash
|
|
142
|
+
# Create index.ts
|
|
143
|
+
echo "console.log('Hello Bun!')" > index.ts
|
|
144
|
+
|
|
145
|
+
# Run it
|
|
118
146
|
bun run index.ts
|
|
119
|
-
# or with watch mode
|
|
120
|
-
bun --watch run index.ts
|
|
121
147
|
```
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
}
|
|
148
|
+
Bun transpiles TypeScript on-the-fly; no build step needed.
|
|
149
|
+
|
|
150
|
+
### 5. Create HTTP Server
|
|
151
|
+
```typescript
|
|
152
|
+
// server.ts
|
|
153
|
+
const server = Bun.serve({
|
|
154
|
+
port: 3000,
|
|
155
|
+
fetch(req) {
|
|
156
|
+
return new Response("Hello!");
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
console.log(`Listening on ${server.url}`);
|
|
133
160
|
```
|
|
134
|
-
|
|
135
|
-
### 6. Run Scripts
|
|
136
161
|
```bash
|
|
137
|
-
bun run
|
|
138
|
-
bun run build
|
|
139
|
-
bun run test
|
|
162
|
+
bun run server.ts
|
|
140
163
|
```
|
|
141
164
|
|
|
142
|
-
###
|
|
165
|
+
### 6. Write Tests
|
|
166
|
+
```typescript
|
|
167
|
+
// math.test.ts
|
|
168
|
+
import { test, expect } from "bun:test";
|
|
169
|
+
|
|
170
|
+
test("2 + 2 = 4", () => {
|
|
171
|
+
expect(2 + 2).toBe(4);
|
|
172
|
+
});
|
|
173
|
+
```
|
|
143
174
|
```bash
|
|
144
|
-
# Write tests in *.test.ts or *.spec.ts
|
|
145
175
|
bun test
|
|
146
|
-
bun test --watch
|
|
147
|
-
bun test --coverage
|
|
148
176
|
```
|
|
177
|
+
Finds and runs all `*.test.ts` files automatically.
|
|
149
178
|
|
|
150
|
-
###
|
|
179
|
+
### 7. Bundle for Production
|
|
151
180
|
```bash
|
|
152
|
-
bun build ./src/index.
|
|
153
|
-
# or for a server
|
|
154
|
-
bun build ./src/server.ts --outdir ./dist --target bun --minify
|
|
181
|
+
bun build ./src/index.ts --outdir ./dist --minify
|
|
155
182
|
```
|
|
183
|
+
Outputs optimized bundle to `dist/`. Use `--target browser|node|bun` to control output format.
|
|
156
184
|
|
|
157
|
-
###
|
|
158
|
-
|
|
185
|
+
### 8. Create Standalone Executable
|
|
186
|
+
```bash
|
|
187
|
+
bun build ./cli.ts --outfile mycli --compile
|
|
188
|
+
./mycli
|
|
189
|
+
```
|
|
190
|
+
Bundles code + Bun runtime into single executable; no dependencies needed.
|
|
159
191
|
|
|
160
192
|
## Common Gotchas
|
|
161
193
|
|
|
162
|
-
- **
|
|
163
|
-
-
|
|
164
|
-
- **
|
|
165
|
-
- **TypeScript errors
|
|
166
|
-
- **
|
|
167
|
-
- **
|
|
168
|
-
- **
|
|
169
|
-
- **
|
|
170
|
-
- **
|
|
171
|
-
- **
|
|
194
|
+
- **Lifecycle scripts disabled by default**: Bun doesn't run `postinstall` scripts for security. Add trusted packages to `trustedDependencies` in `package.json` to allow them.
|
|
195
|
+
- **`bun run` vs `bun <script>`**: If a built-in Bun command exists with the same name, use `bun run <script>` explicitly to run package.json scripts.
|
|
196
|
+
- **Watch mode flag placement**: Use `bun --watch run file.ts`, not `bun run file.ts --watch`. Flags after the filename are passed to the script itself.
|
|
197
|
+
- **TypeScript errors on Bun global**: Install `@types/bun` and add `"lib": ["ESNext"]` to `tsconfig.json` compilerOptions.
|
|
198
|
+
- **Lockfile format**: Bun v1.2+ uses text `bun.lock` by default (not binary `bun.lockb`). Commit to version control.
|
|
199
|
+
- **Auto-install disabled in CI**: Set `install.auto = "disable"` in `bunfig.toml` for production to prevent unexpected package downloads.
|
|
200
|
+
- **Node.js compatibility**: Bun implements most Node.js APIs but not all. Check docs for `node:` module support before relying on Node-specific code.
|
|
201
|
+
- **Bundler always bundles**: Unlike esbuild, `bun build` always bundles by default. Use `Bun.Transpiler` to transpile individual files without bundling.
|
|
202
|
+
- **No type checking in bundler**: `bun build` does not type-check. Run `tsc --noEmit` separately for type validation.
|
|
203
|
+
- **Peer dependencies installed by default**: Unlike npm, Bun installs peer dependencies automatically. Set `peer = false` in `bunfig.toml` to disable.
|
|
172
204
|
|
|
173
205
|
## Verification Checklist
|
|
174
206
|
|
|
175
207
|
Before submitting work with Bun:
|
|
176
208
|
|
|
177
|
-
- [ ] Run `bun install` to
|
|
178
|
-
- [ ] Run `bun
|
|
179
|
-
- [ ] Run `bun
|
|
180
|
-
- [ ]
|
|
181
|
-
- [ ]
|
|
182
|
-
- [ ]
|
|
183
|
-
- [ ]
|
|
184
|
-
- [ ]
|
|
185
|
-
- [ ]
|
|
186
|
-
- [ ]
|
|
187
|
-
- [ ] If using TypeScript, ensure `tsconfig.json` is properly configured
|
|
209
|
+
- [ ] Run `bun install` to verify dependencies resolve without errors
|
|
210
|
+
- [ ] Run `bun run <script>` to test main entry point
|
|
211
|
+
- [ ] Run `bun test` and verify all tests pass
|
|
212
|
+
- [ ] Run `bun build` and check output files exist in `outdir`
|
|
213
|
+
- [ ] Verify `bun.lock` is committed to version control (not `.gitignore`d)
|
|
214
|
+
- [ ] Check `bunfig.toml` for any environment-specific settings that should be removed
|
|
215
|
+
- [ ] Confirm no `node_modules` folder is committed (should be in `.gitignore`)
|
|
216
|
+
- [ ] Test with `--production` flag if building for deployment: `bun install --production`
|
|
217
|
+
- [ ] Verify TypeScript files have no type errors: `bun run tsc --noEmit` (if tsc installed)
|
|
218
|
+
- [ ] Check that `package.json` `"type": "module"` is set for ESM projects
|
|
188
219
|
|
|
189
220
|
## Resources
|
|
190
221
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
222
|
+
**Comprehensive navigation**: https://bun.com/docs/llms.txt — Page-by-page listing of all Bun documentation.
|
|
223
|
+
|
|
224
|
+
**Critical pages**:
|
|
225
|
+
1. [Bun Runtime](https://bun.com/docs/runtime) — Execute files, scripts, and manage the runtime
|
|
226
|
+
2. [Package Manager](https://bun.com/docs/pm/cli/install) — Install, add, remove packages and manage dependencies
|
|
227
|
+
3. [Bundler](https://bun.com/docs/bundler) — Bundle JavaScript/TypeScript for production
|
|
228
|
+
4. [Test Runner](https://bun.com/docs/test) — Write and run Jest-compatible tests
|
|
229
|
+
5. [bunfig.toml](https://bun.com/docs/runtime/bunfig) — Configure Bun's behavior
|
|
196
230
|
|
|
197
231
|
---
|
|
198
232
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-compression
|
|
3
3
|
description: This skill should be used when the user asks to "compress context", "summarize conversation history", "implement compaction", "reduce token usage", or mentions context compression, structured summarization, tokens-per-task optimization, or long-running agent sessions exceeding context limits. A core context engineering skill — also activates when the user mentions "context engineering" or "context-engineering" in the context of managing token budgets and session longevity.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Context Compression Strategies
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-degradation
|
|
3
3
|
description: This skill should be used when the user asks to "diagnose context problems", "fix lost-in-middle issues", "debug agent failures", "understand context poisoning", or mentions context degradation, attention patterns, context clash, context confusion, or agent performance degradation. A core context engineering skill — also activates when the user mentions "context engineering" or "context-engineering" in the context of diagnosing and mitigating context failures.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Context Degradation Patterns
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-fundamentals
|
|
3
3
|
description: The foundational context engineering skill — start here when exploring the discipline. This skill should be used when the user asks to "understand context", "explain context windows", "design agent architecture", "debug context issues", "optimize context usage", or discusses context components, attention mechanics, progressive disclosure, or context budgeting. Also activates when the user mentions "context engineering" or "context-engineering" for foundational understanding of AI agent context systems.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Context Engineering Fundamentals
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-optimization
|
|
3
3
|
description: This skill should be used when the user asks to "optimize context", "reduce token costs", "improve context efficiency", "implement KV-cache optimization", "partition context", or mentions context limits, observation masking, context budgeting, or extending effective context capacity. A core context engineering skill — also activates when the user mentions "context engineering" or "context-engineering" in the context of maximizing information density within token constraints.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Context Optimization Techniques
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-spec
|
|
3
3
|
description: Create a detailed execution plan/spec/prd for implementing features or refactors in a codebase by leveraging existing research in the codebase.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
You are tasked with creating a spec for implementing a new feature or system change in the codebase by leveraging existing research in the **$ARGUMENTS** path. If no research path is specified, use the entire `research/` directory. IMPORTANT: Research documents are located in the `research/` directory — do NOT look in the `specs/` directory for research. Follow the template below to produce a comprehensive specification as output in the `specs/` folder using the findings from RELEVANT research documents found in `research/`. The spec file MUST be named using the format `YYYY-MM-DD-topic.md` (e.g., `specs/2026-03-26-my-feature.md`), where the date is the current date and the topic is a kebab-case summary. Tip: It's good practice to use the `codebase-research-locator` and `codebase-research-analyzer` agents to help you find and analyze the research documents in the `research/` directory. It is also HIGHLY recommended to cite relevant research throughout the spec for additional context.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
name: docx
|
|
3
3
|
description: "Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation."
|
|
4
4
|
license: Proprietary. LICENSE.txt has complete terms
|
|
5
|
+
metadata:
|
|
6
|
+
provider: atomic
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
# DOCX creation, editing, and analysis
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: evaluation
|
|
3
3
|
description: This skill should be used when the user asks to "evaluate agent performance", "build test framework", "measure agent quality", "create evaluation rubrics", or mentions LLM-as-judge, multi-dimensional evaluation, agent testing, or quality gates for agent pipelines. Part of the context engineering skill suite — also activates when the user mentions "context engineering" or "context-engineering" in the context of measuring agent effectiveness.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Evaluation Methods for Agent Systems
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: filesystem-context
|
|
3
3
|
description: This skill should be used when the user asks to "offload context to files", "implement dynamic context discovery", "use filesystem for agent memory", "reduce context window bloat", or mentions file-based context management, tool output persistence, agent scratch pads, or just-in-time context loading. A core context engineering skill — also activates when the user mentions "context engineering" or "context-engineering" in the context of extending context beyond the window via filesystem strategies.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Filesystem-Based Context Engineering
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: find-skills
|
|
3
3
|
description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Find Skills
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hosted-agents
|
|
3
3
|
description: This skill should be used when the user asks to "build background agent", "create hosted coding agent", "set up sandboxed execution", "implement multiplayer agent", or mentions background agents, sandboxed VMs, agent infrastructure, Modal sandboxes, self-spawning agents, or remote coding environments. Part of the context engineering skill suite — also activates when the user mentions "context engineering" or "context-engineering" in the context of agent deployment and execution infrastructure.
|
|
4
|
+
metadata:
|
|
5
|
+
provider: atomic
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Hosted Agent Infrastructure
|