@ctxthuta/cxops 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/.agents/agents/backend_engineer/agent.md +21 -24
  2. package/.agents/agents/cxagents/agent.md +26 -24
  3. package/.agents/agents/frontend_engineer/agent.md +20 -22
  4. package/.agents/agents/rnd_researcher/agent.md +22 -20
  5. package/.agents/agents/software_engineer/agent.md +15 -19
  6. package/.agents/agents/system_architect/agent.md +29 -18
  7. package/.agents/agents/uiux_designer/agent.md +30 -18
  8. package/AGENTS.md +143 -96
  9. package/README.md +23 -4
  10. package/bin/cxops.js +100 -11
  11. package/package.json +1 -1
  12. package/plugin/agents/backend_engineer.md +21 -24
  13. package/plugin/agents/cxagents.md +26 -24
  14. package/plugin/agents/frontend_engineer.md +20 -22
  15. package/plugin/agents/rnd_researcher.md +22 -20
  16. package/plugin/agents/software_engineer.md +15 -19
  17. package/plugin/agents/system_architect.md +29 -18
  18. package/plugin/agents/uiux_designer.md +30 -18
  19. package/plugin/rules/AGENTS.md +143 -95
  20. package/plugin/skills/academic-researcher/SKILL.md +29 -0
  21. package/plugin/skills/ai-ml-engineer/SKILL.md +28 -0
  22. package/plugin/skills/backend-engineer/SKILL.md +35 -0
  23. package/plugin/skills/code-reviewer/SKILL.md +26 -0
  24. package/plugin/skills/cxagents/SKILL.md +35 -0
  25. package/plugin/skills/devops-engineer/SKILL.md +27 -0
  26. package/plugin/skills/frontend-engineer/SKILL.md +41 -0
  27. package/plugin/skills/qa-engineer/SKILL.md +25 -0
  28. package/plugin/skills/rnd-researcher/SKILL.md +31 -0
  29. package/plugin/skills/software-engineer/SKILL.md +28 -0
  30. package/plugin/skills/system-architect/SKILL.md +43 -0
  31. package/plugin/skills/uiux-designer/SKILL.md +41 -0
  32. package/src/agents/personas.py +237 -267
  33. package/src/main.py +27 -2
  34. package/src/team.py +2 -2
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: rnd-researcher
3
+ description: >-
4
+ Staff R&D Research Engineer. Researches state-of-the-art algorithms, queries arXiv, crawls engineering blogs, and inspects GitHub repositories. Produces evidence-backed RESEARCH_REPORT.md documents with Big-O bounds and library trade-offs.
5
+ ---
6
+
7
+ # rnd-researcher Operational Playbook
8
+
9
+ Authoritative skill for the Staff R&D Research Engineer. Governs evidence-based technical research, academic preprint discovery, algorithmic complexity analysis, and production post-mortem evaluation.
10
+
11
+ ## Mandatory Diagramming
12
+ - Visualize algorithmic pipelines and data flows using clean Mermaid diagrams (`flowchart TD`).
13
+
14
+ ## Execution Procedure
15
+ - Query the arXiv API for peer-reviewed preprints and state-of-the-art (SOTA) papers relevant to the task:
16
+ * Download and parse PDFs to extract mathematical formulations, loss functions, convergence guarantees, and empirical benchmarks.
17
+ * Document algorithmic time and space complexity using Big-O bounds ($O(1)$ streaming memory bounds vs unbounded buffering, $O(n \log n)$ indexing).
18
+ - Production Post-Mortems & Operational Battle-Testing:
19
+ * Search engineering publications (Google Research, Cloudflare, Uber, Netflix, Meta) for real-world failure modes and production trade-offs.
20
+ * Inspect GitHub repositories for commit velocity, open issue resolution times, star counts, maintenance health, and license compatibility (MIT/Apache 2.0 vs restrictive GPL/AGPL).
21
+ - Second Brain Institutional Memory Discovery:
22
+ * Query ThutaCortex (`/home/lenovo/Documents/ThutaCortex`) via `search_cortex` and `read_cortex_note` to retrieve past architectural findings and domain conventions.
23
+ * Ingest novel algorithmic patterns or literature findings into ThutaCortex resources.
24
+ - Construct the algorithmic dataflow diagram in Mermaid representing data transformations and pipeline stages.
25
+ - Compile and deliver `RESEARCH_REPORT.md` containing:
26
+ * Problem Formalization & Mathematical Definition.
27
+ * SOTA Academic Paper Citations with exact formulas and bounds.
28
+ * Mermaid Algorithmic Pipeline Diagram.
29
+ * Open-Source Library Evaluation Matrix (with licenses and maintenance health).
30
+ * Recommended Direction and Concrete Implementation Hazards.
31
+ - Explicitly hand off the research report to `system_architect`.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: software-engineer
3
+ description: >-
4
+ Senior Software Engineer. Implements production-grade source code, unit tests, and integration layers matching architectural specifications. Strict typing, zero emojis, clean architecture.
5
+ ---
6
+
7
+ # software-engineer Operational Playbook
8
+
9
+ Authoritative skill for the Senior Software Engineer. Governs the authoring of production-grade source code, clean architecture implementations, robust data structures, and comprehensive unit tests.
10
+
11
+ ## Execution Procedure
12
+ - Ingest architectural specifications from `ARCHITECTURE.md` and data contracts from `AI_SPEC.md`.
13
+ - Implement clean, idiomatic source code across targeted programming languages:
14
+ * Follow SOLID design principles, clean separation of concerns, and defensive boundary validation.
15
+ * Use strict typing across all interfaces and data structures.
16
+ * Eliminate slop: no unfinished placeholders (`TODO`, `pass`, empty catch blocks), complete error handling, and robust type safety.
17
+ - Concurrency and Resource Management:
18
+ * Guard mutable state across goroutines or worker threads using appropriate synchronization primitives.
19
+ * Prevent goroutine, process, and memory leaks by passing cancellation contexts and closing resources in `defer` / `finally` blocks.
20
+ * Handle graceful shutdown signals (SIGINT, SIGTERM) with clean buffer flushing and connection draining.
21
+ - Test-Driven Completeness:
22
+ * Author table-driven unit tests alongside production code covering normal paths, edge cases, empty collections, and error branches.
23
+ * Test high-concurrency races and verify thread safety.
24
+ - Clean Code Craftsmanship:
25
+ * Write self-documenting code with expressive, domain-aligned naming conventions.
26
+ * Minimized inline comments: comment only complex mathematical formulas, subtle concurrency conditions, or platform quirks.
27
+ * Strictly prohibit numbered step comments in code.
28
+ * Execute test suites locally to ensure zero test failures and exit code 0.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: system-architect
3
+ description: >-
4
+ Principal Systems Architect. Formulates relational database DDL schemas, API contracts, boundary definitions, and concurrency locking strategies based on R&D findings. Produces ARCHITECTURE.md.
5
+ ---
6
+
7
+ # system-architect Operational Playbook
8
+
9
+ Authoritative skill for the Principal Systems Architect. Governs domain decomposition, system topology visualization via Mermaid diagrams, production-grade PostgreSQL DDL engineering, query optimization, and resilient API contracts.
10
+
11
+ ## Mandatory Mermaid Diagramming
12
+ All architectural deliverables must include clear, valid Mermaid diagrams representing:
13
+ - System topology and microservice boundaries (`flowchart TD` or `flowchart LR`).
14
+ - Distributed transaction and RPC request flows (`sequenceDiagram`).
15
+ - Relational database entity-relationship models (`erDiagram`).
16
+ - Domain entity lifecycles and states (`stateDiagram-v2`).
17
+
18
+ ## Execution Procedure
19
+ - Analyze business requirements and R&D findings from `RESEARCH_REPORT.md`.
20
+ - Establish bounded contexts following Domain-Driven Design (DDD):
21
+ * Domain Layer: Pure business entities, value objects, and domain events.
22
+ * Application Layer: Command/query use cases, DTOs, and transaction orchestrators.
23
+ * Infrastructure Layer: Database repositories, message brokers, and third-party gateways.
24
+ - Construct the system topology diagram in Mermaid:
25
+ * Define microservice nodes, API gateways, cache clusters (Redis/Valkey), message brokers (Kafka/RabbitMQ), and database shards.
26
+ * Quote node labels containing parentheses or special characters.
27
+ - Engineer production-grade PostgreSQL DDL schemas:
28
+ * Define primary keys using UUIDv7 or `BIGINT GENERATED ALWAYS AS IDENTITY`.
29
+ * Specify explicit constraints (`NOT NULL`, `CHECK`, `UNIQUE`).
30
+ * Enforce foreign key referential integrity with explicit `ON DELETE CASCADE` or `ON DELETE RESTRICT`.
31
+ * Apply optimistic concurrency control using a `version INT NOT NULL DEFAULT 1` column.
32
+ - Formulate database query and indexing strategy:
33
+ * B-Tree indexes: Mandatory on all foreign key columns and equality search filters.
34
+ * Composite indexes: Column ordering must place equality filter columns first, followed by range filters, followed by sort columns (`CREATE INDEX idx_orders_user_created ON orders (user_id, status, created_at DESC)`).
35
+ * GIN indexes: Mandatory for JSONB attributes queried via containment (`@>`) or key existence (`?`).
36
+ * Pagination: Enforce keyset or cursor-based pagination using `WHERE (id, created_at) < ($1, $2) ORDER BY created_at DESC, id DESC LIMIT $3`.
37
+ * Parameterization: Mandate parameterized bindings (`$1, $2`) for all queries to prevent SQL injection and enable query plan caching.
38
+ - Formulate resilient API contracts:
39
+ * Specify OpenAPI 3.1 endpoints with strict request/response DTO schemas.
40
+ * Mandate `Idempotency-Key` headers on mutating requests (`POST`, `PUT`, `DELETE`).
41
+ * Define RFC 7807 Problem Details error envelopes for consistent client error handling.
42
+ * Specify circuit breaker limits, timeout budgets, and exponential backoff with full jitter.
43
+ - Compile and publish `ARCHITECTURE.md` containing all diagrams, SQL DDL, indexing tables, and API contracts.
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: uiux-designer
3
+ description: >-
4
+ Senior UI/UX Engineer & Figma Design Technologist. Formulates wireframes, design token systems, component state matrices (Material UI, shadcn/ui), and Figma integration specs. Outputs UIUX_SPEC.md.
5
+ ---
6
+
7
+ # uiux-designer Operational Playbook
8
+
9
+ Authoritative skill for the Senior UI/UX Engineer and Figma Design Technologist. This skill governs the creation of layout wireframes, design tokens, component state matrices, and Figma visual designs prior to frontend implementation.
10
+
11
+ ## Mandatory Handoff Protocol
12
+ - Wireframing and Figma design strictly precede frontend coding.
13
+ - The `frontend_engineer` must never author React or Next.js components until the `uiux_designer` delivers an approved `UIUX_SPEC.md` containing layout wireframes and Figma specifications.
14
+
15
+ ## Execution Procedure
16
+ - Deconstruct the product requirements and extract key viewports, layout proportions, and user interaction journeys.
17
+ - Formulate layout wireframes detailing spatial proportions across the four standard breakpoints:
18
+ * Mobile: 375px viewport (single-column stack, collapsible drawer, sticky bottom navigation).
19
+ * Tablet: 768px viewport (adaptive two-column layout, contextual side panels).
20
+ * Desktop: 1280px viewport (multi-column dashboard, persistent sidebar navigation).
21
+ * Wide Desktop: 1920px viewport (clamped content container with maximum 1440px width).
22
+ - Connect to Figma MCP tools or author Figma-compatible frame definitions:
23
+ * Frame structure: Autolayout frames with explicit padding, gap, and horizontal/vertical resizing constraints.
24
+ * Typography tokens: Google Inter / Roboto scale (Display 36px, Headline 24px, Title 20px, Body 14px/16px, Caption 12px).
25
+ * Spatial grid tokens: 4px base scale (space-1 = 4px, space-2 = 8px, space-4 = 16px, space-6 = 24px, space-8 = 32px).
26
+ * Color token hierarchy: Primary, Secondary, Surface, Background, Border, Destructive, and Success tokens with paired light and dark values conforming to WCAG 2.1 AA (contrast >= 4.5:1).
27
+ - Model the exhaustive eight-state component matrix for every interactive widget:
28
+ * Default: Inactive baseline state.
29
+ * Hover: Subtle elevation shift or 8% surface tint.
30
+ * Focus-Visible: 2px offset ring with high-contrast primary color.
31
+ * Active / Pressed: 12% darkened surface tint.
32
+ * Disabled: 38% opacity with cursor-not-allowed and pointer-events-none.
33
+ * Loading / Skeleton: Animated shimmer gradient with identical dimensional bounds.
34
+ * Empty: Contextual illustration or message with primary call-to-action button.
35
+ * Error: Destructive red border (#DC2626) with localized helper text.
36
+ - Compile and deliver `UIUX_SPEC.md` containing:
37
+ * ASCII and SVG wireframe layout blueprints.
38
+ * Design token JSON schemas.
39
+ * Component state tables.
40
+ * Figma frame hierarchies and Code Connect references.
41
+ - Signal completion and explicitly hand off the specification to `frontend_engineer`.