@agentyx/core 0.1.1 → 0.3.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 (60) hide show
  1. package/README.md +28 -47
  2. package/dist/index.d.mts +396 -155
  3. package/dist/index.d.mts.map +1 -1
  4. package/dist/index.mjs +777 -226
  5. package/dist/index.mjs.map +1 -1
  6. package/package.json +1 -1
  7. package/schema/agentyx.schema.json +11 -7
  8. package/skills/angular-architecture/SKILL.md +29 -0
  9. package/skills/angular-modern/SKILL.md +12 -30
  10. package/skills/angular-signals/SKILL.md +23 -0
  11. package/skills/angular-testing/SKILL.md +24 -0
  12. package/skills/api-design/SKILL.md +29 -0
  13. package/skills/api-documentation/SKILL.md +34 -0
  14. package/skills/aria-patterns/SKILL.md +36 -0
  15. package/skills/auth-patterns/SKILL.md +35 -0
  16. package/skills/brainstorming/SKILL.md +12 -0
  17. package/skills/branching-strategy/SKILL.md +34 -0
  18. package/skills/ci-pipelines/SKILL.md +34 -0
  19. package/skills/code-quality/SKILL.md +28 -0
  20. package/skills/code-review/SKILL.md +23 -0
  21. package/skills/commit-hygiene/SKILL.md +34 -0
  22. package/skills/concise-output/SKILL.md +24 -0
  23. package/skills/containerization/SKILL.md +38 -0
  24. package/skills/context-efficient-development/SKILL.md +24 -0
  25. package/skills/data-modeling/SKILL.md +34 -0
  26. package/skills/decision-records/SKILL.md +34 -0
  27. package/skills/dependency-hygiene/SKILL.md +34 -0
  28. package/skills/dependency-security/SKILL.md +35 -0
  29. package/skills/deployment-safety/SKILL.md +33 -0
  30. package/skills/e2e-testing/SKILL.md +34 -0
  31. package/skills/engineering-principles/SKILL.md +34 -0
  32. package/skills/flaky-tests/SKILL.md +29 -0
  33. package/skills/focused-verification/SKILL.md +22 -0
  34. package/skills/incident-response/SKILL.md +34 -0
  35. package/skills/infrastructure-as-code/SKILL.md +34 -0
  36. package/skills/keyboard-navigation/SKILL.md +34 -0
  37. package/skills/legacy-code/SKILL.md +34 -0
  38. package/skills/metrics-and-tracing/SKILL.md +33 -0
  39. package/skills/parallel-work/SKILL.md +12 -0
  40. package/skills/performance-profiling/SKILL.md +34 -0
  41. package/skills/pull-requests/SKILL.md +34 -0
  42. package/skills/query-performance/SKILL.md +34 -0
  43. package/skills/refactoring-safely/SKILL.md +34 -0
  44. package/skills/requesting-code-review/SKILL.md +13 -0
  45. package/skills/schema-migrations/SKILL.md +34 -0
  46. package/skills/secrets-handling/SKILL.md +34 -0
  47. package/skills/secure-coding/SKILL.md +33 -0
  48. package/skills/semantic-html/SKILL.md +34 -0
  49. package/skills/structured-logging/SKILL.md +34 -0
  50. package/skills/subagent-driven-development/SKILL.md +13 -0
  51. package/skills/targeted-exploration/SKILL.md +24 -0
  52. package/skills/technical-writing/SKILL.md +34 -0
  53. package/skills/test-doubles/SKILL.md +30 -0
  54. package/skills/test-strategy/SKILL.md +35 -0
  55. package/skills/transactions-and-consistency/SKILL.md +34 -0
  56. package/skills/typescript-modeling/SKILL.md +23 -0
  57. package/skills/typescript-modern/SKILL.md +15 -27
  58. package/skills/typescript-strict/SKILL.md +23 -0
  59. package/skills/web-vitals/SKILL.md +34 -0
  60. package/skills/worktree-workflow/SKILL.md +12 -0
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: test-strategy
3
+ description: Choose the right test level and scope before writing tests.
4
+ ---
5
+
6
+ # Test strategy
7
+
8
+ Decide what a test is for before writing it. Most wasted test effort comes from testing at the wrong
9
+ level, not from writing tests badly.
10
+
11
+ ## Choose the level
12
+
13
+ Cover business rules and edge cases with unit tests, module boundaries and wiring with integration
14
+ tests, and only critical user journeys end to end. Push detail down: if a case can be covered one
15
+ level lower, cover it there.
16
+
17
+ ## Test behavior, not structure
18
+
19
+ Assert on observable behavior through the public interface. A test that breaks when an
20
+ implementation detail changes, while behavior stays the same, is a liability.
21
+
22
+ ## Keep tests independent
23
+
24
+ Each test sets up the state it needs and passes in any order, alone or in parallel. Shared mutable
25
+ fixtures produce failures that depend on execution order.
26
+
27
+ ## Name for the case
28
+
29
+ State the scenario and the expected outcome. A failing test name should identify the broken behavior
30
+ without opening the file.
31
+
32
+ ## Cover the boundaries
33
+
34
+ Prioritize empty input, a single element, maximum size, null and undefined, concurrent access, and
35
+ failure of every external dependency.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: transactions-and-consistency
3
+ description: Choose transaction boundaries and handle concurrent writes correctly.
4
+ ---
5
+
6
+ # Transactions and consistency
7
+
8
+ Concurrency defects are rare in testing and constant in production. Decide the boundary and the
9
+ isolation deliberately.
10
+
11
+ ## Scope transactions tightly
12
+
13
+ A transaction should cover exactly the writes that must succeed or fail together. Long transactions
14
+ hold locks and connections, and turn one slow operation into a system-wide stall.
15
+
16
+ ## Keep external calls outside
17
+
18
+ Never hold a transaction open across a network request to another service. The remote call cannot be
19
+ rolled back, and its latency becomes lock duration.
20
+
21
+ ## Know your isolation level
22
+
23
+ The default isolation of your database determines which anomalies are possible. Read-modify-write
24
+ sequences need explicit locking or a compare-and-set, because reading and then writing is not atomic.
25
+
26
+ ## Make retries safe
27
+
28
+ Give operations an idempotency key so a retried request cannot apply twice. Clients, queues and
29
+ proxies all retry, and at-least-once delivery is the normal case.
30
+
31
+ ## Prefer atomic operations to read-then-write
32
+
33
+ Let the database compute the new value in one statement instead of reading it into the application
34
+ and writing it back. That closes the window where another writer intervenes.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: typescript-modeling
3
+ description: Model TypeScript domains with unions, readonly data, satisfies, and useful generics.
4
+ ---
5
+
6
+ # TypeScript modeling
7
+
8
+ Use the type system to express relationships that matter at runtime.
9
+
10
+ ## Shapes
11
+
12
+ Choose `type` or `interface` for local semantics and ecosystem fit, not dogma. Use discriminated
13
+ unions for variants and exhaustive switches where missing cases would be a bug.
14
+
15
+ ## Contracts
16
+
17
+ Annotate exported APIs and external boundaries. Let inference handle obvious locals. Use `satisfies`
18
+ when a value should be checked against a contract without widening away useful literal information.
19
+
20
+ ## Mutability and generics
21
+
22
+ Mark data `readonly` when mutation is not part of the contract. Use generics only when they express
23
+ a real relationship between inputs and outputs; avoid type puzzles that make maintenance harder.
@@ -1,41 +1,29 @@
1
1
  ---
