m12-pr13: /context Living Engineering Brain (19 files)#31
Open
BalaShankar9 wants to merge 1 commit into
Open
Conversation
Adds context/ documentation system per MASTER PROMPT: 18 enterprise-grade files (plus README index) documenting every concern in the application, cross-referencing existing canonical sources (blueprint, ADRs, runbooks, repo memory) rather than duplicating them. Files: PROJECT_OVERVIEW, ARCHITECTURE, FILE_TREE, FRONTEND, BACKEND, DATABASE, API, AUTH_SECURITY, AI, BUSINESS_LOGIC, DEVOPS_INFRA, TESTING, PERFORMANCE, TECH_DEBT, RELEASE_READINESS, KNOWN_ISSUES, SCALABILITY_ROADMAP, CHANGELOG_INTELLIGENCE. Self-updating contract: - scripts/governance/check_context_freshness.py (advisory, exit 0) wired as `make check-context`. Reads YAML front-matter watch_paths + last_synced and warns when watched paths have changed since the last sync date. Promotion to required gate tracked as KNOWN_ISSUES W14. - CONTRIBUTING.md gains a "Context system maintenance" section with a change-type to context-file map. Doc PR — exempt from the ~600 LOC cap; total ~7,500 LOC of markdown. Stacked on PR #30 (m12-pr12-provider-failover-test).
There was a problem hiding this comment.
Pull request overview
Adds a new /context/ documentation system (“Living Engineering Brain”) plus a lightweight governance helper to detect when context docs may be stale relative to watched code paths.
Changes:
- Introduces 18 concern-focused
/context/*.mddocuments pluscontext/README.mdindex with shared YAML front-matter conventions. - Adds
scripts/governance/check_context_freshness.pyand wires it tomake check-context. - Updates
CONTRIBUTING.mdwith guidance on when/how to maintain/context.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/governance/check_context_freshness.py | Adds advisory script to warn when watched paths changed since last_synced. |
| Makefile | Adds check-context target to run the advisory freshness checker. |
| CONTRIBUTING.md | Documents the /context maintenance workflow and update mapping. |
| context/README.md | Adds /context index and conventions for the documentation system. |
| context/PROJECT_OVERVIEW.md | High-level product/system overview context doc. |
| context/ARCHITECTURE.md | Architecture map and rules cross-referencing canonical blueprint/ADRs. |
| context/FRONTEND_CONTEXT.md | Frontend structure, SSE contract, and testing/deploy notes. |
| context/BACKEND_CONTEXT.md | Backend processes, middleware order, routes/services/workflows overview. |
| context/DATABASE_CONTEXT.md | DB/RLS/migration/partitioning discipline and key table inventory. |
| context/API_CONTEXT.md | Public HTTP/SSE surface and contracts (OpenAPI, idempotency, events). |
| context/AUTH_SECURITY_CONTEXT.md | Auth, RLS, SSRF, capability tokens, sandbox tiers, and security posture. |
| context/DEVOPS_INFRA_CONTEXT.md | Deployment topology, CI gates, staging mirror, and infra conventions. |
| context/AI_CONTEXT.md | AI engine boundaries, model routing, reliability primitives, tools/evals/observability. |
| context/TESTING_CONTEXT.md | Test pyramid, required gates, and local/CI testing conventions. |
| context/PERFORMANCE_CONTEXT.md | SLOs, latency/cost budgets, load testing, and perf guardrails. |
| context/BUSINESS_LOGIC_CONTEXT.md | Domain rules, pipeline phases, and user-visible surfaces/invariants. |
| context/TECH_DEBT.md | TD ledger synthesis with states, plans, and anchors. |
| context/RELEASE_READINESS.md | Stage A readiness checklist and P0/P1 status summary. |
| context/CHANGELOG_INTELLIGENCE.md | Engineering-facing changelog index tying PRs to memories/contexts/ADRs. |
| context/KNOWN_ISSUES.md | Watch list (W-items) and risk matrix with defenses/triggers. |
| context/SCALABILITY_ROADMAP.md | Stage A/B/C triggers and scaling plan. |
| context/FILE_TREE.md | Annotated repository map and “where do I put this?” cheat sheet. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Tier-to-cell mapping is in blueprint §5.4. | ||
| 8. Live URLs: <https://hirestack.tech> (frontend on Netlify) and | ||
| <https://hirestack-ai-production.up.railway.app> (backend on Railway). | ||
| E2E test user: `e2e-test@hirestack.local` / `E2ETestPass!2026`. |
Comment on lines
+17
to
+18
| CI integration: this runs informationally on every PR. It is NOT a | ||
| required gate. Promotion to required is tracked as KNOWN_ISSUES W14. |
Comment on lines
+9
to
+10
| matching context file in the same PR. CI checks freshness via | ||
| `scripts/governance/check_context_freshness.py` (advisory, non-blocking). |
Comment on lines
+197
to
+201
| | Change type | Update these files | | ||
| |---|---| | ||
| | New backend route | `API_CONTEXT.md` + `BACKEND_CONTEXT.md` + `AUTH_SECURITY_CONTEXT.md` (rate limit, scopes) | | ||
| | New frontend route or major component | `FRONTEND_CONTEXT.md` | | ||
| | New table or migration | `DATABASE_CONTEXT.md` (+ `AUTH_SECURITY_CONTEXT.md` if RLS pattern changes) | |
Comment on lines
+33
to
+36
| | # | File | Concern | Watches | | ||
| |---|---|---|---| | ||
| | 1 | [PROJECT_OVERVIEW.md](PROJECT_OVERVIEW.md) | What HireStack AI is, who it serves, what it ships | `README.md`, `pyproject.toml`, `frontend/package.json` | | ||
| | 2 | [ARCHITECTURE.md](ARCHITECTURE.md) | Component map, deployables, request lifecycle | `docs/architecture/WORLD_CLASS_ARCHITECTURE_BLUEPRINT.md`, `docs/ARCHITECTURE.md` | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/context/Living Engineering Brain — 18 enterprise-grade markdown files (plus README index) that synthesize every concern in this codebase. Cross-references existing canonical sources (blueprint, ADRs, runbooks, repo memory) rather than duplicating them.Files
Self-updating contract
scripts/governance/check_context_freshness.py— advisory script; reads each file's YAML front-matterwatch_paths+last_synced, runsgit log --since=<last_synced> -- <watch_paths>, warns if commits exist. Always exits 0. Wired asmake check-context.CONTRIBUTING.mdgains a "Context system maintenance" section with a change-type → context-file map and a "what good /context maintenance looks like" checklist.check-contextto a required CI gate is tracked asKNOWN_ISSUES.mdW14 (gated on noise rate < 30% over a month).Front-matter contract
Every file begins with:
Then: H1 + tagline blockquote, "TL;DR — N lines" numbered list, sections, ending with a "What good X looks like" checklist.
Stacked on
PR #30 (
m12-pr12-provider-failover-test).Verification
$ python scripts/governance/check_context_freshness.py checking 18 context files for staleness... ... (advisory warnings expected — last_synced=today, recent commits exist) exit=0