@anaclumos/taal 1.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.
Files changed (42) hide show
  1. package/.claude/settings.json +15 -0
  2. package/.github/workflows/ci.yml +28 -0
  3. package/.github/workflows/publish.yml +42 -0
  4. package/AGENTS.md +123 -0
  5. package/README.md +568 -0
  6. package/biome.jsonc +24 -0
  7. package/lefthook.yml +12 -0
  8. package/package.json +52 -0
  9. package/src/commands/collect.ts +172 -0
  10. package/src/commands/diff.ts +127 -0
  11. package/src/commands/init.ts +66 -0
  12. package/src/commands/list.ts +80 -0
  13. package/src/commands/providers.ts +46 -0
  14. package/src/commands/sync.ts +111 -0
  15. package/src/commands/validate.ts +17 -0
  16. package/src/config/env.ts +49 -0
  17. package/src/config/loader.ts +88 -0
  18. package/src/config/parser.ts +44 -0
  19. package/src/config/schema.ts +67 -0
  20. package/src/errors/index.ts +43 -0
  21. package/src/index.ts +301 -0
  22. package/src/providers/antigravity.ts +24 -0
  23. package/src/providers/base.ts +70 -0
  24. package/src/providers/claude-code.ts +12 -0
  25. package/src/providers/claude-desktop.ts +19 -0
  26. package/src/providers/codex.ts +61 -0
  27. package/src/providers/continue.ts +62 -0
  28. package/src/providers/cursor.ts +25 -0
  29. package/src/providers/index.ts +34 -0
  30. package/src/providers/opencode.ts +42 -0
  31. package/src/providers/registry.ts +74 -0
  32. package/src/providers/types.ts +99 -0
  33. package/src/providers/utils.ts +106 -0
  34. package/src/providers/windsurf.ts +50 -0
  35. package/src/providers/zed.ts +35 -0
  36. package/src/scripts/generate-schema.ts +17 -0
  37. package/src/skills/copy.ts +58 -0
  38. package/src/skills/discovery.ts +87 -0
  39. package/src/skills/validator.ts +95 -0
  40. package/src/utils/atomic-write.ts +35 -0
  41. package/src/utils/backup.ts +27 -0
  42. package/taal.schema.json +91 -0
