- Home
- Skills
- Agents & Orchestration
- engineering methodology
Works with the AI Agents you already use
engineering methodology
A specification-driven engineering method for planning, building, and validating verifiable software increments.
Free
engineering methodology
Example session with this skill installed
See Engineering Methodology in Action User prompt I have an existing REST API built with Python and FastAPI. I want to implement a rate-limiting system to prevent abuse. **The solution must** - Limit requests per IP address. - Support configurable limits. - Return HTTP 429 when the limit is exceeded. - Avoid blocking legitimate users. - Be testable and maintainable. Analyze the requirements, propose an implementation strategy, identify edge cases, and define how the solution should be validated before implementation. --- **Skill execution:** Engineering Methodology 1. Problem analysis **Objective:** Introduce request throttling without disrupting legitimate API usage. Requirement| Expected behavior IP identification| Identify clients by IP Configurable limits| Support adjustable request thresholds Request control| Reject excessive requests HTTP response| Return status 429 Maintainability| Keep rate limiting modular Reliability| Handle concurrent requests safely **Initial assumptions** - The application uses FastAPI. - The API is deployed behind a possible reverse proxy. - The storage backend has not yet been specified. - Rate limits must be configurable without modifying application logic. 2. Architecture proposal **Recommended architecture** Incoming Request | v Client IP Identification | v Rate Limit Middleware | v Counter Storage | v Limit Evaluation | +---+---+ | | Allowed Exceeded | | v v API HTTP 429 Handler Response **Technical recommendation** Use a dedicated rate-limiting component with a storage abstraction. For a single-instance deployment, an in-memory implementation may be sufficient. For multiple application instances, use Redis or another shared atomic storage backend. Do not trust forwarded IP headers unless the reverse proxy configuration is explicitly trusted. 3. Implementation plan Priority| Task| Expected result P0| Define configuration| Adjustable limits P0| Implement client identification| Reliable IP extraction P0| Implement counter storage| Consistent request tracking P0| Implement middleware| Centralized request control P1| Add HTTP 429 response| Correct API behavior P1| Add automated tests| Verified expected behavior P2| Add observability| Monitoring and diagnostics 4. Edge-case analysis **The implementation must account for** - Missing or malformed client IP information. - Spoofed forwarded headers. - Concurrent requests. - Counter expiration. - Storage unavailability. - Multiple application instances. - IPv4 and IPv6 addresses. - Requests crossing the rate-limit boundary. These cases must be addressed explicitly rather than left to implementation assumptions. 5. Validation strategy Test| Expected result Request below limit| HTTP 200 Request at limit| HTTP 200 Request above limit| HTTP 429 Counter expiration| Requests become available again Different IP addresses| Independent counters Concurrent requests| No limit bypass Invalid forwarded header| Untrusted value ignored Storage failure| Defined failure policy **Example automated test** ```python def test_rate_limit_exceeded(client): for _ in range(5): response = client.get("/api/resource") assert response.status_code == 200 ``` response = client.get("/api/resource") assert response.status_code == 429 This is an illustrative test. Its exact behavior depends on the configured threshold and test environment. 6. Critical engineering review Before implementation approval, resolve three architectural questions: 1. Is the API deployed on one instance or multiple instances? 2. Is Redis already available? 3. Should storage failures fail open or fail closed? These decisions directly affect consistency, availability, and operational reliability. 7. Acceptance criteria The feature is considered ready for acceptance when: - Request limits are configurable. - Client identification follows trusted network boundaries. - Excess requests receive HTTP 429. - Counter behavior is consistent under concurrency. - Automated tests cover normal and exceptional scenarios. - Deployment and failure behavior are documented. 8. Final engineering assessment **Status:** Ready for implementation planning, not yet implementation-validated. The architecture and validation strategy are defined, but no code has been modified and no tests have been executed. The next step is to inspect the existing FastAPI repository, confirm its deployment topology, and implement the solution incrementally. --- What this demonstrates Engineering Methodology does not jump directly from a request to code generation. It establishes the engineering context, makes requirements explicit, identifies architectural trade-offs, anticipates failure scenarios, and defines measurable acceptance criteria before implementation. Understand. Specify. Design. Build. Test. Iterate.
- Read your context and instructions
- Compiled the engineering methodology
Engineering Assessment, FastAPI Rate Limiting 1. Executive Summary The requested feature is a configurable IP-based rate-limiting mechanism for an existing FastAPI application. The proposed solution uses a modular middleware architecture, configurable thresholds, controlled client identification, and a storage abstraction. The engineering approach prioritizes correctness under concurrent requests, maintainability, deployment compatibility, and measurable validation. **Assessment status:** Architecture defined. Ready for implementation planning. No source code has been modified and no tests have been executed at this stage. --- 2. Requirements Analysis ID| Requirement| Priority| Acceptance condition REQ-01| Identify clients by IP| Critical| Correct client identification REQ-02| Configure request limits| Critical| Limits configurable without code changes REQ-03| Track request counts| Critical| Consistent counter behavior REQ-04| Reject excessive requests| Critical| HTTP 429 returned REQ-05| Support concurrent requests| High| No limit bypass through race conditions REQ-06| Support multiple instances| High| Shared counter storage REQ-07| Handle storage failures| High| Explicit failure policy REQ-08| Provide automated tests| High| Acceptance scenarios covered Identified constraints - Existing FastAPI application must remain functional. - Middleware must not introduce unnecessary coupling. - Client IP information must not be trusted blindly. - Storage behavior must remain predictable under concurrency. - Deployment topology influences the storage implementation. --- 3. Proposed Architecture Component structure Application │ ├── Configuration │ ├── Request Threshold │ ├── Time Window │ └── Failure Policy │ ├── Rate Limiting Middleware │ │ │ ├── Client Identification │ │ │ ├── Request Evaluation │ │ │ └── Response Handling │ ├── Storage Interface │ ├── In-Memory Backend │ └── Redis Backend │ └── FastAPI Routes Request execution flow HTTP Request | v Identify Client IP | v Retrieve Request Counter | v Evaluate Rate Limit | +---- Within Limit | | | v | Continue | +---- Exceeded | v HTTP 429 Architectural decisions Decision| Recommendation| Rationale Integration| FastAPI middleware| Centralized request control Storage| Abstract interface| Backend independence Single instance| In-memory option| Minimal infrastructure Distributed deployment| Redis| Shared atomic counters IP identification| Trusted proxy configuration| Prevent spoofing Configuration| Environment-based settings| Deployment flexibility **Important:** In-memory storage is not suitable for consistent rate limiting across multiple application instances. --- 4. Implementation Strategy Phase| Task| Deliverable 1| Inspect existing application| Architecture understanding 2| Define configuration model| Configuration component 3| Implement client identification| IP identification service 4| Define storage contract| Storage interface 5| Implement counter backend| Counter management 6| Integrate middleware| Request interception 7| Implement HTTP responses| 429 handling 8| Execute validation| Test evidence 9| Review implementation| Technical assessment 10| Update documentation| Usage and configuration guide Implementation should proceed incrementally, validating each component before integrating the next. --- 5. Risk and Edge-Case Assessment Risk| Impact| Mitigation Spoofed forwarded headers| Incorrect client identification| Trust explicitly configured proxies Concurrent requests| Counter inconsistency| Atomic storage operations Storage outage| Rate-limit bypass or API outage| Explicit fail-open/fail-closed policy Multiple instances| Inconsistent counters| Shared storage backend Counter expiration| Incorrect request windows| Explicit expiration strategy IPv6 handling| Incorrect client grouping| Normalize IP representations Memory exhaustion| Resource degradation| Expiration and bounded storage Critical design consideration The failure policy must be explicitly selected: - Fail-open: requests continue if the rate-limit backend becomes unavailable. - Fail-closed: requests are rejected when rate limiting cannot be evaluated. This is an availability versus protection trade-off. The appropriate choice depends on the API's operational requirements. --- 6. Verification Strategy The following tests should be implemented before accepting the feature. Test scenario| Expected behavior Request below threshold| HTTP 200 Request at threshold| HTTP 200 Request above threshold| HTTP 429 Different client IPs| Independent counters Counter expiration| New request window Concurrent requests| Atomic limit enforcement Invalid forwarded headers| Untrusted values rejected Storage unavailable| Configured failure policy Multiple application instances| Shared counter consistency IPv4 and IPv6| Correct client identification Example automated test ```python def test_rate_limit_exceeded(client): for _ in range(5): response = client.get("/api/resource") assert response.status_code == 200 ``` response = client.get("/api/resource") assert response.status_code == 429 This example assumes a configured threshold of five requests and a clean counter state. It is illustrative, not evidence of an executed test. --- 7. Outstanding Engineering Decisions Three questions must be resolved before implementation: 1. Is the application deployed on a single instance or multiple instances? 2. Is Redis already available in the infrastructure? 3. Should the system fail open or fail closed when its storage backend becomes unavailable? These decisions influence architecture, implementation complexity, and operational behavior. --- 8. Acceptance Criteria **The feature can be accepted when** - All functional requirements are implemented. - Client identification respects trusted network boundaries. - Request counters behave correctly under concurrency. - Configured limits are consistently enforced. - Failure behavior matches the selected policy. - Automated tests cover normal and exceptional scenarios. - No existing API behavior is unintentionally broken. - Configuration and operational limitations are documented. --- 9. Final Assessment **Engineering status:** Design complete, implementation pending. The proposed architecture addresses the identified requirements and establishes a testable implementation strategy. The main unresolved architectural dependency is the deployment topology and associated storage strategy. The next action is to inspect the existing repository, establish its runtime and deployment constraints, resolve the three outstanding decisions, and begin implementation through independently verifiable increments. Recommended next steps 1. Inspect the existing FastAPI project. 2. Confirm deployment topology. 3. Select the storage backend. 4. Finalize the specification. 5. Implement the middleware incrementally. 6. Execute the validation suite. 7. Perform a regression and resource review. --- Engineering Methodology Understand → Specify → Design → Implement → Validate → Review → Iterate. The objective is not simply to make the feature work. It is to establish why it works, under which conditions, and what evidence supports that conclusion.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop shipping code based on guesses. This skill replaces "try and see" development with a disciplined, evidence-based engineering method that spans from initial problem framing to final delivery. It forces a systematic approach to technical decision-making, ensuring that every change is specified, designed for simplicity, and validated through observable evidence rather than developer confidence. ## What it does - **Problem Framing** translated vague requests into concrete functional requirements and testable acceptance criteria. - **Context Acquisition** identifies entry points, data flows, and architectural constraints in existing codebases before any changes are made. - **Incremental Implementation** breaks complex features into small, reviewable units that maintain system stability. - **Empirical Validation** maps specific implementation changes to execution results, ensuring tests actually ran and passed. - **Technical Traceability** generates lean documentation like ADRs, specification files, and validation reports to track the "why" behind the "what." ## How it works 1. **Analyze and Frame** the objective by identifying affected systems, constraints, and known unknowns. 2. **Inspect Context** to trace dependencies and execution flows within the repository. 3. **Draft Specifications** in `specs.md` to define behavior, failure paths, and success metrics. 4. **Execute and Validate** through ordered increments, concluding with a critical review of side effects and resource usage. ## Frameworks & tools This skill is framework-agnostic. It works across any stack including React, Node.js, Python, Go, Rust, or C++, and integrates with standard dev tools like lints, unit testers, and CI pipelines. ## Why this beats prompting it yourself Standard prompting often leads to "hallucinated" progress where an AI claims a fix works without verifying it. This skill enforces a decision gate that prevents implementation until context is clear and requires hard evidence for every validation claim. ## Use cases - Refactoring legacy modules where side effects are a high risk. - Architecting new features that require cross-component coordination. - Debugging complex race conditions or performance bottlenecks using a baseline-driven approach. - Drafting professional ADRs and technical documentation during the build process. ## Known limitations Does not perform dedicated security or compliance audits. Scale the method to the task; small fixes do not require full architectural documentation.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 17 days ago
- Free with an Agensi account
Permissions
What's inside
Frequently Asked Questions
New in Agents & Orchestration
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.