This document provides guidance for AI agents working with this project.
- Project Name: Coverage Redesign Analysis
- Description: Research and analysis repository for Coverage Redesign project at IncludedHealth. Contains data extraction scripts, traffic control simulation planning, architecture analysis, and client profiling tools.
- Type: Research/Analysis Repository (NOT production code)
- Primary Languages: JavaScript (Node.js), Python
- Key Focus Areas:
- Apollo GraphQL operation analysis
- Real-Time Eligibility (RTE) traffic control simulation
- Client profiling and API usage patterns
- Metrics analysis (Prometheus/Grafana)
- Setup: No build process required - scripts run directly
- Node.js Scripts: Run with
node script.js - Python Scripts: Run with
python script.pyoruv run python script.py - Environment Variables:
APOLLO_KEY: Required for Apollo Studio API accessAPOLLO_GRAPH_REF: Optional Apollo graph reference
node fetch-apollo-operation-details.js --all- Fetch Apollo Studio operation detailsnode match-by-field-signature.js- Match operations to persisted query manifestpython graphql_operations_monthly.py- Analyze GraphQL operations from Prometheuspython client_profile.py --service <name>- Generate client profiles
node operations-by-client-stats.js --improved- Generate client operation statisticspython trading_partner_histogram_weekly.py- Analyze trading partner patternspython inspect_metrics.py- Inspect Prometheus metrics
When creating a new branch to work on a JIRA issue:
-
First, set the AWS environment to UAT:
aws-environment uat
-
Then, create the branch using the TNG JIRA tool:
tng jira start
The tng jira start command will automatically create a properly named branch based on the JIRA issue you're working on.
Note: If tng jira start doesn't work or requires arguments, you can manually create a branch:
git checkout -b fix/ACT-XXXX-descriptionWhen implementing a fix for a JIRA issue (e.g., from triage documents):
-
Navigate to the correct repository:
- Most fixes will be in one of the workspace repositories (e.g.,
member-sponsorship,coverage, etc.) - Use absolute paths when working with files:
$IH_HOME/repo-name/...(or~/src/github.com/ConsultingMD/repo-name/...ifIH_HOMEis not set)
- Most fixes will be in one of the workspace repositories (e.g.,
-
Create a branch:
- Try
tng jira startfirst (may require AWS environment setup) - Fallback:
git checkout -b fix/ACT-XXXX-description
- Try
-
Implement the fix:
- Read the relevant code files to understand the issue
- Make the necessary code changes
- Follow existing code style and patterns
- Add/update comments as needed
-
Add test coverage:
- Add test cases for the fix, especially boundary conditions
- Ensure existing tests still pass
- Run tests if possible (may have unrelated test failures in other files)
-
Commit changes:
git add <files> git commit -m "Fix ACT-XXXX: Description Detailed explanation of the fix, including: - What was wrong - How it was fixed - What test coverage was added Fixes: ACT-XXXX"
- If pre-commit hooks fail due to unrelated issues, use
--no-verifyflag
- If pre-commit hooks fail due to unrelated issues, use
-
Push and create PR:
git push -u origin fix/ACT-XXXX-description gh pr create --title "Fix ACT-XXXX: Description" --body "PR description with details"
-
Clean up unrelated files:
- If the branch includes unrelated files (e.g., from previous work), remove them:
git rm <unrelated-file> git checkout main -- <file-to-revert> git commit -m "Remove unrelated files from ACT-XXXX PR" git push
- If the branch includes unrelated files (e.g., from previous work), remove them:
-
Perform code review:
- Review your own PR for quality
- Check for:
- Correctness of the fix
- Code style consistency
- Test coverage
- Edge cases handled
- Documentation/comments
- Address any suggestions from code review
-
Post to JIRA:
- Use the Atlassian MCP tools to add a comment to the JIRA issue:
mcp_Atlassian_addCommentToJiraIssue({ cloudId: "includedhealth.atlassian.net", issueIdOrKey: "ACT-XXXX", commentBody: "## Ready for Review\n\n[Summary of fix and PR link]" })
- Include:
- PR link
- Summary of changes
- Code review status
- Confirmation it's ready for review
- Use the Atlassian MCP tools to add a comment to the JIRA issue:
Example workflow for ACT-2217:
- Issue: Date validation off-by-one error
- Repository:
member-sponsorship - Files changed:
app/database/dynamo/canonical_eligibility_with_pdid.goand test file - Fix: Changed date comparison logic from
endAtTime.AddDate(0, 0, 1).Before(activeOn)to!activeOn.Before(startOfNextDay) - Tests: Added boundary condition test case
- PR: https://github.com/ConsultingMD/member-sponsorship/pull/429
- JavaScript Scripts: Apollo Studio data extraction and analysis
- Python Scripts: Metrics analysis, client profiling, trading partner analysis
- Design Documents:
spec.md,prd.md,RTE_*.md- Architecture and analysis documents - Data Files: JSON/CSV/YAML files with extracted data and analysis results
- This is a meta-project workspace - references 11 related repositories via
project.yaml - No symlinks - repositories accessed via workspace folder configuration
- Scripts are exploratory/analysis-focused, not production code
- Output files (JSON/CSV/YAML) are checked in for reference
This project uses a meta project approach for managing multi-repository workspaces. Instead of using symlinks, repositories are managed through:
project.yaml- The single source of truth that defines which repositories should be included in the workspace- Workspace folders - Repositories are added as folders in the VS Code/Cursor workspace file (
coverage-redesign.code-workspace) with relative paths
- The
project.yamlfile defines all repositories that should be part of this workspace - The workspace file (
coverage-redesign.code-workspace) contains folder entries with relative paths (e.g.,../coverage,../customer-configuration) - Folders marked with
metaManaged: trueare automatically managed by the meta-sync tool - No symlinks are used - all repositories are referenced via relative paths in the workspace configuration
The following repositories are included in this workspace (as defined in project.yaml):
ih-projectsproject-coverage-redesign(this repository)coveragecustomer-configurationgo-commonmember-sponsorshipproto-commonrealtime-eligibilitysupport-toolsplatform-map
To add or remove repositories:
- Edit
project.yamlto add/remove repository entries - Run the
meta-synctool (if available) to regenerate the workspace file - Or manually update
coverage-redesign.code-workspaceto reflect the changes
Important: Do not create symlinks in the project directory. All repository access is handled through the workspace configuration.