@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,24 @@
1
+ ---
2
+ name: angular-testing
3
+ description: Test Angular behavior with appropriate unit, component, and E2E boundaries.
4
+ ---
5
+
6
+ # Angular testing
7
+
8
+ Test behavior users and callers rely on.
9
+
10
+ ## Scope
11
+
12
+ Use plain unit tests for pure functions and services. Use component tests for rendered behavior,
13
+ inputs, outputs, and template interaction. Use E2E tests for routing, browser integration, and
14
+ critical user flows.
15
+
16
+ ## Coupling
17
+
18
+ Avoid tests that depend on private fields, incidental component internals, or exact template
19
+ structure unless that structure is the behavior. Prefer user-visible queries and meaningful state.
20
+
21
+ ## Modern APIs
22
+
23
+ Use current Angular testing helpers and migrations for standalone components, router tests, and
24
+ signals. Keep setup small so failures point at behavior, not ceremony.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: api-design
3
+ description: Design small explicit APIs with stable contracts and useful errors.
4
+ ---
5
+
6
+ # API design
7
+
8
+ Treat every public function, command flag, file format, and exported type as a contract.
9
+
10
+ ## Surface
11
+
12
+ Expose the smallest surface that solves the current need. Keep helpers private until a real caller
13
+ appears. Avoid making implementation details part of the contract.
14
+
15
+ ## Behavior
16
+
17
+ Make inputs, outputs, ordering, defaults, and failure modes predictable. If behavior is conditional,
18
+ name the condition directly instead of hiding it behind a vague option.
19
+
20
+ ## Compatibility
21
+
22
+ When changing an existing contract, look for callers, tests, generated artifacts, and docs. Decide
23
+ whether compatibility matters for the version you are working on, then migrate the whole surface
24
+ consistently.
25
+
26
+ ## Errors
27
+
28
+ Errors are part of the API. Give expected failures stable types or codes, clear messages, and enough
29
+ context for the caller to recover.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: api-documentation
3
+ description: Document interfaces so a caller can use them without reading the source.
4
+ ---
5
+
6
+ # API documentation
7
+
8
+ The test of interface documentation is whether someone can call it correctly on the first attempt
9
+ without opening the implementation.
10
+
11
+ ## Document the contract
12
+
13
+ State what the operation does, what it requires, what it guarantees, and what it does not promise.
14
+ Behavior a caller can rely on must be written down; everything else stays free to change.
15
+
16
+ ## Cover errors as first-class
17
+
18
+ List the failure modes, how they are signalled, and what the caller should do about each. Error
19
+ behavior is the least documented and most needed part of any interface.
20
+
21
+ ## Explain the why, not the what
22
+
23
+ Restating the signature in prose adds nothing. Explain constraints, units, ownership, lifetimes and
24
+ side effects — the things the type cannot express.
25
+
26
+ ## Generate from the source of truth
27
+
28
+ Derive reference documentation from the schema, types or annotations that define the interface.
29
+ Hand-maintained copies drift, and a drifted reference misleads with authority.
30
+
31
+ ## Version and describe changes
32
+
33
+ Say when behavior changed and what callers must do. Migration notes matter more than a changelog
34
+ entry, because they tell the reader what action to take.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: aria-patterns
3
+ description: Apply ARIA only where native semantics fall short, and keep state accurate.
4
+ ---
5
+
6
+ # ARIA patterns
7
+
8
+ ARIA changes how assistive technology reports an element. It adds no behavior, so incorrect ARIA is
9
+ worse than none.
10
+
11
+ ## Prefer native semantics
12
+
13
+ Reach for ARIA only when no native element expresses the pattern. The first rule of ARIA is not to
14
+ use ARIA when markup can do the job.
15
+
16
+ ## Keep state synchronized
17
+
18
+ Expanded, selected, checked, pressed and disabled states must update whenever the visual state
19
+ changes. Stale ARIA state describes an interface the user is no longer looking at.
20
+
21
+ ## Implement the whole pattern
22
+
23
+ A composite widget such as a menu, tab set, combobox or dialog has an expected set of roles,
24
+ relationships and keyboard interactions. Adopting the role without the behavior leaves the control
25
+ unusable.
26
+
27
+ ## Manage focus in overlays
28
+
29
+ Move focus into a dialog when it opens, keep it inside while it is open, and return it to the
30
+ trigger on close. Content behind a modal must be inert to assistive technology as well as to
31
+ pointers.
32
+
33
+ ## Announce changes sparingly
34
+
35
+ Use live regions for updates the user must know about, such as errors and completions. Announcing
36
+ everything makes the page unusable with a screen reader.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: auth-patterns
3
+ description: Separate authentication from authorization and enforce both server side.
4
+ ---
5
+
6
+ # Authentication and authorization
7
+
8
+ Authentication establishes who is calling. Authorization decides what they may do. Conflating the two
9
+ is the most common access-control defect.
10
+
11
+ ## Enforce on the server
12
+
13
+ Client-side checks are user experience, not security. Every request must be authorized independently
14
+ on the server, whatever the interface already hid.
15
+
16
+ ## Authorize the object, not just the route
17
+
18
+ Verify that the authenticated principal may act on the specific resource named in the request.
19
+ Route-level checks that skip ownership let one user read another user's data by changing an
20
+ identifier.
21
+
22
+ ## Keep sessions and tokens short
23
+
24
+ Prefer short-lived tokens with refresh over long-lived credentials. Give every session an expiry, and
25
+ support revocation for logout, password change and suspected compromise.
26
+
27
+ ## Store credentials correctly
28
+
29
+ Hash passwords with a current memory-hard algorithm and per-user salts. Never encrypt or encode them,
30
+ and never implement the primitive yourself.
31
+
32
+ ## Deny by default
33
+
34
+ New endpoints require explicit authorization rather than inheriting open access. A permission model
35
+ where forgetting a check means public access will eventually leak data.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: brainstorming
3
+ description: Clarify ambiguous feature work before committing to an implementation path.
4
+ ---
5
+
6
+ # Brainstorming
7
+
8
+ Use this before substantial ambiguous design work, not for obvious small edits.
9
+
10
+ Clarify the objective, constraints, users, architecture implications, alternatives, and acceptance
11
+ criteria. Ask only the questions that change the implementation. Once the shape is clear, summarize
12
+ the chosen direction and the tradeoffs that matter.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: branching-strategy
3
+ description: Keep branches short-lived and integrate continuously.
4
+ ---
5
+
6
+ # Branching strategy
7
+
8
+ Merge pain grows superlinearly with divergence. The most effective strategy is the one that keeps
9
+ branches short.
10
+
11
+ ## Keep branches short-lived
12
+
13
+ Aim for hours or days, not weeks. A long-running branch is an accumulating integration debt, and the
14
+ work it contains is invisible to everyone else until the end.
15
+
16
+ ## Integrate frequently
17
+
18
+ Bring changes from the main branch into yours regularly rather than resolving everything at the end.
19
+ Frequent small conflicts are trivial; one large conflict is dangerous.
20
+
21
+ ## Decouple deployment from release
22
+
23
+ Merge incomplete work behind a flag rather than holding it on a branch. Hiding unfinished features at
24
+ runtime is safer than hiding them in version control.
25
+
26
+ ## Protect the main branch
27
+
28
+ Require review and a green build before merging. The main branch must always be in a releasable
29
+ state, since that is the assumption everything else depends on.
30
+
31
+ ## Pick one convention and hold it
32
+
33
+ Whether the team rebases or merges matters far less than doing it consistently. Mixed conventions
34
+ produce confusing history and avoidable conflicts.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: ci-pipelines
3
+ description: Build pipelines that are fast, reproducible and trusted.
4
+ ---
5
+
6
+ # Continuous integration
7
+
8
+ A pipeline people wait on gets bypassed, and a pipeline people distrust gets ignored. Both failures
9
+ end with broken code in the main branch.
10
+
11
+ ## Fail fast and in order
12
+
13
+ Run the cheapest checks first: formatting, linting, types, unit tests, then slower integration and
14
+ end-to-end stages. Developers should learn about a trivial mistake in seconds.
15
+
16
+ ## Make builds reproducible
17
+
18
+ Pin tool versions and use the committed lockfile. A pipeline that passes or fails depending on when
19
+ it ran cannot be used as evidence of anything.
20
+
21
+ ## Keep it fast
22
+
23
+ Cache dependencies and parallelize independent work. Once feedback takes longer than a short break,
24
+ people stop waiting for it and start merging on hope.
25
+
26
+ ## Never tolerate a red main branch
27
+
28
+ A failing build on the main branch is the highest priority work for the team. Normalizing red builds
29
+ removes the entire value of the pipeline.
30
+
31
+ ## Gate on what matters
32
+
33
+ Enforce the checks that protect correctness and security, and keep advisory checks non-blocking. A
34
+ pipeline that blocks on style opinions trains people to skip it.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: code-quality
3
+ description: Keep code clear, local, and purposeful while changing existing systems.
4
+ ---
5
+
6
+ # Code quality
7
+
8
+ Write code that is easy to inspect and hard to misuse.
9
+
10
+ ## Local fit
11
+
12
+ Match naming, structure, and error-handling style already used nearby. A change should look like it
13
+ belongs in the module that owns it.
14
+
15
+ ## Purposeful units
16
+
17
+ Keep functions and modules small enough to understand, but do not split code just to create layers.
18
+ Each helper should name a useful idea or remove meaningful repetition.
19
+
20
+ ## Noise
21
+
22
+ Delete dead code. Avoid speculative options, unused parameters, and exports nobody needs. Comments
23
+ should explain why a choice exists, not restate what the code says.
24
+
25
+ ## Errors
26
+
27
+ Handle errors where useful context exists. Preserve the original cause when it helps debugging, and
28
+ return or throw errors with messages a caller can act on.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: code-review
3
+ description: Review meaningful changes for correctness, regressions, security, tests, and complexity.
4
+ ---
5
+
6
+ # Code review
7
+
8
+ Review the behavior first, then the shape.
9
+
10
+ ## Pass
11
+
12
+ Check requirement compliance, correctness, regressions, security and privacy risks, test coverage,
13
+ API compatibility, and unnecessary complexity. Use file and line references when reporting issues.
14
+
15
+ ## Evidence
16
+
17
+ Ground findings in code paths, observable behavior, or missing checks. Separate definite bugs from
18
+ questions and assumptions.
19
+
20
+ ## Output
21
+
22
+ Lead with actionable findings ordered by severity. Keep summaries secondary, and say clearly when
23
+ you found no issues.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: commit-hygiene
3
+ description: Make each commit a single reviewable change with a useful message.
4
+ ---
5
+
6
+ # Commit hygiene
7
+
8
+ History is read far more often than it is written — during review, bisection and incident analysis.
9
+ Optimize for those readers.
10
+
11
+ ## One logical change per commit
12
+
13
+ A commit should do one thing and leave the build working. Mixing a refactor, a fix and a formatting
14
+ pass makes review harder and makes a clean revert impossible.
15
+
16
+ ## Explain why in the message
17
+
18
+ The diff shows what changed; the message must say why. Summarize the intent in the subject and use
19
+ the body for context, tradeoffs and consequences that are not visible in the code.
20
+
21
+ ## Never commit noise
22
+
23
+ Keep generated files, dependencies, editor settings and secrets out. Anything committed once stays in
24
+ history even after deletion.
25
+
26
+ ## Separate mechanical from meaningful
27
+
28
+ Do formatting, renaming and moving in their own commits. A behavioral change hidden inside a
29
+ thousand-line reformat will not be reviewed properly.
30
+
31
+ ## Tidy before sharing
32
+
33
+ Rewriting local history to produce a coherent sequence is good practice. Rewriting history others
34
+ have pulled is not — once pushed to a shared branch, history is fixed.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: concise-output
3
+ description: Communicate technical progress and results compactly without losing important details.
4
+ ---
5
+
6
+ # Concise output
7
+
8
+ Prefer compact professional communication.
9
+
10
+ ## Keep
11
+
12
+ Keep commands, paths, failing errors, user-visible behavior changes, decisions that affect risk, and
13
+ important assumptions. Be explicit for security issues, destructive actions, ambiguous instructions,
14
+ and complex failures.
15
+
16
+ ## Cut
17
+
18
+ Remove filler, obvious narration, repeated summaries, and progress logs that do not change the
19
+ user's understanding. Do not restate the same status in multiple ways.
20
+
21
+ ## Reports
22
+
23
+ Final reports should say what changed, what was verified, and what remains unverified. Use bullets
24
+ only when they make scanning easier.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: containerization
3
+ description: Build small, reproducible and non-privileged container images.
4
+ ---
5
+
6
+ # Containerization
7
+
8
+ An image is a deployment artifact. Build it to be small, identical everywhere and safe to run.
9
+
10
+ ## Build in stages
11
+
12
+ Compile in a build stage and copy only the artifacts into a minimal runtime image. Shipping compilers
13
+ and development dependencies inflates both image size and attack surface.
14
+
15
+ ## Order layers by volatility
16
+
17
+ Put rarely changed steps such as dependency installation before frequently changed application code.
18
+ Correct ordering turns most rebuilds into cache hits.
19
+
20
+ ## Pin the base image
21
+
22
+ Reference an explicit version or digest rather than a moving tag. Rebuilding the same commit must
23
+ produce the same image, and update the base deliberately.
24
+
25
+ ## Never run as root
26
+
27
+ Create an unprivileged user and drop capabilities. A container is an isolation boundary, not a
28
+ security guarantee, and root inside makes an escape far more valuable.
29
+
30
+ ## Keep configuration and secrets outside
31
+
32
+ Inject configuration through environment or mounted files at runtime. Baking credentials into an
33
+ image publishes them to everyone who can pull it, permanently.
34
+
35
+ ## Handle signals and report health
36
+
37
+ Ensure the process receives termination signals so shutdown is graceful, and expose readiness and
38
+ liveness endpoints so orchestrators route traffic correctly.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: context-efficient-development
3
+ description: Develop with targeted discovery, narrow iteration, and complete verification.
4
+ ---
5
+
6
+ # Context-efficient development
7
+
8
+ Save context by doing the right work in the right order.
9
+
10
+ ## Discovery
11
+
12
+ Start with targeted search, then read the relevant symbol or range, then the containing module when
13
+ ownership is unclear. Open whole files when needed, not by reflex. Avoid rereading code whose role
14
+ is already understood.
15
+
16
+ ## Iteration
17
+
18
+ Run the smallest useful command while shaping a change: one test file, one package check, one build
19
+ step. Expand only when the touched surface grows.
20
+
21
+ ## Completion
22
+
23
+ Before calling work complete, run the project’s required full verification for the affected surface.
24
+ Efficiency reduces waste; it does not reduce correctness.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: data-modeling
3
+ description: Design schemas that make invalid states unrepresentable.
4
+ ---
5
+
6
+ # Data modeling
7
+
8
+ The schema outlives the application code written against it. Design it so wrong data cannot be
9
+ stored in the first place.
10
+
11
+ ## Constrain in the database
12
+
13
+ Enforce required fields, uniqueness, foreign keys and value ranges at the storage layer. Application
14
+ checks are bypassed by migrations, admin tools, background jobs and the next service.
15
+
16
+ ## Model the real relationships
17
+
18
+ Choose cardinality from the domain rather than from current convenience. Discovering that a
19
+ one-to-one is really one-to-many after data exists is among the most expensive corrections available.
20
+
21
+ ## Normalize first, denormalize on evidence
22
+
23
+ Start from a normalized model and denormalize only for a measured read pattern, accepting the
24
+ duplication cost knowingly. Premature denormalization creates inconsistency that is hard to detect.
25
+
26
+ ## Choose types precisely
27
+
28
+ Use exact numeric types for money, timezone-aware timestamps for instants, and native types for
29
+ enumerations. Storing everything as text moves validation to every consumer, forever.
30
+
31
+ ## Plan for deletion
32
+
33
+ Decide early whether records are removed or marked inactive, and how that interacts with foreign
34
+ keys, uniqueness and retention obligations. Retrofitting soft deletion touches every query.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: decision-records
3
+ description: Record significant technical decisions with their context and consequences.
4
+ ---
5
+
6
+ # Decision records
7
+
8
+ Code shows what was built. A decision record preserves why, which is the part that is otherwise lost
9
+ when people move on.
10
+
11
+ ## Record decisions that are costly to reverse
12
+
13
+ Write one for choices that shape structure: a datastore, a protocol, a boundary, a framework, a
14
+ significant dependency. Routine or easily reversed choices do not need one.
15
+
16
+ ## Capture the context
17
+
18
+ State the forces at the time — constraints, deadlines, team size, what was known and what was not. A
19
+ decision that looks wrong later is usually a decision whose context was forgotten.
20
+
21
+ ## Name the alternatives and why they lost
22
+
23
+ The options rejected carry most of the value. Without them, a future reader re-opens a question that
24
+ was already settled for good reasons.
25
+
26
+ ## State the consequences honestly
27
+
28
+ Record what the choice makes harder as well as what it makes easier. Acknowledged tradeoffs are what
29
+ let someone recognize later that the tradeoff has stopped being worth it.
30
+
31
+ ## Supersede, never rewrite
32
+
33
+ When a decision changes, write a new record that replaces the old one and leave the original intact.
34
+ The history of decisions is itself information.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: dependency-hygiene
3
+ description: Keep the dependency graph small, current and pointing one way.
4
+ ---
5
+
6
+ # Dependency hygiene
7
+
8
+ Every dependency is a commitment: to its API, its release cadence and its own dependencies.
9
+
10
+ ## Justify each addition
11
+
12
+ Prefer the standard library and existing project dependencies. Adding a package for a function you
13
+ could write in a few lines trades a small cost now for an upgrade obligation forever.
14
+
15
+ ## Keep direction one way
16
+
17
+ Module dependencies should form a directed acyclic graph. A cycle means the two modules are really
18
+ one, and it blocks testing, reuse and independent change.
19
+
20
+ ## Depend on abstractions at boundaries
21
+
22
+ Isolate third-party clients behind an interface you own so a replacement touches one place. Apply
23
+ this where the risk is real, not to every import — an indirection layer for its own sake is cost
24
+ without benefit.
25
+
26
+ ## Remove what is unused
27
+
28
+ Unused dependencies still carry vulnerabilities, install time and upgrade noise. Prune them
29
+ deliberately, since no tool will decide for you that a package is no longer wanted.
30
+
31
+ ## Watch the transitive graph
32
+
33
+ Direct dependency count understates the real surface. Review what a package brings with it before
34
+ adding it, and prefer libraries with a small, well-maintained tree.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: dependency-security
3
+ description: Vet, pin and update third-party dependencies deliberately.
4
+ ---
5
+
6
+ # Dependency security
7
+
8
+ Most code shipped in a modern application is code nobody on the team wrote. Treat adding a dependency
9
+ as a security decision.
10
+
11
+ ## Vet before adding
12
+
13
+ Check maintenance activity, release history, install footprint and transitive dependency count. A
14
+ small utility that pulls in dozens of packages costs more than writing the function yourself.
15
+
16
+ ## Pin and lock
17
+
18
+ Commit the lockfile and keep ranges narrow for anything security relevant. Reproducible installs are
19
+ what let you tell whether a change came from your code or from a dependency.
20
+
21
+ ## Update on a schedule, not in panic
22
+
23
+ Apply security patches promptly and take routine updates in small regular batches. Large infrequent
24
+ upgrades are where breakage accumulates and where an urgent patch gets stuck behind unrelated
25
+ changes.
26
+
27
+ ## Audit in CI
28
+
29
+ Fail the build on known critical vulnerabilities in the dependency tree. Review each advisory for
30
+ exploitability in your context before treating it as urgent.
31
+
32
+ ## Beware install-time execution
33
+
34
+ Post-install scripts run with your permissions on developer machines and in CI. Disable them where
35
+ the toolchain allows, and know what remains enabled.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: deployment-safety
3
+ description: Release in small increments with a fast, tested way back.
4
+ ---
5
+
6
+ # Deployment safety
7
+
8
+ The goal is not to avoid failed deployments but to make them cheap and quickly reversible.
9
+
10
+ ## Deploy small and often
11
+
12
+ Frequent small releases are safer than infrequent large ones. When a deployment contains one change,
13
+ the cause of any new problem is unambiguous.
14
+
15
+ ## Always have a way back
16
+
17
+ Know how to roll back before deploying, and test that path. A rollback procedure that has never been
18
+ exercised is an assumption, not a plan.
19
+
20
+ ## Roll out progressively
21
+
22
+ Expose new versions to a small share of traffic first and widen as signals stay healthy. Most
23
+ failures appear immediately under real traffic, which no staging environment reproduces.
24
+
25
+ ## Separate deploy from release
26
+
27
+ Ship code dark and enable it with a flag. This decouples the risk of deployment from the risk of the
28
+ feature, and makes disabling instant.
29
+
30
+ ## Watch after shipping
31
+
32
+ Monitor error rates, latency and business metrics through the rollout, with clear criteria for
33
+ aborting. A deployment is not finished when it completes; it is finished when it is verified healthy.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: e2e-testing
3
+ description: Write end-to-end tests that are few, critical and stable.
4
+ ---
5
+
6
+ # End-to-end testing
7
+
8
+ End-to-end tests are the most expensive and most fragile tests in a suite. Spend them on the
9
+ journeys that lose money or trust when they break.
10
+
11
+ ## Select ruthlessly
12
+
13
+ Cover sign-up, authentication, payment and the core workflow of the product. Do not re-test
14
+ validation rules or edge cases that unit tests already cover.
15
+
16
+ ## Wait for state, never for time
17
+
18
+ Wait for the condition that proves readiness: an element, a response, a state change. Fixed sleeps
19
+ are the primary source of both flakiness and slow suites.
20
+
21
+ ## Select elements by intent
22
+
23
+ Target roles, labels and dedicated test identifiers. Selectors built on CSS structure or generated
24
+ class names break on every refactor without any behavior changing.
25
+
26
+ ## Isolate the run
27
+
28
+ Create the data each test needs and remove it afterwards. Tests that depend on a shared seeded
29
+ environment fail unpredictably as that environment drifts.
30
+
31
+ ## Make failures diagnosable
32
+
33
+ Capture screenshots, traces and logs on failure. An end-to-end failure without artifacts costs more
34
+ to reproduce than to fix.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: engineering-principles
3
+ description: Apply maintainable software-engineering judgment to non-trivial code changes.
4
+ ---
5
+
6
+ # Engineering principles
7
+
8
+ Use these principles as judgment, not ceremony.
9
+
10
+ ## Shape
11
+
12
+ Prefer simple designs with explicit responsibilities. Keep related decisions close together, and
13
+ separate code only when the boundary is real: different reasons to change, different lifetimes, or
14
+ different owners.
15
+
16
+ Favor composition when it keeps behavior visible. Inheritance, frameworks, service containers, and
17
+ factories earn their place only when they remove concrete complexity.
18
+
19
+ ## Coupling
20
+
21
+ Minimize what modules need to know about each other. Pass the smallest data a collaborator needs,
22
+ return predictable results, and avoid leaking storage, transport, UI, or provider details through
23
+ domain APIs.
24
+
25
+ ## Correctness
26
+
27
+ Make invalid states difficult to represent. Use schemas, discriminants, required fields, and
28
+ exhaustive checks where they clarify the model. Fail explicitly when input is invalid instead of
29
+ silently repairing it.
30
+
31
+ ## Maintainability
32
+
33
+ Optimize for the next person reading the code. A small amount of duplication can be cheaper than an
34
+ abstraction that hides the important difference.