2
2
  name: typescript-modern
3
- description: Modern TypeScript conventions - strict types, inference, small explicit APIs.
3
+ description: Use current TypeScript module, syntax, import, and async patterns.
4
4
  ---
5
5
 
6
6
  # Modern TypeScript
7
7
 
8
- Write types that describe the domain, and let the compiler do the rest.
8
+ Use current platform and language features without making code clever.
9
9
 
10
- ## Typing
10
+ ## Modules
11
11
 
12
- Keep `strict` on and treat `any` as a defect. When a value really is unknown, type it `unknown` and
13
- narrow it — with `typeof`, `instanceof`, a discriminant check, or a validator that returns a typed
14
- result.
12
+ Prefer ESM. Use type-only imports and exports when a symbol is erased at runtime. Keep module
13
+ boundaries explicit and avoid circular dependencies.
15
14
 
16
- Annotate what forms a contract: exported functions, public fields, and the boundaries where outside
17
- data enters. Let inference handle everything else; restating an obvious type is noise that drifts
18
- out of date.
15
+ ## Syntax
19
16
 
20
- Avoid assertions. `as` and `!` silence the compiler without changing the value, so each one is an
21
- unchecked claim. Prove it with a real check instead.
17
+ Use modern syntax when it clarifies intent: optional chaining, nullish coalescing, object
18
+ destructuring, `const`, `for...of`, and `async`/`await`. Avoid transpiler-era patterns when the
19
+ runtime supports the native feature.
22
20
 
