NYCGO Project - Claude Code Guide
Orients developers to a two-repo data pipeline and admin UI for NYC governance organizations, with sprint history, commands, and safety protocols.
What this file does
Orients developers to a two-repo data pipeline and admin UI for NYC governance organizations, with sprint history, commands, and safety protocols.
When to use it
- Onboarding to the NYCGO project
- Running or debugging the data pipeline
- Making schema or breaking changes to the golden dataset
- Setting up the multi-repo workspace locally
Assumes this stack
NYCGO Project - Claude Code Guide
This workspace contains two related repositories for managing NYC Governance Organizations data.
Multi-repo setup: If you're working with both
nyc-governance-organizationsandnycgo-admin-ui, create a parent folder containing both repos and copy this CLAUDE.md there. This gives Claude Code context across both repositories.mkdir nycgo && cd nycgo git clone <nyc-governance-organizations-url> git clone <nycgo-admin-ui-url> cp nyc-governance-organizations/CLAUDE.md .
Sprint Planning
Sprint documentation lives in nyc-governance-organizations/docs/sprints/:
Completed (in completed/ subfolder):
SPRINT_1.md- Admin UI InfrastructureSPRINT_2.md- Pipeline Testing & ValidationSPRINT_3.md- v1.1.2 Release Fix & Production Pipeline TestSPRINT_4.md- Edit Submission Rate LimitingSPRINT_4.5.md- Release Notes & Smart VersioningSPRINT_5.md- Data Quality & StandardizationSPRINT_6.md- Directory Logic Transparency & QA (Dec 2024, released v1.6.0)
Active/Planned (in root folder):
SPRINT_7.md- Cleanup & Technical Debt (schema docs, externalize configs, etc.)PHASE_II.md- Phase II Data Release (46-field schema, 9 new orgs - deferred indefinitely)
Repository Structure
/nycgo/
├── nyc-governance-organizations/ # Data pipeline & golden dataset
└── nycgo-admin-ui/ # Web-based admin interface
Both are symlinks to the actual repos.
Repository Overview
nyc-governance-organizations (Pipeline Repo)
Purpose: Data pipeline for processing, validating, and publishing the NYC Governance Organizations dataset.
Key Directories:
data/input/- Source QA edit filesdata/published/latest/- Single source of truth for golden datasetsdata/audit/runs/- Run artifacts with inputs/outputs/reviewdata/changelog.csv- Master append-only changelogsrc/nycgo_pipeline/- Python pipeline packagescripts/pipeline/- CLI entrypoints (run_pipeline.py, publish_run.py).github/workflows/publish-release.yml- Automated release workflow
Current Versions:
- v1.6.0 - Latest published (434 records, 38 fields, snake_case column names)
- v1.2.0 - Development (443 records, 46 fields, Phase II schema - deferred)
Pipeline Commands:
# Run pipeline
make run-pipeline GOLDEN=... QA=... DESCRIPTOR=...
# Publish a run
make publish-run RUN_ID=... VERSION=...
# Run tests
make test
nycgo-admin-ui (Admin UI Repo)
Purpose: Web-based interface for submitting individual organization edits.
Key Files:
js/config.js- Configuration (data sources, editable fields, GitHub settings)js/app.js- Main application logicjs/data.js- Data loading and parsingpending-edits/- Edits waiting to be processedprocessed-edits/- Archive of processed editsscheduled-edits/- Future-dated edits.github/workflows/process-edit.yml- Workflow to process edits
Current Configuration (config.js):
- Data source: GitHub raw file from
data/published/latest/NYCGO_golden_dataset_latest.csv - Batch review interface:
review-edits.htmlfor reviewing CSV uploads before commit - Workflow mode: Check repo variable WORKFLOW_MODE (test or production)
⚠️ IMPORTANT: Cache-Busting for JS Changes
When modifying any JavaScript files in nycgo-admin-ui/js/, you MUST update the cache-busting version in BOTH HTML files to ensure users get the new code:
- Edit
index.html- update all?v=YYYYMMDDparams to today's date - Edit
review-edits.html- update all?v=YYYYMMDDparams to today's date
Example: Change js/app.js?v=20260101 to js/app.js?v=20260108
Without this step, users may continue loading old cached JavaScript.
Data Flow
User submits edit in Admin UI
↓
CSV file committed to nycgo-admin-ui/pending-edits/
↓
process-edit.yml workflow runs
↓
Pipeline processes edit using nyc-governance-organizations
↓
Output committed to main branch
↓
publish-release.yml creates GitHub release (if test/prod mode)
↓
Artifacts available in data/published/latest/
Edit Format
Edits use a CSV format with these columns:
record_id,record_name,field_name,action,justification,evidence_url
Actions:
direct_set- Set field to specific valueappend_to_list- Append to semicolon-separated listremove_from_list- Remove from listgenerate_recordid- Auto-generate new RecordID
Workflow Modes
The process-edit.yml workflow has two modes (controlled by a single repo variable):
| Mode | Variable | Target Branch | Release |
|---|---|---|---|
| Test | WORKFLOW_MODE=test (default) | main | Draft |
| Production | WORKFLOW_MODE=production | main | Real |
Sprint 6 Completed (Dec 2024)
Sprint 6 focused on Directory Logic Transparency, field standardization, and QA:
- Directory rules module:
src/nycgo_pipeline/directory_rules.py- single source of truth - Regression tests: 70 test cases covering all organization types and edge cases
- snake_case standardization: All column names converted from PascalCase to snake_case
- Column ordering: Golden dataset columns aligned with published export order
- Edit UI enhancement: Shows directory eligibility status with reasoning
- Admin UI fixes: BOM handling in CSV parser, snake_case column support
- Workflow fix: Automatic release run detection uses name-based sorting (not mtime)
- QA fixes: URL corrections, release attribution, UI polish
Released: v1.6.0 with snake_case columns
Sprint 1 Completed (Dec 2024)
- Admin UI data source: Now uses
NYCGO_golden_dataset_latest.csvfromdata/published/latest/ - Batch edit review: New
review-edits.htmlinterface for reviewing CSV uploads before commit - Single source of truth:
data/published/latest/is now the only golden dataset location - data/working/ removed: Eliminated to prevent divergence; backup at
backup/pre-working-removal-*
Common Tasks
Check current data source
cat nycgo-admin-ui/js/config.js | grep github:
Find latest golden dataset
ls -la nyc-governance-organizations/data/published/latest/NYCGO_golden_dataset_*.csv
View pending edits
ls -la nycgo-admin-ui/pending-edits/
Test the admin UI locally
cd nycgo-admin-ui && python3 -m http.server 8000
Safety Protocols for Schema/Breaking Changes
When making changes to the golden dataset schema, field names, or other breaking changes:
1. Commit Before Breaking Changes
cd nyc-governance-organizations
git add -A && git commit -m "chore: Complete work before [change description]"
2. Create Baseline Tag
git tag v1.X.Y-pre-[change-name] -m "Stable baseline before [change description]"
This enables easy rollback if something goes wrong.
3. Make Changes
Update all affected files:
data/published/latest/NYCGO_golden_dataset_latest.csv- Data fileschemas/nycgo_golden_dataset.tableschema.json- Schema definitionscripts/process/export_dataset.py- Export logicsrc/nycgo_pipeline/*.py- Pipeline codetests/- Test fixtures and assertions
4. Run Tests
make test
Verify no new failures (pre-existing failures are documented in SPRINT_7.md).
5. Pipeline Smoke Test
echo "record_id,record_name,field_name,action,justification,evidence_url" > /tmp/empty_qa.csv
make run-pipeline GOLDEN=data/published/latest/NYCGO_golden_dataset_latest.csv \
QA=/tmp/empty_qa.csv \
DESCRIPTOR="post-change-test"
Verify: Golden=38 fields, Published=17 fields (or expected counts).
6. Clean Up Test Artifacts
rm -rf data/audit/runs/*post-change-test*
7. Commit Changes
Include the baseline tag reference in the commit message for traceability.
Schema Reference
Current (v1.8.x): 38 fields, snake_case column names, record_id format NYC_GOID_XXXXXX
Phase II: 46 fields (deferred indefinitely)
See nyc-governance-organizations/docs/SCHEMA.md for complete field documentation.
Key fields:
record_id,name,name_alphabetizedoperational_status,organization_type,urlin_org_chart,listed_in_nyc_gov_agency_directoryprincipal_officer_full_name,principal_officer_first_name,principal_officer_last_name,principal_officer_title
Release Assets & Artifacts
GitHub Release Assets (attached to each release):
NYCGO_golden_dataset_v{X.Y.Z}.csv- Versioned golden datasetNYCGO_golden_dataset_latest.csv- Same file, stable nameNYCGovernanceOrganizations_v{X.Y.Z}.csv- Public export (directory-eligible only)NYCGovernanceOrganizations_latest.csv- Same file, stable name
Pipeline Run Artifacts (data/audit/runs/<run_id>/):
<run_id>/
├── inputs/ # Copies of input files used
├── outputs/ # Generated files
│ ├── golden_pre-release.csv
│ ├── public_export.csv
│ └── run_summary.json
└── review/ # Diff and changelog files
Data Dictionary: docs/NYC_Agencies_and_Governance_Organizations_Data_Dictionary.xlsx
Primary Key: record_id (format: NYC_GOID_XXXXXX, unique per record)
Related Documentation
nyc-governance-organizations/README.md- Main pipeline docsnyc-governance-organizations/docs/- Detailed documentationdocs/PHASE_I_SCHEMA.md- Field definitions and typesnycgo-admin-ui/README.md- Admin UI docs
What's inside
9 sections covering repo structure, data flow, edit format, workflow modes, sprint summaries, common tasks, and safety protocols
Change this for your project
- Replace
nyc-governance-organizationswith your own pipeline repo name - Replace
nycgo-admin-uiwith your own admin UI repo name - Replace
NYC_GOID_XXXXXXwith your own record ID format - Replace
data/published/latest/NYCGO_golden_dataset_latest.csvwith your own dataset path
Where it goes
Save as CLAUDE.md in your repository root. Claude Code reads it automatically at the start of every session.
Worth borrowing
- Multi-repo CLAUDE.md placed in a parent folder to give Claude context across both repos
- Safety protocol with baseline tags and smoke tests before schema changes
- Cache-busting version strings in HTML files to force JS updates
Related Documents
Code indexing for AI agents: summarization strategies and evaluation systems
Synthesises 2024-2025 research on code indexing for AI agents, covering summarisation strategies, hybrid retrieval architectures, and evaluation benchmarks.
Claude AI Git Workflow Integration
Recommends using the git-ai-commit CLI tool for AI-generated commit messages instead of manual ones.
Missing Business Agents Research — FLUXION 2026
Identifies 12 missing business operations agents for an indie software company and ranks them by impact and effort with €0 implementation plans.
角色:金牌面试者
Prompts Claude to act as a resume consultant, collecting user info and generating a polished A4-format React resume component with STAR-format experience.