agent-lyra 0.8.0 → 0.11.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/LICENSE +21 -21
- package/README.md +320 -291
- package/bin/agent-lyra.js +51 -51
- package/bin/lyra-oss-preview.js +16 -16
- package/package.json +60 -60
- package/src/app-builder/export.js +109 -109
- package/src/app-builder/gateway.js +62 -62
- package/src/app-builder/init.js +115 -72
- package/src/app-builder/manifest-contract.js +46 -46
- package/src/app-builder/native-adapter.js +29 -29
- package/src/app-builder/preview.js +35 -31
- package/src/app-builder/publish.js +14 -14
- package/src/app-builder/saved-app.js +73 -70
- package/src/app-builder/saved-preview-browser.js +33 -33
- package/src/app-builder/saved-preview.html +24 -24
- package/src/app-builder/saved-preview.js +61 -61
- package/src/app-builder/support-manifest.js +50 -50
- package/src/app-builder/support-template/manifest.json +55 -55
- package/src/app-builder/support-template/support-preview.html +56 -56
- package/src/app-builder/support-template/support-preview.js +37 -37
- package/src/app-builder/support-template/support-preview.mjs +67 -67
- package/src/app-builder/support-template/support-workflow.mjs +36 -36
- package/src/app-builder/use.js +37 -37
- package/src/app-builder/validate.js +31 -21
- package/src/app-builder/value-schema.js +37 -37
- package/src/catalog.js +147 -147
- package/src/coding/catalog.js +56 -56
- package/src/coding/cloud-catalog.js +64 -64
- package/src/coding/detect-stack.mjs +110 -110
- package/src/coding/export.js +133 -133
- package/src/coding/setup.js +175 -175
- package/src/coding/skills/lyra-android/SKILL.md +37 -37
- package/src/coding/skills/lyra-angular/SKILL.md +37 -37
- package/src/coding/skills/lyra-cucumber/SKILL.md +37 -37
- package/src/coding/skills/lyra-dbt/SKILL.md +37 -37
- package/src/coding/skills/lyra-django/SKILL.md +37 -37
- package/src/coding/skills/lyra-docker/SKILL.md +37 -37
- package/src/coding/skills/lyra-dotnet/SKILL.md +37 -37
- package/src/coding/skills/lyra-express/SKILL.md +37 -37
- package/src/coding/skills/lyra-fastapi/SKILL.md +37 -37
- package/src/coding/skills/lyra-flutter/SKILL.md +37 -37
- package/src/coding/skills/lyra-github-actions/SKILL.md +37 -37
- package/src/coding/skills/lyra-gitlab-ci/SKILL.md +37 -37
- package/src/coding/skills/lyra-go/SKILL.md +37 -37
- package/src/coding/skills/lyra-ios/SKILL.md +37 -37
- package/src/coding/skills/lyra-kubernetes/SKILL.md +37 -37
- package/src/coding/skills/lyra-mongodb/SKILL.md +37 -37
- package/src/coding/skills/lyra-mysql/SKILL.md +37 -37
- package/src/coding/skills/lyra-nextjs/SKILL.md +37 -37
- package/src/coding/skills/lyra-node/SKILL.md +37 -37
- package/src/coding/skills/lyra-playwright/SKILL.md +37 -37
- package/src/coding/skills/lyra-postgresql/SKILL.md +37 -37
- package/src/coding/skills/lyra-python/SKILL.md +37 -37
- package/src/coding/skills/lyra-react/SKILL.md +37 -37
- package/src/coding/skills/lyra-react-native/SKILL.md +37 -37
- package/src/coding/skills/lyra-redis/SKILL.md +37 -37
- package/src/coding/skills/lyra-rust/SKILL.md +37 -37
- package/src/coding/skills/lyra-spark/SKILL.md +37 -37
- package/src/coding/skills/lyra-spring-boot/SKILL.md +37 -37
- package/src/coding/skills/lyra-svelte/SKILL.md +37 -37
- package/src/coding/skills/lyra-terraform/SKILL.md +37 -37
- package/src/coding/skills/lyra-typescript/SKILL.md +37 -37
- package/src/coding/skills/lyra-vue/SKILL.md +37 -37
- package/src/framework/agent.js +181 -181
- package/src/framework/mda.js +65 -65
- package/src/framework/run.py +111 -111
- package/src/gated/hostedAgents.js +56 -56
- package/src/gated/index.d.ts +25 -25
- package/src/gated/index.js +5 -5
- package/src/index.d.ts +2 -2
- package/src/index.js +2 -2
- package/src/init.js +963 -960
- package/src/intelligence/graphsnip-provider.d.ts +5 -5
- package/src/intelligence/graphsnip-provider.js +57 -57
- package/src/intelligence/lifecycle.js +25 -25
- package/src/memory/LICENSE +21 -21
- package/src/memory/README.md +5 -5
- package/src/memory/UPSTREAM.json +24 -24
- package/src/memory/bridge-cli.js +16 -16
- package/src/memory/bridge.js +18 -18
- package/src/memory/cli.js +21 -21
- package/src/memory/cloud-sync-actions.js +61 -61
- package/src/memory/contract.json +45 -45
- package/src/memory/index.d.ts +50 -50
- package/src/memory/index.js +7 -7
- package/src/memory/lifecycle.js +29 -29
- package/src/memory/local-cli.js +34 -34
- package/src/memory/local-store.js +209 -209
- package/src/memory/package.json +33 -33
- package/src/memory/proposals.js +90 -90
- package/src/memory/skills-cli.js +26 -26
- package/src/memory/standalone.d.ts +50 -50
- package/src/memory/standalone.js +1 -1
- package/src/memory/sync.js +89 -89
- package/src/memory/validation.js +25 -25
- package/src/onboardingAgents.js +532 -532
- package/src/promptTemplates.js +178 -178
- package/src/resource-files.js +18 -18
- package/src/runtime/contracts.d.ts +47 -47
- package/src/runtime/local-cli.js +161 -161
- package/src/runtime/mcp-stdio.js +111 -111
- package/src/runtime/orchestration.js +59 -59
- package/src/runtime/run-agent.js +54 -54
- package/src/standalone/index.d.ts +45 -45
- package/src/standalone/index.js +13 -13
- package/src/standalone/init.js +14 -12
- package/src/standalone/orchestration.js +6 -6
- package/src/standalone/rag.js +113 -113
- package/src/studio/agent-ui.css +43 -43
- package/src/studio/agent-ui.js +32 -32
- package/src/studio/browser.js +562 -345
- package/src/studio/cli-providers.js +40 -0
- package/src/studio/export.js +83 -86
- package/src/studio/index.html +74 -37
- package/src/studio/memory-actions.js +37 -37
- package/src/studio/memory-panel.js +200 -200
- package/src/studio/project.js +333 -240
- package/src/studio/pull-agent.js +72 -72
- package/src/studio/push.js +54 -54
- package/src/studio/python-agent.js +47 -47
- package/src/studio/python-agent.py +25 -25
- package/src/studio/server.js +164 -150
- package/src/studio/session.js +83 -83
- package/src/studio/studio.css +257 -10
- package/src/studio/sync.js +42 -42
- package/src/studio/workflow-editor.js +240 -0
- package/src/studio/workflow-sync.js +229 -157
- package/src/vscode/workspace.js +158 -0
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-spring-boot
|
|
3
|
-
description: "Implement Spring Boot controllers, configuration, services, persistence, and tests."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Spring Boot
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Check the Java and Spring Boot versions, build tool, MVC or WebFlux stack, Security configuration, and existing test slices.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use constructor injection and typed configuration. Keep controllers focused on validation and response mapping, and define transaction boundaries around service invariants.
|
|
15
|
-
- Reuse the application's request validation and error model. Enforce authorization for each operation and resource using the project's policy.
|
|
16
|
-
- Respect the execution model. Avoid blocking I/O on reactive execution paths, and set explicit downstream timeouts with bounded retries.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Keep secrets outside source configuration and limit exposure of management endpoints. Include structured correlation fields without logging sensitive payloads.
|
|
21
|
-
- Check migration compatibility, query behavior, and configuration precedence when changing persistence or environment behavior.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Keep public controller DTOs independent from persistence entities. Check whether interception applies when transaction or security annotations move to another method. Verify real database behavior when a test slice cannot reproduce isolation or constraints.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a controller validation change, use an MVC or WebFlux test slice for request mapping and a service integration test for transaction behavior.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run the Maven or Gradle wrapper and targeted tests. Verify application startup, configuration binding, and packaged behavior when deployment inputs change.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Spring Boot documentation](https://docs.spring.io/spring-boot/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-spring-boot
|
|
3
|
+
description: "Implement Spring Boot controllers, configuration, services, persistence, and tests."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Spring Boot
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Check the Java and Spring Boot versions, build tool, MVC or WebFlux stack, Security configuration, and existing test slices.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use constructor injection and typed configuration. Keep controllers focused on validation and response mapping, and define transaction boundaries around service invariants.
|
|
15
|
+
- Reuse the application's request validation and error model. Enforce authorization for each operation and resource using the project's policy.
|
|
16
|
+
- Respect the execution model. Avoid blocking I/O on reactive execution paths, and set explicit downstream timeouts with bounded retries.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Keep secrets outside source configuration and limit exposure of management endpoints. Include structured correlation fields without logging sensitive payloads.
|
|
21
|
+
- Check migration compatibility, query behavior, and configuration precedence when changing persistence or environment behavior.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Keep public controller DTOs independent from persistence entities. Check whether interception applies when transaction or security annotations move to another method. Verify real database behavior when a test slice cannot reproduce isolation or constraints.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a controller validation change, use an MVC or WebFlux test slice for request mapping and a service integration test for transaction behavior.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run the Maven or Gradle wrapper and targeted tests. Verify application startup, configuration binding, and packaged behavior when deployment inputs change.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Spring Boot documentation](https://docs.spring.io/spring-boot/)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-svelte
|
|
3
|
-
description: "Implement Svelte component state, bindings, effects, and SSR-compatible UI."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Svelte
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Identify the Svelte version and whether the touched component uses runes or legacy syntax. Locate SvelteKit boundaries and check when code executes on the server.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use the active reactivity model consistently. Keep derived data in derived state and reserve effects for synchronization that requires it.
|
|
15
|
-
- Place state with its owner. Guard browser-only APIs in SSR, clean up resource subscriptions, and avoid shared server state that can leak between requests.
|
|
16
|
-
- Use the framework's event and binding conventions for the installed version. Keep forms accessible with labels, error feedback, and keyboard support.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Treat raw HTML as trusted only after approved sanitization. Keep private environment variables and access controls server-side.
|
|
21
|
-
- Review keyed list identity, navigation, and hydration when changing async data. Measure generated output before performance tuning.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Use SvelteKit server-only modules, load functions, and form actions according to the version installed. Verify that serialized page data is appropriate for users to see. Keep optimistic UI updates reversible when server actions reject changes.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a component with remote options, verify that changing the selected filter renders the latest response and that unmounting releases pending work.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run the project's Svelte compiler checks and tests. Exercise interactive behavior and SSR hydration when applicable.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Svelte documentation](https://svelte.dev/docs/svelte/overview)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-svelte
|
|
3
|
+
description: "Implement Svelte component state, bindings, effects, and SSR-compatible UI."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Svelte
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Identify the Svelte version and whether the touched component uses runes or legacy syntax. Locate SvelteKit boundaries and check when code executes on the server.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use the active reactivity model consistently. Keep derived data in derived state and reserve effects for synchronization that requires it.
|
|
15
|
+
- Place state with its owner. Guard browser-only APIs in SSR, clean up resource subscriptions, and avoid shared server state that can leak between requests.
|
|
16
|
+
- Use the framework's event and binding conventions for the installed version. Keep forms accessible with labels, error feedback, and keyboard support.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Treat raw HTML as trusted only after approved sanitization. Keep private environment variables and access controls server-side.
|
|
21
|
+
- Review keyed list identity, navigation, and hydration when changing async data. Measure generated output before performance tuning.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Use SvelteKit server-only modules, load functions, and form actions according to the version installed. Verify that serialized page data is appropriate for users to see. Keep optimistic UI updates reversible when server actions reject changes.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a component with remote options, verify that changing the selected filter renders the latest response and that unmounting releases pending work.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run the project's Svelte compiler checks and tests. Exercise interactive behavior and SSR hydration when applicable.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Svelte documentation](https://svelte.dev/docs/svelte/overview)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-terraform
|
|
3
|
-
description: "Review Terraform modules, provider versions, state, and infrastructure plans."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Terraform
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Read Terraform and provider constraints, lockfile, backend, state layout, and environment conventions. Confirm the intended workspace and target before planning.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Keep reusable module inputs typed and documented. Use stable instance keys and review address moves when refactoring existing resources.
|
|
15
|
-
- Preserve state compatibility and use the approved remote backend and locking. Avoid broad targeted operations as a normal workflow.
|
|
16
|
-
- Treat plans and state as sensitive artifacts. Limit provider credentials and keep raw state and plan files out of commits and casual logs.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Inspect the plan for replacements, deletions, permission changes, and cost. Apply only under the project's established authority for the target environment.
|
|
21
|
-
- Plan dependency order, drift handling, and rollback for high-impact changes. Know which provider operations require recovery beyond reverting code.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Separate plans for unrelated environments and verify the selected backend before reading or changing state. Review provider aliases and module propagation when operating across accounts. Treat a rollback as another reviewed plan when actual infrastructure has changed.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a module rename, use reviewed address moves where appropriate and confirm the plan retains the existing resources rather than recreating them.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run fmt and validate. Review a plan in the intended environment, record important resource changes, and verify outputs only after an authorized apply.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Terraform documentation](https://developer.hashicorp.com/terraform/language)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-terraform
|
|
3
|
+
description: "Review Terraform modules, provider versions, state, and infrastructure plans."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Terraform
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Read Terraform and provider constraints, lockfile, backend, state layout, and environment conventions. Confirm the intended workspace and target before planning.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Keep reusable module inputs typed and documented. Use stable instance keys and review address moves when refactoring existing resources.
|
|
15
|
+
- Preserve state compatibility and use the approved remote backend and locking. Avoid broad targeted operations as a normal workflow.
|
|
16
|
+
- Treat plans and state as sensitive artifacts. Limit provider credentials and keep raw state and plan files out of commits and casual logs.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Inspect the plan for replacements, deletions, permission changes, and cost. Apply only under the project's established authority for the target environment.
|
|
21
|
+
- Plan dependency order, drift handling, and rollback for high-impact changes. Know which provider operations require recovery beyond reverting code.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Separate plans for unrelated environments and verify the selected backend before reading or changing state. Review provider aliases and module propagation when operating across accounts. Treat a rollback as another reviewed plan when actual infrastructure has changed.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a module rename, use reviewed address moves where appropriate and confirm the plan retains the existing resources rather than recreating them.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run fmt and validate. Review a plan in the intended environment, record important resource changes, and verify outputs only after an authorized apply.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Terraform documentation](https://developer.hashicorp.com/terraform/language)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-typescript
|
|
3
|
-
description: "Maintain TypeScript contracts and type safety at module and runtime boundaries."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# TypeScript
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Read the active tsconfig, project references, module resolution, and supported target. Identify which interfaces are public and which data originates outside the type system.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Represent unvalidated data as unknown and narrow it with runtime checks or the existing schema library. Use discriminated unions for distinct states and exhaustive checks for critical variants.
|
|
15
|
-
- Model absence deliberately. Preserve null, undefined, and omitted fields where callers distinguish them. Use generics where they retain relationships between inputs and outputs.
|
|
16
|
-
- Prefer local inference and descriptive types. Keep assertions narrow and justified. Avoid broad any, non-null assertions on external input, and disabling repository checks to satisfy the compiler.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Validate network, storage, and environment values at their boundary. Confirm serialization, platform support, and module behavior separately from static type checking.
|
|
21
|
-
- Use type-only imports where appropriate. Review emitted declarations and preserve compatibility of public signatures and package exports.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Use satisfies when checking an object against a contract while preserving its inferred shape. For public libraries, exercise consumer imports with the same module resolution modes you claim to support. Verify runtime merging or type erasure before treating a declaration change as behavior-preserving.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For API results, validate the response then represent loading, success, and failure as distinct states. Test what happens when the backend adds a field or omits a required one.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run the project's type check and tests. Verify consumer compilation and package exports for public API changes, and exercise malformed runtime values through a real entry point.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [TypeScript documentation](https://www.typescriptlang.org/docs/handbook/intro.html)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-typescript
|
|
3
|
+
description: "Maintain TypeScript contracts and type safety at module and runtime boundaries."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TypeScript
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Read the active tsconfig, project references, module resolution, and supported target. Identify which interfaces are public and which data originates outside the type system.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Represent unvalidated data as unknown and narrow it with runtime checks or the existing schema library. Use discriminated unions for distinct states and exhaustive checks for critical variants.
|
|
15
|
+
- Model absence deliberately. Preserve null, undefined, and omitted fields where callers distinguish them. Use generics where they retain relationships between inputs and outputs.
|
|
16
|
+
- Prefer local inference and descriptive types. Keep assertions narrow and justified. Avoid broad any, non-null assertions on external input, and disabling repository checks to satisfy the compiler.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Validate network, storage, and environment values at their boundary. Confirm serialization, platform support, and module behavior separately from static type checking.
|
|
21
|
+
- Use type-only imports where appropriate. Review emitted declarations and preserve compatibility of public signatures and package exports.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Use satisfies when checking an object against a contract while preserving its inferred shape. For public libraries, exercise consumer imports with the same module resolution modes you claim to support. Verify runtime merging or type erasure before treating a declaration change as behavior-preserving.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For API results, validate the response then represent loading, success, and failure as distinct states. Test what happens when the backend adds a field or omits a required one.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run the project's type check and tests. Verify consumer compilation and package exports for public API changes, and exercise malformed runtime values through a real entry point.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [TypeScript documentation](https://www.typescriptlang.org/docs/handbook/intro.html)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-vue
|
|
3
|
-
description: "Implement and review Vue components, composables, reactivity, and accessible UI."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Vue
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Check the Vue major version, Options or Composition API convention, router, state library, and SSR mode. Trace the currently owned state and emitted events.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use computed values for derived data and watchers for side effects. Declare props and emits, keep props immutable, and use stable list keys.
|
|
15
|
-
- Keep composables focused and clean up subscriptions and obsolete requests. Preserve reactivity when destructuring according to the installed version and API.
|
|
16
|
-
- Use accessible names and semantic controls. Cover keyboard, focus, and state transitions in component tests.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Treat HTML passed to v-html as a privileged output. Keep sensitive data and permission enforcement on the server. Validate inputs at the service boundary.
|
|
21
|
-
- Measure rendering and bundle costs before optimizing. Keep shared state scoped to the features that own it.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Scope watchers to the values that affect work and clean them up on invalidation where applicable. For SSR, keep mutable stores scoped to the request. Test emitted contracts directly when a parent integrates with a reusable component.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a filter panel, assert the emitted change and rendered result after a prop update, including pending and empty states.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run the project's lint, type check, and component tests. Verify hydration for SSR and route transitions when changing shared UI.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Vue documentation](https://vuejs.org/guide/best-practices/performance.html)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-vue
|
|
3
|
+
description: "Implement and review Vue components, composables, reactivity, and accessible UI."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Vue
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Check the Vue major version, Options or Composition API convention, router, state library, and SSR mode. Trace the currently owned state and emitted events.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use computed values for derived data and watchers for side effects. Declare props and emits, keep props immutable, and use stable list keys.
|
|
15
|
+
- Keep composables focused and clean up subscriptions and obsolete requests. Preserve reactivity when destructuring according to the installed version and API.
|
|
16
|
+
- Use accessible names and semantic controls. Cover keyboard, focus, and state transitions in component tests.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Treat HTML passed to v-html as a privileged output. Keep sensitive data and permission enforcement on the server. Validate inputs at the service boundary.
|
|
21
|
+
- Measure rendering and bundle costs before optimizing. Keep shared state scoped to the features that own it.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Scope watchers to the values that affect work and clean them up on invalidation where applicable. For SSR, keep mutable stores scoped to the request. Test emitted contracts directly when a parent integrates with a reusable component.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a filter panel, assert the emitted change and rendered result after a prop update, including pending and empty states.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run the project's lint, type check, and component tests. Verify hydration for SSR and route transitions when changing shared UI.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Vue documentation](https://vuejs.org/guide/best-practices/performance.html)
|