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-gitlab-ci
|
|
3
|
-
description: "Implement and review GitLab pipelines, rules, runner boundaries, and deployment jobs."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# GitLab CI
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Read includes, workflow rules, job rules, runner tags, protected refs, and environment approvals. Determine which pipeline types should run each job.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use workflow and job rules to avoid duplicate pipelines. Declare job dependencies explicitly and transfer only the necessary artifacts.
|
|
15
|
-
- Separate merge-request verification from publishing and deployment. Use least-privilege job tokens and keep protected secrets restricted to approved jobs and refs.
|
|
16
|
-
- Avoid interpolating untrusted variables into shell syntax. Use protected environments and serialized deployments when jobs share a target.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Key caches by dependencies and relevant runtime settings. Set artifact lifetime and exclude secrets, private fixtures, and extraneous build output.
|
|
21
|
-
- Handle manual, skipped, and failed dependencies deliberately. Confirm retry behavior for writes and preserve the correct commit identity through deployment.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Distinguish variables available during config evaluation from those created in a job. Verify matrix job names and needs relationships where partial fan-out is intentional. Review whether shared runners and artifacts cross trust boundaries.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a release job, verify it cannot run with protected credentials from an untrusted branch and that a required test failure blocks publication.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Validate with the project's CI lint and exercise expected branch, merge request, and tag conditions. Check job graph, artifact transfer, and cancellation behavior.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [GitLab CI documentation](https://docs.gitlab.com/ci/yaml/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-gitlab-ci
|
|
3
|
+
description: "Implement and review GitLab pipelines, rules, runner boundaries, and deployment jobs."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# GitLab CI
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Read includes, workflow rules, job rules, runner tags, protected refs, and environment approvals. Determine which pipeline types should run each job.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use workflow and job rules to avoid duplicate pipelines. Declare job dependencies explicitly and transfer only the necessary artifacts.
|
|
15
|
+
- Separate merge-request verification from publishing and deployment. Use least-privilege job tokens and keep protected secrets restricted to approved jobs and refs.
|
|
16
|
+
- Avoid interpolating untrusted variables into shell syntax. Use protected environments and serialized deployments when jobs share a target.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Key caches by dependencies and relevant runtime settings. Set artifact lifetime and exclude secrets, private fixtures, and extraneous build output.
|
|
21
|
+
- Handle manual, skipped, and failed dependencies deliberately. Confirm retry behavior for writes and preserve the correct commit identity through deployment.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Distinguish variables available during config evaluation from those created in a job. Verify matrix job names and needs relationships where partial fan-out is intentional. Review whether shared runners and artifacts cross trust boundaries.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a release job, verify it cannot run with protected credentials from an untrusted branch and that a required test failure blocks publication.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Validate with the project's CI lint and exercise expected branch, merge request, and tag conditions. Check job graph, artifact transfer, and cancellation behavior.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [GitLab CI documentation](https://docs.gitlab.com/ci/yaml/)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-go
|
|
3
|
-
description: "Implement Go packages and services with predictable cancellation, errors, and concurrency."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Go
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Check go.mod, workspace membership, toolchain version, build tags, and the project's package boundaries.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Pass context through call chains that perform I/O. Propagate deadlines, call cancellation functions, and close bodies or files at the owning layer.
|
|
15
|
-
- Wrap errors where context matters and preserve errors.Is or errors.As behavior for callers. Avoid panics for expected invalid inputs or transient failures.
|
|
16
|
-
- Bound concurrent work. Define goroutine ownership and channel closure clearly, and ensure workers can exit on cancellation.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Set explicit HTTP server and client timeouts where appropriate. Validate inputs and avoid logging tokens, request bodies, or private configuration.
|
|
21
|
-
- Keep exported interfaces narrow and control dependencies. Use metrics and profiles before optimizing allocation or concurrency.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Prefer a clear owner for synchronization and thresholds over introducing an unbounded abstraction. When changing an exported interface, test representative downstream call sites. Run the race detector for concurrency changes on a supported target.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a worker pool, test cancellation with pending work, an error from one worker, and completion without leaked goroutines.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run gofmt, go test, and applicable race checks and vet commands. Verify the supported platform and build tags for platform-specific changes.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Go documentation](https://go.dev/doc/effective_go)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-go
|
|
3
|
+
description: "Implement Go packages and services with predictable cancellation, errors, and concurrency."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Go
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Check go.mod, workspace membership, toolchain version, build tags, and the project's package boundaries.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Pass context through call chains that perform I/O. Propagate deadlines, call cancellation functions, and close bodies or files at the owning layer.
|
|
15
|
+
- Wrap errors where context matters and preserve errors.Is or errors.As behavior for callers. Avoid panics for expected invalid inputs or transient failures.
|
|
16
|
+
- Bound concurrent work. Define goroutine ownership and channel closure clearly, and ensure workers can exit on cancellation.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Set explicit HTTP server and client timeouts where appropriate. Validate inputs and avoid logging tokens, request bodies, or private configuration.
|
|
21
|
+
- Keep exported interfaces narrow and control dependencies. Use metrics and profiles before optimizing allocation or concurrency.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Prefer a clear owner for synchronization and thresholds over introducing an unbounded abstraction. When changing an exported interface, test representative downstream call sites. Run the race detector for concurrency changes on a supported target.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a worker pool, test cancellation with pending work, an error from one worker, and completion without leaked goroutines.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run gofmt, go test, and applicable race checks and vet commands. Verify the supported platform and build tags for platform-specific changes.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Go documentation](https://go.dev/doc/effective_go)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-ios
|
|
3
|
-
description: "Implement iOS features across UI state, lifecycle, concurrency, and permissions."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# iOS
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Check the deployment targets, Xcode and Swift versions, SwiftUI or UIKit boundaries, schemes, and signing requirements for the task.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Keep UI updates on the appropriate main actor and adopt structured concurrency consistent with the project. Handle task cancellation and lifecycle transitions.
|
|
15
|
-
- Define navigation and state ownership clearly. Cover Dynamic Type, VoiceOver labels, safe areas, and differing layout sizes.
|
|
16
|
-
- Request permissions close to the feature that needs them and handle denial. Keep sensitive data in approved storage and validate inbound URLs and inputs.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Avoid retaining short-lived UI objects across asynchronous work. Inspect Swift concurrency diagnostics and persistence migration behavior where relevant.
|
|
21
|
-
- Verify differences between simulator and physical device for platform integrations. Measure performance with representative devices and build settings.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Match persistence and file protection to product requirements. Observe cancellation when leaving a view and review structured concurrency ownership. Check migration and upgrade behavior using test app data across the affected deployment targets.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a data-loading screen, test cancellation when the view disappears and verify slow responses cannot update stale state.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run the project's build and tests for affected schemes. Verify simulator and physical device flows as applicable, and report platform checks that require access.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [iOS documentation](https://developer.apple.com/documentation/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-ios
|
|
3
|
+
description: "Implement iOS features across UI state, lifecycle, concurrency, and permissions."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# iOS
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Check the deployment targets, Xcode and Swift versions, SwiftUI or UIKit boundaries, schemes, and signing requirements for the task.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Keep UI updates on the appropriate main actor and adopt structured concurrency consistent with the project. Handle task cancellation and lifecycle transitions.
|
|
15
|
+
- Define navigation and state ownership clearly. Cover Dynamic Type, VoiceOver labels, safe areas, and differing layout sizes.
|
|
16
|
+
- Request permissions close to the feature that needs them and handle denial. Keep sensitive data in approved storage and validate inbound URLs and inputs.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Avoid retaining short-lived UI objects across asynchronous work. Inspect Swift concurrency diagnostics and persistence migration behavior where relevant.
|
|
21
|
+
- Verify differences between simulator and physical device for platform integrations. Measure performance with representative devices and build settings.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Match persistence and file protection to product requirements. Observe cancellation when leaving a view and review structured concurrency ownership. Check migration and upgrade behavior using test app data across the affected deployment targets.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a data-loading screen, test cancellation when the view disappears and verify slow responses cannot update stale state.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run the project's build and tests for affected schemes. Verify simulator and physical device flows as applicable, and report platform checks that require access.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [iOS documentation](https://developer.apple.com/documentation/)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-kubernetes
|
|
3
|
-
description: "Review Kubernetes workload manifests, rollout behavior, and operational boundaries."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Kubernetes
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Check the cluster version, namespace, deployment method, and existing security and resource policies. Locate the controller and rendered manifests.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Define readiness, liveness, and startup probes according to their distinct jobs. Set resource requests from measured demand and consider limits and disruption policy.
|
|
15
|
-
- Review rollout strategy, termination grace, and stateful storage requirements. Confirm selectors and services match the intended pods.
|
|
16
|
-
- Use least-privilege service accounts and restrict container privileges and network access according to the project. Keep secrets in approved stores and references.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Validate the rendered manifests and API versions. Check whether changes to immutable fields require a controlled replacement.
|
|
21
|
-
- Track events, rollout state, error rates, and saturation. Rehearse rollback with dependencies and persistent state accounted for.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Confirm that resource changes target the correct namespace and context. Inspect the rendered output for privilege, image, and storage changes before rollout. Use deployment status and application metrics to determine readiness from a user's perspective.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For an API rollout, verify readiness becomes false before new traffic is accepted during drain and that old pods complete in-flight work as designed.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run manifest and policy checks, and verify deployment in a test namespace where available. Report health, rollout, resource, and rollback observations.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Kubernetes documentation](https://kubernetes.io/docs/concepts/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-kubernetes
|
|
3
|
+
description: "Review Kubernetes workload manifests, rollout behavior, and operational boundaries."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Kubernetes
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Check the cluster version, namespace, deployment method, and existing security and resource policies. Locate the controller and rendered manifests.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Define readiness, liveness, and startup probes according to their distinct jobs. Set resource requests from measured demand and consider limits and disruption policy.
|
|
15
|
+
- Review rollout strategy, termination grace, and stateful storage requirements. Confirm selectors and services match the intended pods.
|
|
16
|
+
- Use least-privilege service accounts and restrict container privileges and network access according to the project. Keep secrets in approved stores and references.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Validate the rendered manifests and API versions. Check whether changes to immutable fields require a controlled replacement.
|
|
21
|
+
- Track events, rollout state, error rates, and saturation. Rehearse rollback with dependencies and persistent state accounted for.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Confirm that resource changes target the correct namespace and context. Inspect the rendered output for privilege, image, and storage changes before rollout. Use deployment status and application metrics to determine readiness from a user's perspective.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For an API rollout, verify readiness becomes false before new traffic is accepted during drain and that old pods complete in-flight work as designed.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run manifest and policy checks, and verify deployment in a test namespace where available. Report health, rollout, resource, and rollback observations.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Kubernetes documentation](https://kubernetes.io/docs/concepts/)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-mongodb
|
|
3
|
-
description: "Design and review MongoDB schemas, indexes, queries, and migrations."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# MongoDB
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Inspect server version, replica or sharding topology, driver behavior, and actual query shapes. Identify document ownership, cardinality, and existing field versions.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Embed data read and bounded together. Reference data with independent lifecycles or unbounded growth. Define authoritative fields and required invariants.
|
|
15
|
-
- Use indexes that match real filters and sorts. Verify explain output with representative cardinality and record index build and write costs.
|
|
16
|
-
- Use explicit field filters and structured queries. Scope writes by authenticated ownership, validate input, and limit privileges of app and migration accounts.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Use single-document atomic operators for local invariants. Use transactions for cross-document invariants with explicit retry and idempotency behavior.
|
|
21
|
-
- Roll out schema changes with compatible readers and writers first, then a resumable backfill. Plan uniqueness checks before index enforcement and protect production data during rehearsal.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Distinguish missing from null as a schema decision. Store dates and query keys with consistent BSON types and exercise filters against historical documents. Inspect index selectivity and avoid loading large arrays to filter them in application memory.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For tenant-scoped uniqueness, confirm existing duplicates are resolved and verify the compound key prevents a second record only within the same tenant.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Test representative existing documents, concurrent writes, and rollback compatibility with synthetic data. Check query plans, migration checkpoints, and operational impact.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [MongoDB documentation](https://www.mongodb.com/docs/manual/core/data-modeling-introduction/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-mongodb
|
|
3
|
+
description: "Design and review MongoDB schemas, indexes, queries, and migrations."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# MongoDB
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Inspect server version, replica or sharding topology, driver behavior, and actual query shapes. Identify document ownership, cardinality, and existing field versions.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Embed data read and bounded together. Reference data with independent lifecycles or unbounded growth. Define authoritative fields and required invariants.
|
|
15
|
+
- Use indexes that match real filters and sorts. Verify explain output with representative cardinality and record index build and write costs.
|
|
16
|
+
- Use explicit field filters and structured queries. Scope writes by authenticated ownership, validate input, and limit privileges of app and migration accounts.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Use single-document atomic operators for local invariants. Use transactions for cross-document invariants with explicit retry and idempotency behavior.
|
|
21
|
+
- Roll out schema changes with compatible readers and writers first, then a resumable backfill. Plan uniqueness checks before index enforcement and protect production data during rehearsal.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Distinguish missing from null as a schema decision. Store dates and query keys with consistent BSON types and exercise filters against historical documents. Inspect index selectivity and avoid loading large arrays to filter them in application memory.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For tenant-scoped uniqueness, confirm existing duplicates are resolved and verify the compound key prevents a second record only within the same tenant.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Test representative existing documents, concurrent writes, and rollback compatibility with synthetic data. Check query plans, migration checkpoints, and operational impact.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [MongoDB documentation](https://www.mongodb.com/docs/manual/core/data-modeling-introduction/)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-mysql
|
|
3
|
-
description: "Design and review MySQL query paths, schemas, transactions, and migrations."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# MySQL
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Check server version, storage engine, SQL mode, collation, and replication topology. Determine representative data distribution and existing constraints.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use explicit types and defaults, and parameterize query values. Review case sensitivity, time zone handling, and how nulls affect uniqueness and filters.
|
|
15
|
-
- Match composite indexes to query filters and ordering. Review EXPLAIN and real workload measurements before accepting an index change.
|
|
16
|
-
- Check transaction isolation and lock acquisition order. Handle deadlocks and transient conflicts with bounded retries where operations are safe to repeat.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Verify online DDL support and expected lock behavior for the installed version. Rehearse schema changes on representative data and plan deploy ordering.
|
|
21
|
-
- Use least-privilege credentials and approved backup and restore plans. Protect the data used for migration rehearsals and query analysis.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Check differences between development and production collation, SQL mode, and timezone before assuming equality or ordering semantics. Verify that generated columns and indexes are supported by the deployed version. Treat auto-increment values as identifiers without encoding chronological guarantees.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a backfill, use stable key-based batches and record progress. Check the query plan and concurrent updates before enabling the operation at scale.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run integration tests for constraints and concurrent writes. Verify old and new readers, migration recovery, and replication impact when relevant.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [MySQL documentation](https://dev.mysql.com/doc/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-mysql
|
|
3
|
+
description: "Design and review MySQL query paths, schemas, transactions, and migrations."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# MySQL
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Check server version, storage engine, SQL mode, collation, and replication topology. Determine representative data distribution and existing constraints.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use explicit types and defaults, and parameterize query values. Review case sensitivity, time zone handling, and how nulls affect uniqueness and filters.
|
|
15
|
+
- Match composite indexes to query filters and ordering. Review EXPLAIN and real workload measurements before accepting an index change.
|
|
16
|
+
- Check transaction isolation and lock acquisition order. Handle deadlocks and transient conflicts with bounded retries where operations are safe to repeat.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Verify online DDL support and expected lock behavior for the installed version. Rehearse schema changes on representative data and plan deploy ordering.
|
|
21
|
+
- Use least-privilege credentials and approved backup and restore plans. Protect the data used for migration rehearsals and query analysis.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Check differences between development and production collation, SQL mode, and timezone before assuming equality or ordering semantics. Verify that generated columns and indexes are supported by the deployed version. Treat auto-increment values as identifiers without encoding chronological guarantees.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a backfill, use stable key-based batches and record progress. Check the query plan and concurrent updates before enabling the operation at scale.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run integration tests for constraints and concurrent writes. Verify old and new readers, migration recovery, and replication impact when relevant.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [MySQL documentation](https://dev.mysql.com/doc/)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-nextjs
|
|
3
|
-
description: "Implement and review routing, rendering, caching, and mutations in Next.js applications."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Next.js
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Identify App Router or Pages Router, the installed Next.js version, deployment runtime, and current cache policy. Locate the route, data owner, and authentication boundary.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- In App Router, use Server Components for server-only reads. Keep client boundaries narrow for interactivity and pass serializable props. Use the router's existing loading, error, and layout patterns.
|
|
15
|
-
- Decide per route whether content can be shared, revalidated, or rendered for an individual user. Check the installed version's fetch and route defaults before relying on them.
|
|
16
|
-
- Validate and authorize each mutation and route handler against its resource. Keep privileged modules and secrets server-side. Validate route parameters and redirect destinations.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Confirm that public environment variables and rendered props contain only public data. Review image sources, CSP, and permissions for remote content according to repository policy.
|
|
21
|
-
- Avoid duplicate client requests when a route already provides the data. Measure production JavaScript and server latency before changing code splitting or streaming behavior.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Keep cache invalidation close to the mutation that makes data stale. Check static versus dynamic output during the build and validate downstream CDN behavior for personalized routes. Use the project's framework APIs for metadata and image sizing rather than maintaining parallel client-side logic.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For account details, authorize the owner on the server and exercise navigation with two test users. Confirm that a cache hit cannot reuse one user's private content for another.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run the production build and route tests. Verify loading and error boundaries, hydration, authenticated responses, cache invalidation after mutation, and the deployed runtime's supported APIs.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Next.js documentation](https://nextjs.org/docs)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-nextjs
|
|
3
|
+
description: "Implement and review routing, rendering, caching, and mutations in Next.js applications."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Next.js
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Identify App Router or Pages Router, the installed Next.js version, deployment runtime, and current cache policy. Locate the route, data owner, and authentication boundary.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- In App Router, use Server Components for server-only reads. Keep client boundaries narrow for interactivity and pass serializable props. Use the router's existing loading, error, and layout patterns.
|
|
15
|
+
- Decide per route whether content can be shared, revalidated, or rendered for an individual user. Check the installed version's fetch and route defaults before relying on them.
|
|
16
|
+
- Validate and authorize each mutation and route handler against its resource. Keep privileged modules and secrets server-side. Validate route parameters and redirect destinations.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Confirm that public environment variables and rendered props contain only public data. Review image sources, CSP, and permissions for remote content according to repository policy.
|
|
21
|
+
- Avoid duplicate client requests when a route already provides the data. Measure production JavaScript and server latency before changing code splitting or streaming behavior.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Keep cache invalidation close to the mutation that makes data stale. Check static versus dynamic output during the build and validate downstream CDN behavior for personalized routes. Use the project's framework APIs for metadata and image sizing rather than maintaining parallel client-side logic.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For account details, authorize the owner on the server and exercise navigation with two test users. Confirm that a cache hit cannot reuse one user's private content for another.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run the production build and route tests. Verify loading and error boundaries, hydration, authenticated responses, cache invalidation after mutation, and the deployed runtime's supported APIs.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Next.js documentation](https://nextjs.org/docs)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-node
|
|
3
|
-
description: "Implement Node.js services, CLIs, and modules with predictable I/O and lifecycle behavior."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Node.js
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Check engines, module format, package exports, lockfile, and start command. Trace ownership of timers, sockets, subprocesses, and streams affected by the change.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use asynchronous I/O in request paths and honor stream backpressure. Bound batch concurrency, body sizes, and request duration. Propagate cancellation to downstream calls where supported.
|
|
15
|
-
- Keep CommonJS and ESM boundaries compatible with supported runtimes. Validate configuration once at startup and use the existing logger and structured error conventions.
|
|
16
|
-
- Close owned resources on success, failure, and shutdown. Drain in-flight work with a bounded deadline and ensure fatal startup errors reach the process exit status.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Pass subprocess arguments as an array and validate paths and input. Keep tokens out of command arguments and logs when a secure input mechanism exists.
|
|
21
|
-
- Avoid retrying writes without an idempotency guarantee. Use bounded retries for transient failures and measure event-loop delay when diagnosing latency.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Prefer existing runtime primitives for abort signals, streams, and filesystem operations. When writing project files, use exclusive creation for new files or an atomic replace for owned files. Handle process signals at the entry point and keep reusable modules free of process-wide side effects.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a streaming export, check slow consumers, mid-stream disconnects, and cleanup of temporary files instead of testing only tiny successful responses.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run the existing lint and tests on the supported Node versions. Verify the entry point, failure exit codes, cancellation, shutdown, and published import paths where relevant.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Node.js documentation](https://nodejs.org/docs/latest/api/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-node
|
|
3
|
+
description: "Implement Node.js services, CLIs, and modules with predictable I/O and lifecycle behavior."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Node.js
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Check engines, module format, package exports, lockfile, and start command. Trace ownership of timers, sockets, subprocesses, and streams affected by the change.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use asynchronous I/O in request paths and honor stream backpressure. Bound batch concurrency, body sizes, and request duration. Propagate cancellation to downstream calls where supported.
|
|
15
|
+
- Keep CommonJS and ESM boundaries compatible with supported runtimes. Validate configuration once at startup and use the existing logger and structured error conventions.
|
|
16
|
+
- Close owned resources on success, failure, and shutdown. Drain in-flight work with a bounded deadline and ensure fatal startup errors reach the process exit status.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Pass subprocess arguments as an array and validate paths and input. Keep tokens out of command arguments and logs when a secure input mechanism exists.
|
|
21
|
+
- Avoid retrying writes without an idempotency guarantee. Use bounded retries for transient failures and measure event-loop delay when diagnosing latency.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Prefer existing runtime primitives for abort signals, streams, and filesystem operations. When writing project files, use exclusive creation for new files or an atomic replace for owned files. Handle process signals at the entry point and keep reusable modules free of process-wide side effects.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a streaming export, check slow consumers, mid-stream disconnects, and cleanup of temporary files instead of testing only tiny successful responses.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run the existing lint and tests on the supported Node versions. Verify the entry point, failure exit codes, cancellation, shutdown, and published import paths where relevant.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Node.js documentation](https://nodejs.org/docs/latest/api/)
|