@@ -0,0 +1,15 @@
1
+ {
2
+ "hooks": {
3
+ "PostToolUse": [
4
+ {
5
+ "matcher": "Write|Edit",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "bun x ultracite fix"
10
+ }
11
+ ]
12
+ }
13
+ ]
14
+ }
15
+ }
@@ -0,0 +1,28 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v4
15
+
16
+ - name: Setup Bun
17
+ uses: oven-sh/setup-bun@v2
18
+ with:
19
+ bun-version: latest
20
+
21
+ - name: Install dependencies
22
+ run: bun install --frozen-lockfile
23
+
24
+ - name: Run linter
25
+ run: bun x ultracite check
26
+
27
+ - name: Run tests
28
+ run: bun test
@@ -0,0 +1,42 @@
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*' # Triggers on v1.0.0, v1.2.3, etc.
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write # Required for NPM provenance
11
+
12
+ jobs:
13
+ publish:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Setup Bun
20
+ uses: oven-sh/setup-bun@v2
21
+ with:
22
+ bun-version: latest
23
+
24
+ - name: Install dependencies
25
+ run: bun install --frozen-lockfile
26
+
27
+ - name: Run tests
28
+ run: bun test
29
+
30
+ - name: Run linter
31
+ run: bun x ultracite check
32
+
33
+ - name: Setup Node.js for NPM publishing
34
+ uses: actions/setup-node@v4
35
+ with:
36
+ node-version: '20'
37
+ registry-url: 'https://registry.npmjs.org'
38
+
39
+ - name: Publish to NPM with provenance
40
+ run: npm publish --provenance --access public
41
+ env:
42
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/AGENTS.md ADDED
@@ -0,0 +1,123 @@
1
+ # Ultracite Code Standards
2
+
3
+ This project uses **Ultracite**, a zero-config preset that enforces strict code quality standards through automated formatting and linting.
4
+
5
+ ## Quick Reference
6
+
7
+ - **Format code**: `bun x ultracite fix`
8
+ - **Check for issues**: `bun x ultracite check`
9
+ - **Diagnose setup**: `bun x ultracite doctor`
10
+
11
+ Biome (the underlying engine) provides robust linting and formatting. Most issues are automatically fixable.
12
+
13
+ ---
14
+
15
+ ## Core Principles
16
+
17
+ Write code that is **accessible, performant, type-safe, and maintainable**. Focus on clarity and explicit intent over brevity.
18
+
19
+ ### Type Safety & Explicitness
20
+
21
+ - Use explicit types for function parameters and return values when they enhance clarity
22
+ - Prefer `unknown` over `any` when the type is genuinely unknown
23
+ - Use const assertions (`as const`) for immutable values and literal types
24
+ - Leverage TypeScript's type narrowing instead of type assertions
25
+ - Use meaningful variable names instead of magic numbers - extract constants with descriptive names
26
+
27
+ ### Modern JavaScript/TypeScript
28
+
29
+ - Use arrow functions for callbacks and short functions
30
+ - Prefer `for...of` loops over `.forEach()` and indexed `for` loops
31
+ - Use optional chaining (`?.`) and nullish coalescing (`??`) for safer property access
32
+ - Prefer template literals over string concatenation
33
+ - Use destructuring for object and array assignments
34
+ - Use `const` by default, `let` only when reassignment is needed, never `var`
35
+
36
+ ### Async & Promises
37
+
38
+ - Always `await` promises in async functions - don't forget to use the return value
39
+ - Use `async/await` syntax instead of promise chains for better readability
40
+ - Handle errors appropriately in async code with try-catch blocks
41
+ - Don't use async functions as Promise executors
42
+
43
+ ### React & JSX
44
+
45
+ - Use function components over class components
46
+ - Call hooks at the top level only, never conditionally
47
+ - Specify all dependencies in hook dependency arrays correctly
48
+ - Use the `key` prop for elements in iterables (prefer unique IDs over array indices)
49
+ - Nest children between opening and closing tags instead of passing as props
50
+ - Don't define components inside other components
51
+ - Use semantic HTML and ARIA attributes for accessibility:
52
+ - Provide meaningful alt text for images
53
+ - Use proper heading hierarchy
54
+ - Add labels for form inputs
55
+ - Include keyboard event handlers alongside mouse events
56
+ - Use semantic elements (`<button>`, `<nav>`, etc.) instead of divs with roles
57
+
58
+ ### Error Handling & Debugging
59
+
60
+ - Remove `console.log`, `debugger`, and `alert` statements from production code
61
+ - Throw `Error` objects with descriptive messages, not strings or other values
62
+ - Use `try-catch` blocks meaningfully - don't catch errors just to rethrow them
63
+ - Prefer early returns over nested conditionals for error cases
64
+
65
+ ### Code Organization
66
+
67
+ - Keep functions focused and under reasonable cognitive complexity limits
68
+ - Extract complex conditions into well-named boolean variables
69
+ - Use early returns to reduce nesting
70
+ - Prefer simple conditionals over nested ternary operators
71
+ - Group related code together and separate concerns
72
+
73
+ ### Security
74
+
75
+ - Add `rel="noopener"` when using `target="_blank"` on links
76
+ - Avoid `dangerouslySetInnerHTML` unless absolutely necessary
77
+ - Don't use `eval()` or assign directly to `document.cookie`
78
+ - Validate and sanitize user input
79
+
80
+ ### Performance
81
+
82
+ - Avoid spread syntax in accumulators within loops
83
+ - Use top-level regex literals instead of creating them in loops
84
+ - Prefer specific imports over namespace imports
85
+ - Avoid barrel files (index files that re-export everything)
86
+ - Use proper image components (e.g., Next.js `<Image>`) over `<img>` tags
87
+
88
+ ### Framework-Specific Guidance
89
+
90
+ **Next.js:**
91
+ - Use Next.js `<Image>` component for images
92
+ - Use `next/head` or App Router metadata API for head elements
93
+ - Use Server Components for async data fetching instead of async Client Components
94
+
95
+ **React 19+:**
96
+ - Use ref as a prop instead of `React.forwardRef`
97
+
98
+ **Solid/Svelte/Vue/Qwik:**
99
+ - Use `class` and `for` attributes (not `className` or `htmlFor`)
100
+
101
+ ---
102
+
103
+ ## Testing
104
+
105
+ - Write assertions inside `it()` or `test()` blocks
106
+ - Avoid done callbacks in async tests - use async/await instead
107
+ - Don't use `.only` or `.skip` in committed code
108
+ - Keep test suites reasonably flat - avoid excessive `describe` nesting
109
+
110
+ ## When Biome Can't Help
111
+
112
+ Biome's linter will catch most issues automatically. Focus your attention on:
113
+
114
+ 1. **Business logic correctness** - Biome can't validate your algorithms
115
+ 2. **Meaningful naming** - Use descriptive names for functions, variables, and types
116
+ 3. **Architecture decisions** - Component structure, data flow, and API design
117
+ 4. **Edge cases** - Handle boundary conditions and error states
118
+ 5. **User experience** - Accessibility, performance, and usability considerations
119
+ 6. **Documentation** - Add comments for complex logic, but prefer self-documenting code
120
+
121
+ ---
122
+
123
+ Most formatting and common issues are automatically fixed by Biome. Run `bun x ultracite fix` before committing to ensure compliance.