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
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: SR&ED Conventions
url: https://github.com/Red-Shirt-Engineering/.github/blob/main/SR_ED_CONVENTIONS.md
about: Read this before filing a research issue. Explains the audit-trail workflow.
- name: Engineering Conventions
url: https://github.com/XP-Quest/.github/blob/main/ENG_CONVENTIONS.md
about: Read this before filing an issue. Explains the issue, branch and commit workflow and the SR&ED audit trail.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If it's routine engineering, mark "Not SR&ED-eligible" and move on.
## Lifecycle

<!--
Base & closing — see SR_ED_CONVENTIONS.md "When issues close":
Base & closing — see ENG_CONVENTIONS.md "When issues close":
- feature → dev (deployable repos) or feature → main (single-track repos): merging closes the
issue. Write the keyword on the Closes line, repeated per issue (GitHub closes only the
first one otherwise): Closes #NN, Closes #NN. A bare "#NN" does NOT close.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/branch-cleanup-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: branch-cleanup (reusable)
# repo's default branch (`main`). Called by a thin `branch-cleanup.yml` caller
# in each repo. GitHub's native "Automatically delete head branches" cannot
# exempt the permanent `N-trivial-fixes` branches or filter by base, so it stays
# off and this does the deleting instead. See SR_ED_CONVENTIONS.md "Branch
# off and this does the deleting instead. See ENG_CONVENTIONS.md "Branch
# hygiene" for the rules; the logic lives in scripts/branch-cleanup.sh.
#
# A branch is deleted when its work reaches `main`: the PR's own head
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-on-merge-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: close-on-merge (reusable)
# GitHub only honours Closes/Fixes/Resolves on the default branch (`main`), so
# this closes each issue named by a closing keyword in the merged PR's body.
# Single-track repos (PRs into `main`) rely on GitHub's own keyword handling
# and need no caller. See SR_ED_CONVENTIONS.md "When issues close".
# and need no caller. See ENG_CONVENTIONS.md "When issues close".
#
# Reusable workflows inherit the caller's `github` context, so the caller's
# `pull_request` payload is available here without passing it as an input.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-lifecycle-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ jobs:
if grep -qiE '(close[sd]?|fix(e[sd])?|resolve[sd]?):?[[:space:]]+#[0-9]+' <<< "$BODY"; then
echo "Closing keyword found."
else
echo "::error::PR body must contain a closing keyword (e.g. 'Closes #NN'). Merging this PR is the close point per SR_ED_CONVENTIONS \"When issues close\"."
echo "::error::PR body must contain a closing keyword (e.g. 'Closes #NN'). Merging this PR is the close point per ENG_CONVENTIONS.md \"When issues close\"."
exit 1
fi
72 changes: 38 additions & 34 deletions SR_ED_CONVENTIONS.md → ENG_CONVENTIONS.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
# XP Quest SR&ED Tracking Conventions
# XP Quest Engineering Conventions

This document describes how XP Quest tracks technological uncertainty investigations across GitHub for the purpose of a Canadian SR&ED claim (federal) stacked with the Ontario Innovation Tax Credit (OITC).
This document describes how XP Quest tracks work across GitHub: issues, branches, commits, PRs, releases and boards. The same trail is the evidence for a Canadian SR&ED claim (federal) stacked with the Ontario Innovation Tax Credit (OITC); the claim-specific guidance is in *SR&ED* at the end.

It is written for a solo founder/developer who will also be the claim preparer.
It is written for a solo founder/developer who is also the claim preparer.

---

## The six work packages (technological uncertainties)

| ID | Work Package |
|-----|-------------------------------------------------------------------|
| WP1 | Semantic Chunking Strategy for Professional Documents |
| WP2 | Relevance Gate Threshold Calibration |
| WP3 | Ambiguity Detection Heuristics |
| WP4 | Conversational Augmentation Pipeline |
| WP5 | Dual-Score Job Description Correlation Engine |
| WP6 | Multi-Tenant Quota Enforcement with Cost Attribution |

Every SR&ED research issue must be tagged to one of these (or "Cross-cutting").

## Issue types

