### Installer Output Example Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/MONOREPO_INSTALLATION.md This is an example of the informational output displayed when running the installer, showing the detected workspace directory and the installation target. ```text ╔════════════════════════════════════════════════════════════════╗ ║ ║ ║ AIDLC Design Review Hook - Installation Tool ║ ║ Version 1.0 ║ ║ ║ ╚════════════════════════════════════════════════════════════════╝ ℹ Detected workspace directory: /home/ec2-user/github/aidlc-workflows ℹ Installation target: /home/ec2-user/github/aidlc-workflows/.claude ✓ Bash 4.5.0(1)-release - OK ... ``` -------------------------------- ### Clone Repository and Setup Development Environment Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-traceability/requirements/technical-environment-traceability-matrix-tool.md Clone the repository, install uv, create a virtual environment, and install dependencies. This setup is for development purposes. ```bash # Clone repository git clone https://github.com/org/aidlc-traceability.git cd aidlc-traceability # Install uv if not already installed curl -LsSf https://astral.sh/uv/install.sh | sh # Create virtual environment and install dependencies uv sync # Run tests uv run pytest # Run linting uv run ruff check . # Run type checking uv run mypy src/ # Install in development mode uv pip install -e . # Run CLI traceability --help ``` -------------------------------- ### Quick Start Installation (macOS/Linux) Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/README.md Quickly install the design review hook on macOS or Linux by navigating to your workspace and running the appropriate install script. ```bash cd /path/to/your/workspace ./tool-install/install-mac.sh # macOS ./tool-install/install-linux.sh # Linux ``` -------------------------------- ### Quick Start Installation (Windows PowerShell) Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/README.md Quickly install the design review hook on Windows using PowerShell by navigating to your workspace and running the installation script. ```powershell cd C:\path\to\your\workspace .\tool-install\install-windows.ps1 ``` -------------------------------- ### Quick Start Installation (Windows Git Bash/WSL) Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/README.md Quickly install the design review hook on Windows using Git Bash or WSL by navigating to your workspace and running the installation script. ```bash cd /path/to/your/workspace ./tool-install/install-windows.sh ``` -------------------------------- ### Install Prerequisites on Linux (Ubuntu/Debian) Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/INSTALLATION.md Installs yq by downloading the binary and makes it executable, then installs Python 3 and PyYAML using apt-get and pip. ```bash sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 sudo chmod +x /usr/local/bin/yq sudo apt-get install python3 python3-pip pip3 install pyyaml ``` -------------------------------- ### Install and Verify Design Reviewer Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/README.md Clone the repository, install dependencies using uv sync, activate the virtual environment, and verify the installation by checking the version and running tests. ```bash git clone cd design-reviewer uv sync --extra test # installs runtime + test dependencies source .venv/bin/activate # Linux/Mac .venv\Scripts\activate # Windows # Verify installation design-reviewer --version # Run tests to verify everything works pytest # Run all 743 tests (~30 seconds) ``` -------------------------------- ### Installation Scripts Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/tool-install/README.md These are the installation scripts for different operating systems. ```bash # macOS/Linux: ./install-mac.sh or ./install-linux.sh # Windows PowerShell: .\install-windows.ps1 # Windows Git Bash/WSL: ./install-windows.sh ``` -------------------------------- ### Backward Compatible Standalone Installation Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/MONOREPO_INSTALLATION.md Shows the traditional method of installing the hooks by copying the tool-install directory to a workspace and then running the installer. This approach remains supported. ```bash # Traditional approach (still works) cp -r scripts/aidlc-designreview/tool-install /path/to/workspace/ cd /path/to/workspace ./tool-install/install-linux.sh ``` -------------------------------- ### Copy Example Configuration File Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/docs/hook/TESTING.md Create a local configuration file by copying the example. This file can then be edited to customize hook behavior. ```bash cp .claude/review-config.yaml.example .claude/review-config.yaml ``` -------------------------------- ### Install PMD via Homebrew Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Install the PMD static analysis tool using Homebrew. ```bash brew install pmd ``` -------------------------------- ### Install aidlc-traceability using uv or pip Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-traceability/requirements/technical-environment-traceability-matrix-tool.md Use this command to install the package manager. Then, install the aidlc-traceability package using either uv or pip. ```bash uv tool install aidlc-traceability ``` ```bash pip install aidlc-traceability ``` -------------------------------- ### Complete Example Question File Source: https://github.com/awslabs/aidlc-workflows/blob/main/aidlc-rules/aws-aidlc-rule-details/common/question-format-guide.md An example of a complete question file demonstrating the required structure for multiple questions. ```markdown # Requirements Clarification Questions Please answer the following questions to help clarify the requirements. ## Question 1 What is the primary user authentication method? A) Username and password B) Social media login (Google, Facebook) C) Single Sign-On (SSO) D) Multi-factor authentication E) Other (please describe after [Answer]: tag below) [Answer]: ## Question 2 Will this be a web or mobile application? A) Web application B) Mobile application C) Both web and mobile D) Other (please describe after [Answer]: tag below) [Answer]: ## Question 3 Is this a new project or existing codebase? A) New project (greenfield) B) Existing codebase (brownfield) C) Other (please describe after [Answer]: tag below) [Answer]: ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-evaluator/CONTRIBUTING.md Clone the repository and install project dependencies using uv. ```bash git clone cd aidlc-evaluation-framework uv sync ``` -------------------------------- ### Install and Run AIDLC Code Reviewer Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Clone the repository, set up a virtual environment, install the package, and run a code review. ```bash cd AIDLC-CodeReviewer python3 -m venv .venv source .venv/bin/activate # macOS / Linux # .venv\Scripts\activate # Windows pip install -e . aidlc-code-reviewer ./src ``` -------------------------------- ### Install AIDLC Design Reviewer CLI Source: https://github.com/awslabs/aidlc-workflows/blob/main/README.md Install the AIDLC Design Reviewer CLI tool. Ensure you are in the correct directory and activate the virtual environment before running the installation command. ```bash cd scripts/aidlc-designreview uv sync --extra test source .venv/bin/activate # Linux/Mac design-reviewer --aidlc-docs /path/to/aidlc-docs ``` -------------------------------- ### Install AIDLC Traceability Tool Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-traceability/README.md Clone the repository and install the tool in development mode using uv sync. Requires Python 3.12 or higher. ```bash git clone cd AIDLC-Traceability uv sync ``` -------------------------------- ### Install and Run AIDLC Code Reviewer Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/README.md Instructions for installing the tool using uv or pip and running a code review. ```bash cd scripts/aidlc-codereview # Install with uv (recommended) uv sync # Or install with pip pip install -e . # Run a review aidlc-code-reviewer ./path/to/code ``` -------------------------------- ### Install AIDLC Traceability Matrix Tool Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-traceability/requirements/PR-FAQ.md Install the tool using pip. This command is required before running the traceability generation. ```bash pip install aidlc-traceability ``` -------------------------------- ### Install Checkstyle via Homebrew Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Install the Checkstyle code formatter using Homebrew. ```bash brew install checkstyle ``` -------------------------------- ### Install Dependencies with uv Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-evaluator/test_cases/sci-calc/golden-aidlc-docs/construction/build-and-test/build-instructions.md Use this command to install all project dependencies, including development extras, when using `uv` as the package manager. ```bash uv sync --all-extras ``` -------------------------------- ### Example README Template for Patterns Source: https://github.com/awslabs/aidlc-workflows/blob/main/docs/writing-inputs/technical-environment-guide.md A template for README files accompanying example code, detailing pattern usage and customization. ```markdown # [Pattern Name] Example ## What This Demonstrates [One paragraph describing the pattern.] ## When to Use - [Condition 1] - [Condition 2] ## When Not to Use - [Condition 1 - with alternative reference] ## File Inventory | File | Purpose | | --------------- | ---------------------- | | handler.ts | Example implementation | | handler.test.ts | Test pattern | ## Customization Guide | Element | Customize? | Notes | | ------------------------ | ----------- | -------------------------------- | | Error handling structure | No | Must follow project standard | | Business logic | Yes | Replace with actual domain logic | | Route path | Yes | Follow API naming conventions | | Logging calls | No | Keep structured logging format | ## Related Standards - [Link to API Design Standards section] - [Link to Error Handling pattern] ``` -------------------------------- ### Post-Run Test Evaluation Commands Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-evaluator/ARCHITECTURE.md Examples of commands executed during the post-run test evaluation stage for dependency installation and test execution. ```bash uv pip install -e ".[dev]" ``` ```bash uv run pytest ``` -------------------------------- ### Install Ruff via Pip Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Install the Ruff linter. This is often installed automatically. ```bash pip install ruff ``` -------------------------------- ### Update Aidlc-Designreview Hook Installation Scripts Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/README.md These bash and PowerShell scripts are used to update an existing Aidlc-Designreview hook installation. The installer automatically backs up the current installation before proceeding. ```bash ./tool-install/install-mac.sh # macOS ./tool-install/install-linux.sh # Linux ."/tool-install/install-windows.ps1" # Windows PowerShell ./tool-install/install-windows.sh # Windows Git Bash/WSL ``` -------------------------------- ### Install Semgrep via Pip Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Install the Semgrep security analysis tool. This is often installed automatically. ```bash pip install semgrep ``` -------------------------------- ### Install Vulture via Pip Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Install the Vulture dead code finder. This is often installed automatically. ```bash pip install vulture ``` -------------------------------- ### Example Prompt Building Command Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/docs/HOOK_CONVERSION_PLAN.md Illustrates the command used to construct a review prompt using aggregated design content. ```bash $ build_review_prompt "$design_content" ``` -------------------------------- ### Install Radon via Pip Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Install the Radon complexity analysis tool. This is often installed automatically. ```bash pip install radon ``` -------------------------------- ### Install Mypy via Pip Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Install the Mypy static type checker. This is often installed automatically. ```bash pip install mypy ``` -------------------------------- ### Install Bandit via Pip Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Install the Bandit security analysis tool. This is often installed automatically. ```bash pip install bandit ``` -------------------------------- ### Traceability CLI Example Usage Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-traceability/requirements/technical-environment-traceability-matrix-tool.md Illustrates various ways to use the traceability tool's CLI. Examples cover generating different report formats, specifying output locations, and configuring AI and AWS settings. ```bash # Generate markdown report with AI analysis (default) traceability generate # Generate both markdown AND HTML reports simultaneously traceability generate --format both # Generate interactive HTML report only traceability generate --format html # Output to specific directory (NEW: accepts directory, not file path) traceability generate --output /tmp/reports # Analyze different project traceability generate --input /path/to/project # Skip AI analysis (faster, rule-based only) (NEW: --no-ai flag) traceability generate --no-ai # Use specific AWS profile and region for Amazon Bedrock (NEW: AWS configuration) traceability generate --profile default --region us-east-1 # Verbose output with AI analysis traceability generate --verbose # Complete example: both formats with AI, custom output location traceability generate --input ~/my-project --output ~/reports --format both --verbose ``` -------------------------------- ### Install Dependencies and Run Tests Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-evaluator/README.md Installs project dependencies using 'uv sync' and runs all unit tests with 'uv run python run.py test'. Note that some tests may fail on Windows due to reliance on Unix shell commands. ```bash # Install dependencies uv sync # Run all unit tests uv run python run.py test # Note: On Windows, 7 tests in test_run_command.py are expected to fail # because they use Unix shell commands (echo, exit, sleep, etc.) not available on Windows. ``` -------------------------------- ### Install Pylint via Pip Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Install the Pylint linter. This tool does not have a built-in wrapper and requires manual installation. ```bash pip install pylint ``` -------------------------------- ### Set Custom Installation Path Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/INSTALLATION.md Modify the installer scripts to specify a custom target directory for the AIDLC Design Review Hook installation. ```bash # Edit installation path TARGET_DIR="/path/to/custom/location" ``` -------------------------------- ### Setup Cline Rules Directory (Unix/Linux/macOS) Source: https://github.com/awslabs/aidlc-workflows/blob/main/README.md Copies core workflow and rule details to the .clinerules and .aidlc-rule-details directories respectively. Assumes rules are in ~/Downloads/aidlc-rules/. ```bash mkdir -p .clinerules cp ~/Downloads/aidlc-rules/aws-aidlc-rules/core-workflow.md .clinerules/ mkdir -p .aidlc-rule-details cp -R ~/Downloads/aidlc-rules/aws-aidlc-rule-details/* .aidlc-rule-details/ ``` -------------------------------- ### Install AIDLC Design Review Hook Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/INSTALLATION.md Run the appropriate installer script for your operating system to install or update the AIDLC Design Review Hook. ```bash ./tool-install/install-mac.sh ``` ```bash ./tool-install/install-linux.sh ``` ```powershell .\tool-install\install-windows.ps1 ``` ```bash ./tool-install/install-windows.sh ``` -------------------------------- ### Use Custom Configuration Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Specify a custom configuration file for the code reviewer. ```bash aidlc-code-reviewer --config my-config.yaml ``` -------------------------------- ### Start Services Locally Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-evaluator/test_cases/all-stages/golden-aidlc-docs/aidlc-docs/construction/build-and-test/build-and-test-summary.md Commands to launch the Catalog and Lending services using Uvicorn on their respective ports. ```bash # Start Catalog Service (port 8000) cd workspace/catalog-service uv run uvicorn catalog_service.main:app --host 0.0.0.0 --port 8000 # Start Lending Service (port 8001) cd workspace/lending-service uv run uvicorn lending_service.main:app --host 0.0.0.0 --port 8001 ``` -------------------------------- ### Frameworks and Libraries Section Example Source: https://github.com/awslabs/aidlc-workflows/blob/main/docs/writing-inputs/technical-environment-guide.md Details the required and preferred frameworks and libraries for a project, including their versions, domains, and rationale for use. This section is applicable to both greenfield and brownfield projects. ```markdown ## Frameworks and Libraries ### Required Frameworks [Frameworks that must be used for their respective domains.] | Framework/Library | Version | Domain | Rationale | |-------------------|---------|--------|-----------| | React | 18.x | Frontend UI | Organizational standard | | Express | 4.x | API layer | Lightweight, team familiarity | | AWS CDK | 2.x | Infrastructure as Code | AWS deployment target | | Jest | 29.x | Unit testing | Consistent test runner across projects | ### Preferred Libraries [Libraries that should be used when their capability is needed, but are not mandatory if the capability is not required.] | Library | Purpose | Use When | |---------|---------|----------| | Zod | Runtime type validation | Any external data ingestion or API input | | Pino | Structured logging | All services that emit logs | | Axios | HTTP client | Outbound HTTP calls from services | ``` -------------------------------- ### Install and Configure AIDE for File Integrity Monitoring Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-designreview/docs/security/THREAT_MODEL.md This snippet demonstrates installing AIDE (Advanced Intrusion Detection Environment) on Ubuntu/Debian or RHEL/CentOS systems, configuring it to monitor specific directories, and initializing its baseline database. It also shows how to schedule daily integrity checks via cron. ```bash # Option A: Using AIDE (Advanced Intrusion Detection Environment) # Step 1: Install AIDE sudo apt-get install aide # Ubuntu/Debian sudo yum install aide # RHEL/CentOS # Step 2: Configure AIDE sudo vi /etc/aide/aide.conf # Add monitored directories: # /path/to/aidlc-docs R+b+sha256 # /path/to/config R+b+sha256 # Step 3: Initialize baseline sudo aide --init sudo mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db # Step 4: Schedule daily checks echo "0 2 * * * root /usr/bin/aide --check | mail -s 'AIDE Report' security@example.com" | sudo tee -a /etc/crontab ``` -------------------------------- ### Configure Tools for Review Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/README.md Example configuration file specifying which static analysis tools to run during the code review process. ```yaml tools: - bandit - ruff - mypy - semgrep ``` -------------------------------- ### Install Gitleaks via Homebrew Source: https://github.com/awslabs/aidlc-workflows/blob/main/scripts/aidlc-codereview/docs/SETUP.md Install the Gitleaks secret detection tool using Homebrew. ```bash brew install gitleaks ``` -------------------------------- ### uv Package and Environment Management Commands Source: https://github.com/awslabs/aidlc-workflows/blob/main/docs/writing-inputs/example-tech-env-scientific-calculator-api.md Standard commands for initializing projects, adding/removing dependencies, running commands within the project environment, and managing lockfiles using uv. ```bash # Project initialization (already done; do not re-run) uv init calcengine cd calcengine # Adding dependencies uv add fastapi # Add a runtime dependency uv add uvicorn[standard] # Add with extras uv add --dev pytest pytest-cov # Add a development dependency uv add --dev mypy ruff # Add dev tooling # Removing dependencies uv remove requests # Remove a dependency # Running commands in the project environment uv run python -m calcengine.main # Run application uv run pytest # Run tests uv run mypy src/ # Run type checker uv run ruff check src/ # Run linter # Syncing environment from lockfile uv sync # Install all dependencies from uv.lock uv sync --dev # Include dev dependencies # Lockfile management # uv.lock is auto-generated. NEVER edit it manually. # uv.lock MUST be committed to version control. ```