23
- ## Modelling
21
+ ## Platform
24
22
 
25
- Use discriminated unions for values that come in variants: a `kind` field plus the data that
26
- variant carries beats one wide object of optional properties, and it lets the compiler prove a
27
- `switch` is exhaustive.
23
+ Prefer native platform APIs where they are stable and already available in the project runtime. Do
24
+ not add a dependency for behavior the platform provides clearly.
28
25
 
29
- Make illegal states unrepresentable where it is cheap — required fields instead of optional ones, a
30
- union instead of two booleans, `readonly` on data that is not meant to change.
26
+ ## Async
31
27
 
32
- Derive types instead of duplicating them. When a schema or a constant already describes a shape,
33
- infer from it; two declarations of the same thing will disagree eventually.
34
-
35
- ## Modules and APIs
36
-
37
- Use ESM. Export the smallest surface callers need and keep helpers module-private — every export is
38
- a contract you have to keep.
39
-
40
- Prefer plain functions and plain objects. Classes earn their place when there is real state or
41
- identity; factories, containers, and single-implementation interfaces usually do not.
28
+ Use `async`/`await` for sequential asynchronous flow and `Promise.all` for independent work. Handle
29
+ rejections at boundaries with useful context.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: typescript-strict
3
+ description: Use TypeScript strictness, narrowing, and validation for safe boundaries.
4
+ ---
5
+
6
+ # TypeScript strictness
7
+
8
+ Keep strict mode valuable by treating escapes as design decisions.
9
+
10
+ ## Unknown data
11
+
12
+ Use `unknown` for untrusted values, then narrow with control flow, discriminants, predicates, or a
13
+ schema validator. Validate external input at the boundary before it enters domain code.
14
+
15
+ ## Avoid unsafe escapes
16
+
17
+ Avoid `any`, unsafe casts, and non-null assertions. If a value can be absent, model that possibility
18
+ and handle it. Prefer checks that prove the value exists over assertions that silence the compiler.
19
+
20
+ ## Optional semantics
21
+
22
+ When exact optional behavior matters, distinguish an omitted property from a property whose value is
23
+ `undefined`. Do not use optional fields as a substitute for a clear variant model.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: web-vitals
3
+ description: Optimize loading, interactivity and layout stability for real users.
4
+ ---
5
+
6
+ # Web performance
7
+
8
+ Perceived speed is decided by what the user sees and can do, not by total bytes.
9
+
10
+ ## Protect the critical path
11
+
12
+ Identify what must load before the page is useful and defer everything else. Render-blocking scripts
13
+ and stylesheets delay first paint more than their size suggests.
14
+
15
+ ## Ship less JavaScript
16
+
17
+ Split by route, load heavy features on demand, and remove unused dependencies. JavaScript costs
18
+ twice: once to download and again to parse and execute, and the second cost dominates on low-end
19
+ devices.
20
+
21
+ ## Reserve space for content
22
+
23
+ Give images, embeds and injected banners explicit dimensions so later loads do not move what is
24
+ already visible. Layout shift is most damaging exactly when the user is about to act.
25
+
26
+ ## Keep interactions responsive
27
+
28
+ Break long tasks, move heavy work off the main thread, and give immediate feedback to input. A
29
+ response that is visibly acknowledged tolerates far more latency than one that appears frozen.
30
+
31
+ ## Measure real users
32
+
33
+ Field data from actual devices and networks decides whether the site is fast. Lab measurements are
34
+ for diagnosis, not for judging success.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: worktree-workflow
3
+ description: Use git worktrees for isolated parallel implementation when the work warrants it.
4
+ ---
5
+
6
+ # Worktree workflow
7
+
8
+ Use worktrees when isolation reduces risk for parallel or experimental implementation.
9
+
10
+ Check repository status before creating one. Use deterministic branch and directory names tied to
11
+ the task. Keep user changes safe: never overwrite or clean files you do not own. After integration,
12
+ remove temporary worktrees only when their work is preserved and no uncommitted changes remain.