@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.
Files changed (125) hide show
  1. package/.agents/skills/ado-commit/SKILL.md +2 -0
  2. package/.agents/skills/ado-create-pr/SKILL.md +2 -0
  3. package/.agents/skills/advanced-evaluation/SKILL.md +2 -0
  4. package/.agents/skills/ast-grep/SKILL.md +2 -0
  5. package/.agents/skills/bdi-mental-states/SKILL.md +2 -0
  6. package/.agents/skills/bun/SKILL.md +156 -122
  7. package/.agents/skills/context-compression/SKILL.md +2 -0
  8. package/.agents/skills/context-degradation/SKILL.md +2 -0
  9. package/.agents/skills/context-fundamentals/SKILL.md +2 -0
  10. package/.agents/skills/context-optimization/SKILL.md +2 -0
  11. package/.agents/skills/create-spec/SKILL.md +2 -0
  12. package/.agents/skills/docx/SKILL.md +2 -0
  13. package/.agents/skills/evaluation/SKILL.md +2 -0
  14. package/.agents/skills/explain-code/SKILL.md +2 -0
  15. package/.agents/skills/filesystem-context/SKILL.md +2 -0
  16. package/.agents/skills/find-skills/SKILL.md +2 -0
  17. package/.agents/skills/gh-commit/SKILL.md +2 -0
  18. package/.agents/skills/gh-create-pr/SKILL.md +2 -0
  19. package/.agents/skills/hosted-agents/SKILL.md +2 -0
  20. package/.agents/skills/impeccable/SKILL.md +117 -304
  21. package/.agents/skills/impeccable/agents/openai.yaml +4 -0
  22. package/.agents/skills/{adapt/SKILL.md → impeccable/reference/adapt.md} +2 -11
  23. package/.agents/skills/{animate/SKILL.md → impeccable/reference/animate.md} +15 -15
  24. package/.agents/skills/{audit/SKILL.md → impeccable/reference/audit.md} +8 -22
  25. package/.agents/skills/{bolder/SKILL.md → impeccable/reference/bolder.md} +9 -13
  26. package/.agents/skills/impeccable/reference/brand.md +114 -0
  27. package/.agents/skills/{clarify/SKILL.md → impeccable/reference/clarify.md} +2 -11
  28. package/.agents/skills/{colorize/SKILL.md → impeccable/reference/colorize.md} +23 -12
  29. package/.agents/skills/impeccable/reference/craft.md +152 -29
  30. package/.agents/skills/{critique/SKILL.md → impeccable/reference/critique.md} +25 -37
  31. package/.agents/skills/{delight/SKILL.md → impeccable/reference/delight.md} +9 -11
  32. package/.agents/skills/{distill/SKILL.md → impeccable/reference/distill.md} +2 -13
  33. package/.agents/skills/impeccable/reference/document.md +427 -0
  34. package/.agents/skills/impeccable/reference/extract.md +1 -1
  35. package/.agents/skills/{harden/SKILL.md → impeccable/reference/harden.md} +1 -43
  36. package/.agents/skills/{layout/SKILL.md → impeccable/reference/layout.md} +27 -11
  37. package/.agents/skills/impeccable/reference/live.md +594 -0
  38. package/.agents/skills/impeccable/reference/motion-design.md +12 -2
  39. package/.agents/skills/impeccable/reference/onboard.md +234 -0
  40. package/.agents/skills/{optimize/SKILL.md → impeccable/reference/optimize.md} +4 -12
  41. package/.agents/skills/{overdrive/SKILL.md → impeccable/reference/overdrive.md} +9 -21
  42. package/.agents/skills/{critique → impeccable}/reference/personas.md +1 -1
  43. package/.agents/skills/{polish/SKILL.md → impeccable/reference/polish.md} +31 -23
  44. package/.agents/skills/impeccable/reference/product.md +62 -0
  45. package/.agents/skills/{quieter/SKILL.md → impeccable/reference/quieter.md} +7 -11
  46. package/.agents/skills/impeccable/reference/shape.md +151 -0
  47. package/.agents/skills/impeccable/reference/teach.md +156 -0
  48. package/.agents/skills/{typeset/SKILL.md → impeccable/reference/typeset.md} +19 -11
  49. package/.agents/skills/impeccable/reference/typography.md +31 -14
  50. package/.agents/skills/impeccable/scripts/cleanup-deprecated.mjs +87 -17
  51. package/.agents/skills/impeccable/scripts/command-metadata.json +94 -0
  52. package/.agents/skills/impeccable/scripts/design-parser.mjs +820 -0
  53. package/.agents/skills/impeccable/scripts/detect-csp.mjs +198 -0
  54. package/.agents/skills/impeccable/scripts/is-generated.mjs +69 -0
  55. package/.agents/skills/impeccable/scripts/live-accept.mjs +595 -0
  56. package/.agents/skills/impeccable/scripts/live-browser.js +4781 -0
  57. package/.agents/skills/impeccable/scripts/live-inject.mjs +445 -0
  58. package/.agents/skills/impeccable/scripts/live-poll.mjs +186 -0
  59. package/.agents/skills/impeccable/scripts/live-server.mjs +694 -0
  60. package/.agents/skills/impeccable/scripts/live-wrap.mjs +571 -0
  61. package/.agents/skills/impeccable/scripts/live.mjs +247 -0
  62. package/.agents/skills/impeccable/scripts/load-context.mjs +141 -0
  63. package/.agents/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
  64. package/.agents/skills/impeccable/scripts/pin.mjs +214 -0
  65. package/.agents/skills/init/SKILL.md +2 -0
  66. package/.agents/skills/liteparse/SKILL.md +1 -0
  67. package/.agents/skills/memory-systems/SKILL.md +2 -0
  68. package/.agents/skills/multi-agent-patterns/SKILL.md +2 -0
  69. package/.agents/skills/opentui/SKILL.md +1 -0
  70. package/.agents/skills/pdf/SKILL.md +2 -0
  71. package/.agents/skills/playwright-cli/SKILL.md +51 -5
  72. package/.agents/skills/playwright-cli/references/playwright-tests.md +1 -1
  73. package/.agents/skills/playwright-cli/references/running-code.md +10 -0
  74. package/.agents/skills/playwright-cli/references/session-management.md +56 -0
  75. package/.agents/skills/playwright-cli/references/spec-driven-testing.md +305 -0
  76. package/.agents/skills/playwright-cli/references/test-generation.md +49 -3
  77. package/.agents/skills/pptx/SKILL.md +2 -0
  78. package/.agents/skills/project-development/SKILL.md +2 -0
  79. package/.agents/skills/prompt-engineer/SKILL.md +2 -0
  80. package/.agents/skills/research-codebase/SKILL.md +2 -0
  81. package/.agents/skills/ripgrep/SKILL.md +2 -0
  82. package/.agents/skills/skill-creator/LICENSE.txt +1 -1
  83. package/.agents/skills/skill-creator/SKILL.md +2 -0
  84. package/.agents/skills/sl-commit/SKILL.md +2 -0
  85. package/.agents/skills/sl-submit-diff/SKILL.md +2 -0
  86. package/.agents/skills/tdd/SKILL.md +4 -0
  87. package/.agents/skills/tool-design/SKILL.md +2 -0
  88. package/.agents/skills/typescript-advanced-types/SKILL.md +2 -1
  89. package/.agents/skills/typescript-expert/SKILL.md +7 -1
  90. package/.agents/skills/typescript-react-reviewer/SKILL.md +2 -1
  91. package/.agents/skills/workflow-creator/SKILL.md +75 -72
  92. package/.agents/skills/workflow-creator/references/session-config.md +48 -1
  93. package/.agents/skills/xlsx/SKILL.md +2 -0
  94. package/.opencode/opencode.json +4 -2
  95. package/dist/sdk/runtime/executor.d.ts +8 -0
  96. package/dist/sdk/runtime/executor.d.ts.map +1 -1
  97. package/dist/sdk/runtime/port-discovery.d.ts +71 -0
  98. package/dist/sdk/runtime/port-discovery.d.ts.map +1 -0
  99. package/dist/sdk/runtime/tmux.d.ts +10 -0
  100. package/dist/sdk/runtime/tmux.d.ts.map +1 -1
  101. package/dist/sdk/types.d.ts +1 -0
  102. package/dist/sdk/types.d.ts.map +1 -1
  103. package/dist/sdk/workflows/builtin/deep-research-codebase/opencode/index.d.ts.map +1 -1
  104. package/dist/sdk/workflows/builtin/open-claude-design/opencode/index.d.ts.map +1 -1
  105. package/dist/sdk/workflows/builtin/ralph/claude/index.d.ts.map +1 -1
  106. package/dist/sdk/workflows/builtin/ralph/copilot/index.d.ts.map +1 -1
  107. package/dist/sdk/workflows/builtin/ralph/helpers/prompts.d.ts +15 -0
  108. package/dist/sdk/workflows/builtin/ralph/helpers/prompts.d.ts.map +1 -1
  109. package/dist/sdk/workflows/builtin/ralph/opencode/index.d.ts.map +1 -1
  110. package/package.json +1 -1
  111. package/src/sdk/runtime/executor.test.ts +254 -1
  112. package/src/sdk/runtime/executor.ts +135 -89
  113. package/src/sdk/runtime/port-discovery.test.ts +573 -0
  114. package/src/sdk/runtime/port-discovery.ts +496 -0
  115. package/src/sdk/runtime/tmux.ts +16 -0
  116. package/src/sdk/types.ts +1 -0
  117. package/src/sdk/workflows/builtin/deep-research-codebase/opencode/index.ts +24 -6
  118. package/src/sdk/workflows/builtin/open-claude-design/opencode/index.ts +52 -13
  119. package/src/sdk/workflows/builtin/ralph/claude/index.ts +31 -3
  120. package/src/sdk/workflows/builtin/ralph/copilot/index.ts +16 -0
  121. package/src/sdk/workflows/builtin/ralph/helpers/prompts.ts +70 -3
  122. package/src/sdk/workflows/builtin/ralph/opencode/index.ts +50 -6
  123. package/.agents/skills/shape/SKILL.md +0 -96
  124. /package/.agents/skills/{critique → impeccable}/reference/cognitive-load.md +0 -0
  125. /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, or deploying JavaScript/TypeScript applications. Reach for Bun when you need to run scripts, install packages, bundle code, or test applications it's a drop-in replacement for Node.js with integrated package manager, test runner, and bundler.
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 an all-in-one JavaScript/TypeScript toolkit that replaces Node.js, npm, and bundlers with a single fast binary. It includes a runtime (powered by JavaScriptCore), package manager, test runner, and bundler. Key files: `bunfig.toml` (configuration), `package.json` (scripts and dependencies), `bun.lock` (lockfile). Primary CLI commands: `bun run`, `bun install`, `bun test`, `bun build`. See https://bun.com/docs for comprehensive documentation.
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
- - **Running scripts**: Execute `.js`, `.ts`, `.jsx`, `.tsx` files directly with `bun run` or `bun <file>` — no compilation step needed
19
- - **Package management**: Install dependencies with `bun install` (25x faster than npm) or add packages with `bun add`
20
- - **Testing**: Write and run Jest-compatible tests with `bun test` with TypeScript support built-in
21
- - **Bundling**: Bundle applications for browsers or servers with `bun build` or `Bun.build()` API
22
- - **HTTP servers**: Build servers with `Bun.serve()` API with native WebSocket and streaming support
23
- - **Monorepos**: Manage workspaces with `bun install --filter` and run scripts across packages
24
- - **Development**: Use watch mode (`--watch`) for live reloading during development
25
- - **Deployment**: Compile standalone executables with `bun build --compile` or deploy to Vercel, Railway, etc.
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 a file | `bun run index.ts` or `bun index.ts` |
34
- | Run a script | `bun run dev` (from package.json) |
35
- | Install dependencies | `bun install` |
36
- | Add a package | `bun add react` or `bun add -d @types/node` |
37
- | Remove a package | `bun remove react` |
38
- | Run tests | `bun test` |
39
- | Watch tests | `bun test --watch` |
40
- | Build for browser | `bun build ./index.tsx --outdir ./dist` |
41
- | Build for server | `bun build ./index.tsx --outdir ./dist --target bun` |
42
- | Watch build | `bun build ./index.tsx --outdir ./dist --watch` |
43
- | Run with watch mode | `bun --watch run index.ts` |
44
- | Execute a package | `bunx cowsay "Hello"` |
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
- linker = "hoisted" # or "isolated" for strict dependency isolation
60
- dev = true # install devDependencies
61
- optional = true # install optionalDependencies
62
- peer = true # install peerDependencies
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
- coverageThreshold = 0.9
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" # or "bun" for Bun's shell
71
- bun = true # alias node to bun in scripts
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 Type Support
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
- Bun natively transpiles and executes:
77
- - `.js`, `.jsx` JavaScript and JSX
78
- - `.ts`, `.tsx` TypeScript and TSX
79
- - `.json`, `.jsonc`, `.toml`, `.yaml` — Data files (parsed at build time)
80
- - `.html` HTML with asset bundling
81
- - `.css` CSS bundling
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
- | Scenario | Use | Why |
86
- | ------------------------ | ------------------------------------------------------- | --------------------------------------------------------------------------- |
87
- | **Package installation** | `bun install` vs `npm install` | Bun is 25x faster, uses global cache, supports workspaces |
88
- | **Linker strategy** | `--linker isolated` vs `--linker hoisted` | Isolated prevents phantom dependencies; hoisted is traditional npm behavior |
89
- | **Build target** | `--target browser` vs `--target bun` vs `--target node` | Browser for web apps, bun for server code, node for Node.js compatibility |
90
- | **Module format** | `--format esm` vs `--format cjs` | ESM is default; use CJS for CommonJS compatibility |
91
- | **Watch mode** | `--watch` vs manual restart | Use `--watch` for development; Bun uses OS-native file watchers (fast) |
92
- | **Test execution** | `--concurrent` vs sequential | Concurrent for independent tests; sequential for tests with shared state |
93
- | **Bundling** | `bun build` vs `Bun.build()` API | CLI for simple builds; API for programmatic control and in-memory bundling |
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`, `bunfig.toml`.
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
- Generates `bun.lock` lockfile. Use `--frozen-lockfile` in CI for reproducible builds.
131
+ Reads `package.json`, downloads packages, creates `bun.lock`. Much faster than npm.
112
132
 
113
- ### 3. Write Code
114
- Create `.ts`, `.tsx`, `.js`, or `.jsx` files. Bun transpiles on the fly.
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
- ### 5. Add Scripts to package.json
124
- ```json
125
- {
126
- "scripts": {
127
- "dev": "bun --watch run src/index.ts",
128
- "build": "bun build ./src/index.tsx --outdir ./dist",
129
- "test": "bun test",
130
- "start": "bun run dist/index.js"
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 dev
138
- bun run build
139
- bun run test
162
+ bun run server.ts
140
163
  ```
141
164
 
142
- ### 7. Test
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
- ### 8. Bundle for Production
179
+ ### 7. Bundle for Production
151
180
  ```bash
152
- bun build ./src/index.tsx --outdir ./dist --minify
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
- ### 9. Deploy
158
- Commit `bun.lock` to version control. In CI, use `bun ci` (equivalent to `bun install --frozen-lockfile`).
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
- - **Watch mode flag placement**: Use `bun --watch run dev`, not `bun run dev --watch`. Flags after the script name are passed to the script itself.
163
- - **Lifecycle scripts**: Bun does not execute `postinstall` scripts for security. Add packages to `trustedDependencies` in `package.json` to allow them.
164
- - **Node.js compatibility**: Bun aims for Node.js compatibility but is not 100% complete. Check `/runtime/nodejs-compat` for current status.
165
- - **TypeScript errors in Bun global**: Install `@types/bun` and configure `tsconfig.json` with `"lib": ["ESNext"]` and `"module": "Preserve"`.
166
- - **Module resolution**: Bun supports both ESM and CommonJS. Use `import` for ESM (recommended) or `require()` for CommonJS.
167
- - **Bundler is not a type checker**: Use `tsc` separately for type checking and `.d.ts` generation; `bun build` only transpiles.
168
- - **Auto-install disabled in production**: Set `install.auto = "disable"` in `bunfig.toml` for production environments.
169
- - **Phantom dependencies**: Use `--linker isolated` to prevent accidental imports of transitive dependencies.
170
- - **Environment variables**: Bun auto-loads `.env`, `.env.local`, `.env.[NODE_ENV]`. Disable with `env = false` in `bunfig.toml`.
171
- - **Minification by default for bun target**: When `target: "bun"`, identifiers are minified by default; use `minify: false` to disable.
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 ensure dependencies are locked
178
- - [ ] Run `bun test` to verify all tests pass
179
- - [ ] Run `bun run build` (or your build script) and verify output in `dist/` or configured `outdir`
180
- - [ ] Test the built output: `bun run dist/index.js` or `node dist/index.js` (if targeting Node.js)
181
- - [ ] Check `bun.lock` is committed to version control
182
- - [ ] Verify `bunfig.toml` has correct configuration for your environment (dev vs. production)
183
- - [ ] Run `bun run --filter <pattern> <script>` in monorepos to test workspace scripts
184
- - [ ] For HTTP servers, test with `curl` or browser: `curl http://localhost:3000`
185
- - [ ] For bundled apps, check bundle size: `ls -lh dist/`
186
- - [ ] Verify no console errors or warnings in test output
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
- - **Comprehensive navigation**: https://bun.com/docs/llms.txt — Full page-by-page listing for agent navigation
192
- - **Runtime documentation**: https://bun.com/docs/runtime — Execute files, scripts, and use Bun APIs
193
- - **Package manager**: https://bun.com/docs/pm/cli/install — Install, add, remove, and manage dependencies
194
- - **Test runner**: https://bun.com/docs/testWrite and run Jest-compatible tests
195
- - **Bundler**: https://bun.com/docs/bundlerBundle for browsers and servers
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: explain-code
3
3
  description: Explain code functionality in detail.
4
+ metadata:
5
+ provider: atomic
4
6
  ---
5
7
 
6
8
  # Analyze and Explain Code Functionality
@@ -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: gh-commit
3
3
  description: Create well-formatted commits with conventional commit format.
4
+ metadata:
5
+ provider: atomic
4
6
  ---
5
7
 
6
8
  # Smart Git Commit
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: gh-create-pr
3
3
  description: Commit unstaged changes, push changes, submit a pull request.
4
+ metadata:
5
+ provider: atomic
4
6
  ---
5
7
 
6
8
  # Create Pull Request
@@ -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