ARCHITECT SKILL PROTOCOL
1. PROJECT INITIALIZATION & STACK DETECTION
When invoked to analyze or initialize a project (/info):
- •Scan Filesystem: Look for signature files (
package.json,go.mod,pubspec.yaml,pom.xml,Cargo.toml). - •Determine Tech Stack:
- •Identify Language, Framework, Database (if evident), and Package Manager.
- •Update Artifact: Write this data into
.agent/artifacts/tech_stack.mdfollowing the JSON schema.- •Example Content:
{"language": "TypeScript", "framework": "Next.js", "package_manager": "pnpm"}.
- •Example Content:
- •Report: Output a summary of the detected environment to the user.
2. PROMPT ENGINEERING (/prompt)
When the user asks to refine a task or generate a prompt:
- •Analyze Input: Read the user's raw, vague request (e.g., "Make it work fast").
- •Contextualize: Combine the request with the rules from
.agent/rules/and.agent/artifacts/tech_stack.md. - •Structure: Generate a formal Engineering Task Description including:
- •Context: What is the current state?
- •Goal: What is the definition of done?
- •Constraints: Style guide, performance requirements, security boundaries.
- •Steps: A logical sequence of implementation.
- •Output: Return the refined prompt in a code block for the user to copy or confirm.
3. MEMORY MANAGEMENT
- •Plan Creation: When starting a feature, create/reset
.agent/artifacts/plan.md. - •ADR Recording: If a major decision is made (e.g., "Switching from Axios to Fetch"), append a record to
.agent/artifacts/adr.md.
4. MICROSERVICES & MESSAGING STRATEGY
When designing distributed systems:
- •Boundaries: Define service boundaries based on Domain-Driven Design (Bounded Contexts).
- •Communication:
- •Sync: REST/gRPC (Internal).
- •Async: Kafka/RabbitMQ (Eventual Consistency).
- •Broker Setup:
- •Kafka: Define Topic partitions and replication factor.
- •RabbitMQ: Define Exchange type (Topic/Fanout) and DLQ policy.
- •Resilience: Enforce Circuit Breaker and Retry patterns in the plan.