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-playwright
|
|
3
|
-
description: "Write, stabilize, and review Playwright browser tests and CI diagnostics."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Playwright
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Read the installed Playwright version, test configuration, fixtures, browser projects, base URL, and CI artifact policy. Identify the user journey and the smallest appropriate test layer.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use role and accessible-name locators, labels, or explicit test IDs. Scope locators where similar elements repeat and use web-first assertions over visible outcomes.
|
|
15
|
-
- Give each test isolated data and browser state. Put setup and teardown in fixtures, use unique data for parallel tests, and control external dependencies at the appropriate boundary.
|
|
16
|
-
- Wait for the behavior under test. Avoid fixed sleeps and broad timeout increases. Keep assertions specific enough to diagnose the failing expectation.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Protect storage state, tokens, and test user credentials. Use test environments and synthetic data. Review screenshots, traces, and videos before sharing.
|
|
21
|
-
- Run targeted tests while editing and test relevant browsers when behavior differs. Use traces to distinguish stale locators, unintended requests, shared state, and application failures.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Use test fixtures to configure deterministic backend state rather than repeating UI login in every setup. Cover browser behavior at critical boundaries and keep cheaper logic tests at the unit or integration layer. If a test retries, record and diagnose the original failure before declaring it reliable.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For an asynchronous save, assert the resulting confirmation or persisted state. Run the scenario repeatedly with parallel workers to detect state leakage.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run focused and representative cross-browser tests with the repository runner. Review traces on failures, verify retry outcomes, and report skipped environments.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Playwright documentation](https://playwright.dev/docs/best-practices)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-playwright
|
|
3
|
+
description: "Write, stabilize, and review Playwright browser tests and CI diagnostics."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Playwright
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Read the installed Playwright version, test configuration, fixtures, browser projects, base URL, and CI artifact policy. Identify the user journey and the smallest appropriate test layer.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use role and accessible-name locators, labels, or explicit test IDs. Scope locators where similar elements repeat and use web-first assertions over visible outcomes.
|
|
15
|
+
- Give each test isolated data and browser state. Put setup and teardown in fixtures, use unique data for parallel tests, and control external dependencies at the appropriate boundary.
|
|
16
|
+
- Wait for the behavior under test. Avoid fixed sleeps and broad timeout increases. Keep assertions specific enough to diagnose the failing expectation.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Protect storage state, tokens, and test user credentials. Use test environments and synthetic data. Review screenshots, traces, and videos before sharing.
|
|
21
|
+
- Run targeted tests while editing and test relevant browsers when behavior differs. Use traces to distinguish stale locators, unintended requests, shared state, and application failures.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Use test fixtures to configure deterministic backend state rather than repeating UI login in every setup. Cover browser behavior at critical boundaries and keep cheaper logic tests at the unit or integration layer. If a test retries, record and diagnose the original failure before declaring it reliable.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For an asynchronous save, assert the resulting confirmation or persisted state. Run the scenario repeatedly with parallel workers to detect state leakage.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run focused and representative cross-browser tests with the repository runner. Review traces on failures, verify retry outcomes, and report skipped environments.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Playwright documentation](https://playwright.dev/docs/best-practices)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-postgresql
|
|
3
|
-
description: "Design PostgreSQL schemas, queries, indexes, and low-risk migrations."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# PostgreSQL
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Check the deployed PostgreSQL version, schema, existing constraints, query patterns, and migration tool. Inspect data volume and transaction durations.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use types and database constraints for critical invariants. Parameterize values and allowlist dynamic identifiers. Scope access at the application and database boundaries as designed.
|
|
15
|
-
- Choose indexes based on actual filters, joins, and sort order. Compare representative plans and consider write amplification and storage cost.
|
|
16
|
-
- Choose transaction isolation for the invariant. Handle serialization conflicts with a bounded retry of the whole transaction when appropriate.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Plan lock durations, backfills, validation, and rollout order. Keep old and new application versions compatible during deploys and use resumable batches for large data changes.
|
|
21
|
-
- Review privileges, backups and restoration, and observability of long queries or replication lag. Run execution-plan analysis that executes statements only in an appropriate environment.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Keep long transactions out of deploy paths. Check whether the migration tool wraps every statement in a transaction before choosing concurrent index operations. If a rollback can lose data, document recovery with verified backups and rehearse using a copy.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a required column on a busy table, rehearse adding a compatible column, filling existing rows in batches, validating the invariant, and enforcing it after writers are ready.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Verify migrations on representative test data. Check old and new readers, query plans, concurrent writes, and recovery steps before a rollout.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [PostgreSQL documentation](https://www.postgresql.org/docs/current/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-postgresql
|
|
3
|
+
description: "Design PostgreSQL schemas, queries, indexes, and low-risk migrations."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PostgreSQL
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Check the deployed PostgreSQL version, schema, existing constraints, query patterns, and migration tool. Inspect data volume and transaction durations.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use types and database constraints for critical invariants. Parameterize values and allowlist dynamic identifiers. Scope access at the application and database boundaries as designed.
|
|
15
|
+
- Choose indexes based on actual filters, joins, and sort order. Compare representative plans and consider write amplification and storage cost.
|
|
16
|
+
- Choose transaction isolation for the invariant. Handle serialization conflicts with a bounded retry of the whole transaction when appropriate.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Plan lock durations, backfills, validation, and rollout order. Keep old and new application versions compatible during deploys and use resumable batches for large data changes.
|
|
21
|
+
- Review privileges, backups and restoration, and observability of long queries or replication lag. Run execution-plan analysis that executes statements only in an appropriate environment.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Keep long transactions out of deploy paths. Check whether the migration tool wraps every statement in a transaction before choosing concurrent index operations. If a rollback can lose data, document recovery with verified backups and rehearse using a copy.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a required column on a busy table, rehearse adding a compatible column, filling existing rows in batches, validating the invariant, and enforcing it after writers are ready.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Verify migrations on representative test data. Check old and new readers, query plans, concurrent writes, and recovery steps before a rollout.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [PostgreSQL documentation](https://www.postgresql.org/docs/current/)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-python
|
|
3
|
-
description: "Implement and verify Python modules, packages, CLIs, and service code."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Python
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Read pyproject.toml, the supported interpreter range, packaging layout, and test tools. Locate the public entry point and any sync or async contract.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use context managers for owned resources and narrow exception handlers at meaningful boundaries. Preserve tracebacks for diagnostics while presenting safe errors to callers.
|
|
15
|
-
- Keep defaults free of shared mutable state. Use explicit encodings for text and pathlib for paths. Validate external inputs even when static annotations are present.
|
|
16
|
-
- Keep blocking operations outside async request paths. Prefer bounded concurrency and make cleanup reliable when a task is cancelled.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Use an isolated environment and repository-approved dependency sources. Keep credentials outside fixtures, package artifacts, logs, and command history.
|
|
21
|
-
- Use precise type annotations at module boundaries. Reuse project formatters and linters, and document changes to import paths, CLI arguments, or returned values.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Inject clocks, paths, and clients at boundaries where tests need determinism. Avoid import-time network or filesystem work. When publishing a package, compare the wheel contents against the declared public interfaces and verify resources from the installed package.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a new CLI option, test the installed module, a path with spaces, an invalid argument, and the exit code produced on failure.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run the configured unit tests, type checker, and linter. For packaging changes, build the wheel and run a smoke check from a fresh install.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Python documentation](https://docs.python.org/3/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-python
|
|
3
|
+
description: "Implement and verify Python modules, packages, CLIs, and service code."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Python
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Read pyproject.toml, the supported interpreter range, packaging layout, and test tools. Locate the public entry point and any sync or async contract.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use context managers for owned resources and narrow exception handlers at meaningful boundaries. Preserve tracebacks for diagnostics while presenting safe errors to callers.
|
|
15
|
+
- Keep defaults free of shared mutable state. Use explicit encodings for text and pathlib for paths. Validate external inputs even when static annotations are present.
|
|
16
|
+
- Keep blocking operations outside async request paths. Prefer bounded concurrency and make cleanup reliable when a task is cancelled.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Use an isolated environment and repository-approved dependency sources. Keep credentials outside fixtures, package artifacts, logs, and command history.
|
|
21
|
+
- Use precise type annotations at module boundaries. Reuse project formatters and linters, and document changes to import paths, CLI arguments, or returned values.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Inject clocks, paths, and clients at boundaries where tests need determinism. Avoid import-time network or filesystem work. When publishing a package, compare the wheel contents against the declared public interfaces and verify resources from the installed package.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a new CLI option, test the installed module, a path with spaces, an invalid argument, and the exit code produced on failure.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run the configured unit tests, type checker, and linter. For packaging changes, build the wheel and run a smoke check from a fresh install.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Python documentation](https://docs.python.org/3/)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-react
|
|
3
|
-
description: "Audit component ownership, state, effects, and accessible interactions in React applications."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# React
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Read the installed React version, rendering framework, Strict Mode setup, and Hooks lint rules before changing a component. Trace the owning component, props, async data source, and user-visible states.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Keep render pure. Update objects and arrays immutably, use stable domain keys in lists, and call Hooks at the top level of React components and custom Hooks.
|
|
15
|
-
- Derive filtered or formatted values during rendering. Keep transient state near the component that owns it and lift shared state to the nearest common owner. Use a reducer when transitions must stay consistent.
|
|
16
|
-
- Put user-triggered work in event handlers. Use Effects for synchronization with external systems, include reactive dependencies, and clean up subscriptions, timers, and obsolete requests.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Use semantic elements, accessible names, and predictable focus. Cover keyboard interaction and announce asynchronous changes when the UI needs to communicate them.
|
|
21
|
-
- Keep secrets and authorization decisions on the server. Sanitize HTML using the project's approved sanitizer before any raw HTML rendering. Measure slow renders with the Profiler before adding memoization.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
When the same component switches between records, decide whether state should persist or reset. Use a stable record key when remounting reflects the product behavior. Place error boundaries around independently recoverable UI and handle event or request errors at their source. Verify the fast path before introducing transitions, Suspense, or memoization.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a search panel, derive the visible rows from the query and dataset. When the query fetches remotely, cover rapid typing followed by an older response and confirm the latest query wins.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run the project's lint and component tests. Cover loading, empty, error, success, keyboard behavior, and state transitions. Check hydration in SSR applications and measure any claimed performance change.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [React documentation](https://react.dev/reference/rules)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-react
|
|
3
|
+
description: "Audit component ownership, state, effects, and accessible interactions in React applications."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# React
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Read the installed React version, rendering framework, Strict Mode setup, and Hooks lint rules before changing a component. Trace the owning component, props, async data source, and user-visible states.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Keep render pure. Update objects and arrays immutably, use stable domain keys in lists, and call Hooks at the top level of React components and custom Hooks.
|
|
15
|
+
- Derive filtered or formatted values during rendering. Keep transient state near the component that owns it and lift shared state to the nearest common owner. Use a reducer when transitions must stay consistent.
|
|
16
|
+
- Put user-triggered work in event handlers. Use Effects for synchronization with external systems, include reactive dependencies, and clean up subscriptions, timers, and obsolete requests.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Use semantic elements, accessible names, and predictable focus. Cover keyboard interaction and announce asynchronous changes when the UI needs to communicate them.
|
|
21
|
+
- Keep secrets and authorization decisions on the server. Sanitize HTML using the project's approved sanitizer before any raw HTML rendering. Measure slow renders with the Profiler before adding memoization.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
When the same component switches between records, decide whether state should persist or reset. Use a stable record key when remounting reflects the product behavior. Place error boundaries around independently recoverable UI and handle event or request errors at their source. Verify the fast path before introducing transitions, Suspense, or memoization.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a search panel, derive the visible rows from the query and dataset. When the query fetches remotely, cover rapid typing followed by an older response and confirm the latest query wins.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run the project's lint and component tests. Cover loading, empty, error, success, keyboard behavior, and state transitions. Check hydration in SSR applications and measure any claimed performance change.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [React documentation](https://react.dev/reference/rules)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-react-native
|
|
3
|
-
description: "Implement React Native screens and interactions across supported platforms."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# React Native
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Check React Native version, Expo or native workflow, navigation library, platform versions, and configured build variants.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use existing component and navigation patterns. Handle safe areas, keyboard interactions, screen reader labels, and layouts for the supported device sizes.
|
|
15
|
-
- Keep network requests cancellable and design states for loading, offline, retry, and failure. Account for app lifecycle and foreground changes.
|
|
16
|
-
- Minimize overdraw and render work in long lists using the project's list primitives, stable keys, and measured optimization.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Request platform permissions when needed and handle rejection gracefully. Keep secrets out of application bundles and sensitive data in appropriate storage.
|
|
21
|
-
- Review native module compatibility, platform differences, and release build behavior when changing dependencies.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Test lifecycle differences around push notifications, background activity, and restoring navigation state when relevant. Check that sensitive screens and local state respect platform policies. Validate accessibility with actual platform controls where simulator behavior differs.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a list with an input form, exercise scroll performance, keyboard overlap, screen reader focus, and empty results on both platforms.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run JavaScript checks and device or emulator tests on applicable platforms. Verify release configuration for native dependency or permission changes.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [React Native documentation](https://reactnative.dev/docs/getting-started)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-react-native
|
|
3
|
+
description: "Implement React Native screens and interactions across supported platforms."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# React Native
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Check React Native version, Expo or native workflow, navigation library, platform versions, and configured build variants.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use existing component and navigation patterns. Handle safe areas, keyboard interactions, screen reader labels, and layouts for the supported device sizes.
|
|
15
|
+
- Keep network requests cancellable and design states for loading, offline, retry, and failure. Account for app lifecycle and foreground changes.
|
|
16
|
+
- Minimize overdraw and render work in long lists using the project's list primitives, stable keys, and measured optimization.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Request platform permissions when needed and handle rejection gracefully. Keep secrets out of application bundles and sensitive data in appropriate storage.
|
|
21
|
+
- Review native module compatibility, platform differences, and release build behavior when changing dependencies.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Test lifecycle differences around push notifications, background activity, and restoring navigation state when relevant. Check that sensitive screens and local state respect platform policies. Validate accessibility with actual platform controls where simulator behavior differs.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a list with an input form, exercise scroll performance, keyboard overlap, screen reader focus, and empty results on both platforms.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run JavaScript checks and device or emulator tests on applicable platforms. Verify release configuration for native dependency or permission changes.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [React Native documentation](https://reactnative.dev/docs/getting-started)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-redis
|
|
3
|
-
description: "Implement and review Redis caches, keys, expiration, and failure handling."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Redis
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Identify the deployment topology, client, eviction policy, consistency expectations, and data durability requirements.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use predictable key namespaces and explicit expiration where needed. Design for cache misses and define what staleness is acceptable.
|
|
15
|
-
- Use atomic commands or small reviewed scripts for multi-step invariants. Confirm cluster slot behavior if one operation touches multiple keys.
|
|
16
|
-
- Set client timeouts, bounded retries, and fallbacks. Keep the authoritative result safe when Redis is delayed, unavailable, or evicts keys.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Scope access with configured authentication and least privilege. Keep sensitive data out of key names and logs, and review what value data can be cached.
|
|
21
|
-
- Use bounded iteration or targeted key checks for maintenance. Track memory, latency, eviction, and connection behavior before tuning.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Define whether cached data may be shared across tenants or permission scopes before designing keys. Align expiration jitter, request coalescing, and loader concurrency with workload when stampedes are material. Treat distributed locks as a separate correctness concern and document failure assumptions.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For cache invalidation after a write, test the hit, miss, concurrent update, and backend fallback with a realistic expiration policy.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Test the code against the target topology or an appropriate fixture. Verify expiry and recovery under simulated Redis unavailability.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Redis documentation](https://redis.io/docs/latest/develop/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-redis
|
|
3
|
+
description: "Implement and review Redis caches, keys, expiration, and failure handling."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Redis
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Identify the deployment topology, client, eviction policy, consistency expectations, and data durability requirements.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use predictable key namespaces and explicit expiration where needed. Design for cache misses and define what staleness is acceptable.
|
|
15
|
+
- Use atomic commands or small reviewed scripts for multi-step invariants. Confirm cluster slot behavior if one operation touches multiple keys.
|
|
16
|
+
- Set client timeouts, bounded retries, and fallbacks. Keep the authoritative result safe when Redis is delayed, unavailable, or evicts keys.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Scope access with configured authentication and least privilege. Keep sensitive data out of key names and logs, and review what value data can be cached.
|
|
21
|
+
- Use bounded iteration or targeted key checks for maintenance. Track memory, latency, eviction, and connection behavior before tuning.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Define whether cached data may be shared across tenants or permission scopes before designing keys. Align expiration jitter, request coalescing, and loader concurrency with workload when stampedes are material. Treat distributed locks as a separate correctness concern and document failure assumptions.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For cache invalidation after a write, test the hit, miss, concurrent update, and backend fallback with a realistic expiration policy.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Test the code against the target topology or an appropriate fixture. Verify expiry and recovery under simulated Redis unavailability.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Redis documentation](https://redis.io/docs/latest/develop/)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-rust
|
|
3
|
-
description: "Implement Rust crates with sound ownership, stable contracts, and targeted verification."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Rust
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Read Cargo.toml, workspace features, edition, minimum supported Rust version, and CI feature combinations.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use ownership and borrowing that express the intended lifetime. Prefer explicit Results for recoverable failures and preserve useful error context.
|
|
15
|
-
- Keep unsafe blocks small and justified by documented invariants. Reuse safe library APIs where they meet the task, and avoid unchecked external input assumptions.
|
|
16
|
-
- Bound asynchronous work and account for cancellation. Keep blocking operations outside async executors unless routed through appropriate mechanisms.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- Review dependencies, feature unification, and platform support. Avoid exposing private values through Debug output or error messages.
|
|
21
|
-
- Maintain public types, feature gates, and serialization compatibility. Benchmark a targeted workload before claiming an optimization.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Choose synchronization primitives that match contention and blocking behavior. Confirm that holding resources across await points is intentional. For a public crate, verify defaults and optional feature combinations before changing shared dependencies.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a parser change, test malformed and truncated inputs, bounds, and behavior on expected valid forms without relying on panic paths.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run cargo fmt checks, project Clippy settings, and tests for relevant features and targets. Verify the minimum supported compiler where required.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Rust documentation](https://doc.rust-lang.org/book/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-rust
|
|
3
|
+
description: "Implement Rust crates with sound ownership, stable contracts, and targeted verification."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rust
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Read Cargo.toml, workspace features, edition, minimum supported Rust version, and CI feature combinations.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use ownership and borrowing that express the intended lifetime. Prefer explicit Results for recoverable failures and preserve useful error context.
|
|
15
|
+
- Keep unsafe blocks small and justified by documented invariants. Reuse safe library APIs where they meet the task, and avoid unchecked external input assumptions.
|
|
16
|
+
- Bound asynchronous work and account for cancellation. Keep blocking operations outside async executors unless routed through appropriate mechanisms.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- Review dependencies, feature unification, and platform support. Avoid exposing private values through Debug output or error messages.
|
|
21
|
+
- Maintain public types, feature gates, and serialization compatibility. Benchmark a targeted workload before claiming an optimization.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Choose synchronization primitives that match contention and blocking behavior. Confirm that holding resources across await points is intentional. For a public crate, verify defaults and optional feature combinations before changing shared dependencies.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a parser change, test malformed and truncated inputs, bounds, and behavior on expected valid forms without relying on panic paths.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run cargo fmt checks, project Clippy settings, and tests for relevant features and targets. Verify the minimum supported compiler where required.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Rust documentation](https://doc.rust-lang.org/book/)
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lyra-spark
|
|
3
|
-
description: "Implement Spark batch and streaming transformations with predictable correctness and resource use."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Apache Spark
|
|
7
|
-
|
|
8
|
-
## Inspect the project
|
|
9
|
-
|
|
10
|
-
Check Spark version, execution mode, cluster runtime, source and sink formats, and job scheduling. Define schema, grain, and ownership at each boundary.
|
|
11
|
-
|
|
12
|
-
## Implementation practices
|
|
13
|
-
|
|
14
|
-
- Use explicit schema and null handling. Prefer Spark SQL and built-in expressions where they preserve semantics and optimize well.
|
|
15
|
-
- Inspect joins, shuffle, skew, and partitions using an execution plan and metrics. Avoid collecting unbounded datasets to the driver.
|
|
16
|
-
- Choose output strategy deliberately. For reruns, define idempotency and handle partial outputs according to sink capabilities.
|
|
17
|
-
|
|
18
|
-
## Guardrails and trade-offs
|
|
19
|
-
|
|
20
|
-
- For streaming, document event-time and watermark assumptions, checkpoint ownership, and behavior on restarts. Scope data access and protect sensitive data in samples and logs.
|
|
21
|
-
- Rehearse schema evolution and backfills on representative small data and review checkpoint or table compatibility before deployment.
|
|
22
|
-
|
|
23
|
-
## Decisions to check
|
|
24
|
-
|
|
25
|
-
Record which upstream and downstream schemas are compatible with the change. Inspect partition counts, skew, and runtime evidence before tuning executor resources. Verify replay from checkpoints with isolated test input when changing streaming jobs.
|
|
26
|
-
|
|
27
|
-
## Review scenario
|
|
28
|
-
|
|
29
|
-
For a join with skewed keys, check unmatched rows, duplicate keys, nulls, and partition skew before changing join strategy.
|
|
30
|
-
|
|
31
|
-
## Verification
|
|
32
|
-
|
|
33
|
-
Run deterministic local tests with edge-case fixtures and inspect a representative execution plan. Verify output partitions, rerun behavior, and operational metrics.
|
|
34
|
-
|
|
35
|
-
## Reference
|
|
36
|
-
|
|
37
|
-
- [Apache Spark documentation](https://spark.apache.org/docs/latest/)
|
|
1
|
+
---
|
|
2
|
+
name: lyra-spark
|
|
3
|
+
description: "Implement Spark batch and streaming transformations with predictable correctness and resource use."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Apache Spark
|
|
7
|
+
|
|
8
|
+
## Inspect the project
|
|
9
|
+
|
|
10
|
+
Check Spark version, execution mode, cluster runtime, source and sink formats, and job scheduling. Define schema, grain, and ownership at each boundary.
|
|
11
|
+
|
|
12
|
+
## Implementation practices
|
|
13
|
+
|
|
14
|
+
- Use explicit schema and null handling. Prefer Spark SQL and built-in expressions where they preserve semantics and optimize well.
|
|
15
|
+
- Inspect joins, shuffle, skew, and partitions using an execution plan and metrics. Avoid collecting unbounded datasets to the driver.
|
|
16
|
+
- Choose output strategy deliberately. For reruns, define idempotency and handle partial outputs according to sink capabilities.
|
|
17
|
+
|
|
18
|
+
## Guardrails and trade-offs
|
|
19
|
+
|
|
20
|
+
- For streaming, document event-time and watermark assumptions, checkpoint ownership, and behavior on restarts. Scope data access and protect sensitive data in samples and logs.
|
|
21
|
+
- Rehearse schema evolution and backfills on representative small data and review checkpoint or table compatibility before deployment.
|
|
22
|
+
|
|
23
|
+
## Decisions to check
|
|
24
|
+
|
|
25
|
+
Record which upstream and downstream schemas are compatible with the change. Inspect partition counts, skew, and runtime evidence before tuning executor resources. Verify replay from checkpoints with isolated test input when changing streaming jobs.
|
|
26
|
+
|
|
27
|
+
## Review scenario
|
|
28
|
+
|
|
29
|
+
For a join with skewed keys, check unmatched rows, duplicate keys, nulls, and partition skew before changing join strategy.
|
|
30
|
+
|
|
31
|
+
## Verification
|
|
32
|
+
|
|
33
|
+
Run deterministic local tests with edge-case fixtures and inspect a representative execution plan. Verify output partitions, rerun behavior, and operational metrics.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- [Apache Spark documentation](https://spark.apache.org/docs/latest/)
|