Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ Polyrepo under `~/xpquest/` (WSL path). Each repo has its own CI and deploy targ

| Local dir | GitHub remote | Purpose |
|----------------|------------------------|------------------------------|
| `xpq-org/` | XP-Quest/.github | Org health, scripts, templates |
| `xpq-org/` | XP-Quest/.github | Org health: templates, conventions, reusable workflows |
| `xpq-devops/` | XP-Quest/xpq-devops | Tooling: scripts, hooks, skills (private) |
| `xpq-web/` | XP-Quest/xpq-web | React SPA (Azure SWA) |
| `xpq-api/` | XP-Quest/xpq-api | Quarkus BFF (AKS) |
| `xpquest-spa/` | XP-Quest/xpquest-spa | Consulting/marketing site |
| `xpq-api/` | XP-Quest/xpq-api | Quarkus BFF (Azure Container Apps) |
| `xpq-infra/` | XP-Quest/xpq-infra | Bicep, k8s, local stack |
| `xpquest-spa/` | XP-Quest/xpquest-spa | Corporate site |

## SR&ED Work Packages

Expand Down Expand Up @@ -55,26 +57,16 @@ ORM/schema/migration; auth flows; billing; CI/CD; standard observability.

## Tech Stack

- **Frontend:** React SPA (TypeScript, Vite/CRA)
- **Backend:** Quarkus (Java 21), groupId `ca.xpquest`, artifactId `xpq-api`
- **Cloud:** Azure (AKS for API, Static Web Apps for SPA)
- **Auth:** AKS ingress + OIDC filters
- **Frontend:** React SPA (TypeScript, Vite)
- **Backend:** Quarkus (Java 25), groupId `ca.xpquest`, artifactId `xpq-api`
- **Cloud:** Azure (Container Apps for the API, Static Web Apps for the SPA)
- **Auth:** Application-managed OIDC in the Quarkus BFF (`quarkus-oidc`); Microsoft Entra External ID
- **DB:** PostgreSQL + pgvector (vector search); relational schema TBD
- **Dev OS:** WSL2 (Ubuntu) on Windows

Prefer Java for backend examples. Use the most appropriate language for the problem.

## Scripts (in xpq-org/scripts/)

| Script | Purpose |
|-----------------------------|----------------------------------------------------------|
| `daily_git_summary.sh DATE` | Commit summary for one date, grouped by issue |
| `historical_git_summary.sh` | Batch daily summaries from checkpoint to yesterday |
| `install-hooks.sh` | Install commit-msg and other Git hooks into a repo |

## Constraints

- Solo founder — contemporaneous evidence (issues, commits, daily logs, Time Tracker records) is the CRA claim.
- Never inflate SR&ED labeling. Routine engineering wrongly tagged is a larger risk than under-tagging.
- CCPC status governs 35% refundable ITC rate — share structure decisions need accountant sign-off.
- IP must be assigned to the corporation before expenditures are claimable.
414 changes: 23 additions & 391 deletions README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions SR_ED_CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Two places the rule deliberately does **not** apply:

## Issue-driven commit workflow

Every code change is anchored to a GitHub issue. The issue is the persistent *why*; the commit is a checkpoint *what*; the daily log derived by `scripts/daily_git_summary.sh` connects the two for SR&ED evidence.
Every code change is anchored to a GitHub issue. The issue is the persistent *why*; the commit is a checkpoint *what*; the daily log derived by `daily_git_summary.sh` (XP-Quest/xpq-devops) connects the two for SR&ED evidence.

### Rules

Expand Down Expand Up @@ -95,7 +95,7 @@ Six months later at claim prep, those bullets link to issue #42's full comment t

### How the parser stays accurate (three layers)

**Layer 1 — Prevention.** The `commit-msg` hook rejects (or auto-prepends to) commits whose subject lacks `#NNN:`, where `NNN` is derived from the branch name. Installed via `scripts/install-hooks.sh`.
**Layer 1 — Prevention.** The `commit-msg` hook rejects (or auto-prepends to) commits whose subject lacks `#NNN:`, where `NNN` is derived from the branch name. Installed via `scripts/install-hooks.sh` in XP-Quest/xpq-devops.

**Layer 2 — Mechanical recovery.** If a commit subject still lacks `#NNN:` (e.g., committed in a repo where the hook isn't installed), the parser inspects branches containing the commit via `git branch --all --contains` and looks for a branch name matching `^<digits>-`. When found, the issue is recovered silently — no GitHub write needed.

Expand Down Expand Up @@ -277,7 +277,7 @@ is the one thing both machines read and write for a given date:
identical regardless of which machine runs the script, provided both have fetched — no
merge bookkeeping needed there.

See XP-Quest/.github#41 for the design history and `scripts/tests/daily_git_summary.bats`
See XP-Quest/.github#41 for the design history and `scripts/tests/daily_git_summary.bats` in XP-Quest/xpq-devops
("Merge:" and "Starter log:" test groups) for the behavioral contract this rests on.

## Client-work data handling
Expand All @@ -289,7 +289,7 @@ derived from the Time Tracker export. The value didn't exist anywhere in the Tra
model (confirmed by DB inspection — the project's description field is immutable and blank,
and the app has no code path that ever updates it) — it was authored by the session itself.
Separately, the real client name and project code had also been committed as test fixture data
in `scripts/tests/daily_git_summary.bats` (see XP-Quest/.github#49 for both fixes).
in `scripts/tests/daily_git_summary.bats`, now in XP-Quest/xpq-devops (see XP-Quest/.github#49 for both fixes).

1. **No hardcoded business-data literals in any script, ad-hoc or otherwise.** A script that
writes to a log, database, or file must derive every value (description, client name,
Expand Down
Loading
Loading