**SR&ED Research Issue** — one per investigation. Lives from hypothesis through resolution. Long-lived. Carries the full audit trail (hypothesis, prior art, uncertainty statement, experiments, evidence, outcome).
Expand Down Expand Up @@ -226,21 +213,6 @@ When an epic spans repos (Auth MVP-2 — Entra + ACA + Key Vault infra in `xpq-i

Trivial fixes (typos, formatting, doc cleanups) tracked under a repo's standing "Trivial fixes" issue are exempt from the promotion ceremony: a single branch, a direct PR, no epic, no sub-issue bookkeeping. Reserve this for genuinely trivial, non-feature changes only.

## Time tracking

CRA wants hours attributable to specific SR&ED work packages, not bulk "I coded today."

Recommended minimum:
- End-of-day markdown journal entry in the `.github` repo under `journal/YYYY/MM/DD.md`.
- Two sections: "SR&ED time" (with `WP{n}` tags and issue references) and "Non-SR&ED time."
- One sentence per entry is enough. Contemporaneous > polished.

If using a tool (Toggl, Harvest, etc.), put the issue number in the description so time entries map back to research issues cleanly at claim time.

(Superseded: the journal/ approach above was replaced by the XP Quest Time Tracker widget +
`daily_git_summary.sh` + the `xpquest-daily-log` skill — see the workspace CLAUDE.md §6 for the
current pipeline.)

## Multi-machine daily-log merge

The founder develops on two machines (desktop **antman**, laptop **flash**, never simultaneously).
Expand Down Expand Up @@ -318,15 +290,47 @@ Two GitHub Projects at the org level:
1. **R&D / AI Engine** — all SR&ED research and experiment issues. Custom fields: Uncertainty (WP1–WP6), Phase.
2. **Product & Platform** — non-SR&ED engineering. Custom fields: Area, Priority.

## Before filing a research issue, ask yourself
## SR&ED

Claim-specific guidance. The issue types, labels, commit workflow and boards above produce the evidence; this section covers what the claim needs from them.

### The six work packages (technological uncertainties)

| ID | Work Package |
|-----|-------------------------------------------------------------------|
| WP1 | Semantic Chunking Strategy for Professional Documents |
| WP2 | Relevance Gate Threshold Calibration |
| WP3 | Ambiguity Detection Heuristics |
| WP4 | Conversational Augmentation Pipeline |
| WP5 | Dual-Score Job Description Correlation Engine |
| WP6 | Multi-Tenant Quota Enforcement with Cost Attribution |

Every SR&ED research issue must be tagged to one of these (or "Cross-cutting").

### Time tracking

CRA wants hours attributable to specific SR&ED work packages, not bulk "I coded today."

Recommended minimum:
- End-of-day markdown journal entry in the `.github` repo under `journal/YYYY/MM/DD.md`.
- Two sections: "SR&ED time" (with `WP{n}` tags and issue references) and "Non-SR&ED time."
- One sentence per entry is enough. Contemporaneous > polished.

If using a tool (Toggl, Harvest, etc.), put the issue number in the description so time entries map back to research issues cleanly at claim time.

(Superseded: the journal/ approach above was replaced by the XP Quest Time Tracker widget +
`daily_git_summary.sh` + the `xpquest-daily-log` skill — see the workspace CLAUDE.md §6 for the
current pipeline.)

### Before filing a research issue, ask yourself

1. Is there a real technological uncertainty here that a skilled practitioner couldn't resolve with existing knowledge and routine effort? If no, file it as an Engineering Task instead.
2. Can I state a hypothesis that could be falsified? If no, keep thinking before filing.
3. Have I reviewed prior art and can I articulate why it's insufficient? If no, do that first — it's the first field in the template for a reason.

If any of those is "no," you probably don't have a SR&ED investigation yet — just engineering work.

## At claim time
### At claim time

The narrative for each work package writes itself from the research issues under that uncertainty:

Expand All @@ -338,6 +342,6 @@ The narrative for each work package writes itself from the research issues under

If those fields are populated contemporaneously, the claim writes itself. If they're not, you're reconstructing 14 months later from git log and memory — which is where most solo-founder SR&ED claims go wrong.

## Not legal/tax advice
### Not legal/tax advice

This is a working convention, not a legal opinion on SR&ED eligibility. Final eligibility decisions belong to your accountant and, ultimately, to CRA. Document thoroughly, label conservatively, and escalate ambiguous cases to your advisor before claim submission.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ community health files only from a public repository named `.github`. It holds:

1. **GitHub templates** — issue forms and the PR template, applied to every XP-Quest repo that
does not define its own.
2. **Conventions** — `SR_ED_CONVENTIONS.md`: issue types, labels, branch and commit rules, the PR
and issue lifecycle, and SR&ED screening.
2. **Conventions** — `ENG_CONVENTIONS.md`: issue types, labels, branch and commit rules, the PR
and issue lifecycle, and an SR&ED section (work packages, time tracking, screening, claim time).
3. **Reusable workflows** — `pr-lifecycle` (closing-keyword guard) and `branch-cleanup` (delete
merged feature branches), called by a thin caller in each repo.

Expand Down Expand Up @@ -37,7 +37,7 @@ Tooling (daily-log scripts, git and Claude Code hooks, skills) lives in the priv
│ ├── branch-cleanup.sh Run by branch-cleanup-reusable.yml (checked out at the workflow's commit)
│ └── tests/ bats tests for branch-cleanup.sh (scripts/tests/run_tests.sh)
│
├── SR_ED_CONVENTIONS.md
├── ENG_CONVENTIONS.md
└── README.md
```

Expand Down
2 changes: 1 addition & 1 deletion scripts/branch-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Called by .github/workflows/branch-cleanup-reusable.yml for a PR merged into
# main. GitHub's own "Automatically delete head branches" cannot exempt the
# N-trivial-fixes catch-all branches or filter by base, so cleanup is done here
# instead. See SR_ED_CONVENTIONS.md "Branch hygiene".
# instead. See ENG_CONVENTIONS.md "Branch hygiene".
#
# Candidates:
# - the PR's own head branch (Track 2 / single-track PRs), and
Expand Down