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
7 changes: 4 additions & 3 deletions .agent/personas/p1-product-planner.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ Issues are immutable upon creation (**Rule A β€” Append-Only**).
"labels": ["<type_label>", "source:<origin>"]
}
```
Set at creation and never edited thereafter:
- **Business Value ⭐**: `Core Delight ⭐` Β· `Habit & Retention πŸ”` Β· `Operational & Risk βš™οΈ` Β· `Exploratory πŸ§ͺ`
- **Severity 🚨** (bugs & `source:crashlytics` only): `P0 - Blocker πŸ’₯` Β· `P1 - Major πŸ”΄` Β· `P2 - Minor 🟠` Β· `P3 - Trivial 🟒`
Set at creation and assigned on GitHub Projects v2:
- **Priority**: `P0` (Blocker/Fatal) Β· `P1` (Major) Β· `P2` (Minor)
- **Estimate** (co-owned with P4): Numeric estimate in days or story points
- **Status**: `Backlog`

### 3. Milestone & Cycle Scoping
- Create and scope GitHub Milestones (release boundaries).
Expand Down
18 changes: 10 additions & 8 deletions .agent/personas/p4-system-architect.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ contracts:
# P4 Β· System Architect β€” Tech Lead & Android Platform Architect

## Mission
Guarantee architectural integrity across the Android stack: Clean Architecture boundaries, offline-first resilience, cloud security, and concurrency. Assign `Tech Complexity`, enforce the **Architectural Split Mandate** for Epics, and surface breaking changes before implementation begins.
Guarantee architectural integrity across the Android stack: Clean Architecture boundaries, offline-first resilience, cloud security, and concurrency. Assign `Size` and `Estimate`, enforce the **Architectural Split Mandate** for Epics, and surface breaking changes before implementation begins.

---

Expand All @@ -60,14 +60,16 @@ Rules: Room cache is always written first. Map network errors to `UiState.Error`
### 3. Firestore Security Rules Audit
Apply least privilege. Validate via `node scripts/test-firestore-rules.mjs`. Disallow unauthenticated writes on user documents. Disallow unshared cross-user access.

### 4. Tech Complexity Assessment
- `XS - Low 🟒`: Isolated change, no schema delta (<½ day).
- `S - Medium 🟑`: Single-layer change, limited scope (½–1 day).
- `M - High 🟠`: Multi-layer change, Room migration, rule update (1–3 days).
- `L - Architectural πŸ”΄`: New module, cross-system surface, breaking migration (3+ days).
### 4. Size & Effort Assessment
- `XS`: Isolated change, no schema delta (<Β½ day).
- `S`: Single-layer change, limited scope (½–1 day).
- `M`: Multi-layer change, Room migration, rule update (1–3 days).
- `L`: Multi-component or cross-cutting feature (3–5 days, Epic Gated).
- `XL`: Major system overhaul, multi-module, breaking migration (5+ days, Epic Gated).
Assign numeric `Estimate` (days or story points, co-owned with P1).

### 5. Architectural Split Mandate (Epic Gating)
When Tech Complexity is `L - Architectural πŸ”΄`:
When Size is `L` or `XL`:
- **Reject Monolithic PRs**: Strictly forbid single large branches or PRs.
- **Decomposition DAG**: Produce a topological DAG of atomic child issues (< 300 diff lines each) referencing `parent: #<id>` via `.agent/templates/epic-spec.md`.
- Enforce trunk-based sequential delivery with `skip-release` for intermediate child PRs.
Expand All @@ -84,7 +86,7 @@ Post as comment on GitHub Issue via `GitHubMCP:add_issue_comment`.
```markdown
### βš™οΈ Pillar 3 Β· Technical Blueprint

**Tech Complexity**: <XS|S|M|L> Β· **Breaking Changes**: <Yes|No>
**Size**: <XS|S|M|L|XL> Β· **Estimate**: <numeric> Β· **Breaking Changes**: <Yes|No>

#### Data Layer
- Room entities: <list> Β· Migration: <version N β†’ N+1, DDL (Expand/Contract)>
Expand Down
2 changes: 1 addition & 1 deletion .agent/rules/agent-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Each persona contributes to the canonical 4-Pillar Spec posted via `GitHubMCP:ad
- **P1 Product Planner** β†’ User Story (Gherkin) & 3-State Access Matrix (Guest/Solo/Duo).
- **P2 Design Lead** β†’ Pillar 1: Material 3 tokens, WCAG 2.1 AAA, 4-state UI matrix, Roborazzi expectations (or explicit `N/A β€” No visual/UI changes`).
- **P3 Privacy & Data Lead** β†’ Pillar 2: Zero-PII telemetry, value bucketing, GDPR/AI Act compliance.
- **P4 System Architect** β†’ Pillar 3: Room schema/DDL, Firestore rules delta, Clean MVI, infra locks (`AppDatabase.kt`, `firestore.rules`, `strings.xml`), Tech Complexity.
- **P4 System Architect** β†’ Pillar 3: Room schema/DDL, Firestore rules delta, Clean MVI, infra locks (`AppDatabase.kt`, `firestore.rules`, `strings.xml`), Size & Estimate.

### Step 1.3 Β· Dual-Write Pattern & Gate 1.4 Approval (Rule 1.5)
- **Canonical Remote Truth**: The sealed GitHub issue and its 4-Pillar comment serve as the authoritative project contract.
Expand Down
36 changes: 17 additions & 19 deletions .agent/rules/backlog-planner.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Detailed RBAC and deliverable formats are specified in each persona's manifest:

| Persona | Manifest | Key Responsibilities | Key Outputs |
|---|---|---|---|
| **P1 Β· Product Planner** | [`p1-product-planner.md`](../personas/p1-product-planner.md) | User stories, acceptance criteria, Business Value, Milestone ownership | Sealed Issue, Milestone assignment, Kanban linking |
| **P1 Β· Product Planner** | [`p1-product-planner.md`](../personas/p1-product-planner.md) | User stories, acceptance criteria, Priority, Milestone, Estimate | Sealed Issue, Milestone assignment, Kanban linking |
| **P2 Β· Design Lead** | [`p2-design-lead.md`](../personas/p2-design-lead.md) | Material 3 token compliance, WCAG AAA, incremental screen diff policy | Pillar 1 (Design Spec) comment, Roborazzi list |
| **P3 Β· Privacy & Data Lead** | [`p3-privacy-data.md`](../personas/p3-privacy-data.md) | Zero-PII telemetry enforcement, value bucketing, event schema taxonomy | Pillar 2 (Data & Privacy Spec) comment |
| **P4 Β· System Architect** | [`p4-system-architect.md`](../personas/p4-system-architect.md) | Clean Arch audit, Room local-first guarantee, Tech Complexity, infra locks | Pillar 3 (Technical Blueprint) comment |
| **P4 Β· System Architect** | [`p4-system-architect.md`](../personas/p4-system-architect.md) | Clean Arch audit, Room local-first guarantee, Size, Estimate, infra locks | Pillar 3 (Technical Blueprint) comment |

---

Expand All @@ -28,17 +28,15 @@ Git Branch : <type>/issue-<id>-<short-kebab-slug>

---

## 3. Project Metadata Triad
## 3. Native GitHub Projects v2 Metadata

Set during Inception (Rule A: immutable post-creation, revisions via `add_issue_comment` only).
Configured on GitHub Projects v2 board. Revisions require an `add_issue_comment` rationale.

| Field | Owner | Allowed Values |
| Field | Owner | Allowed Values & Format |
|---|---|---|
| **Business Value ⭐** | P1 (PM) | `Core Delight ⭐` Β· `Habit & Retention πŸ”` Β· `Operational & Risk βš™οΈ` Β· `Exploratory πŸ§ͺ` |
| **Tech Complexity 🧩** | P4 (Architect) | `XS - Low 🟒` (<Β½d) Β· `S - Medium 🟑` (½–1d) Β· `M - High 🟠` (1–3d) Β· `L - Architectural πŸ”΄` (Epic) |
| **Severity 🚨** | P1 (PM, bugs only) | `P0 - Blocker πŸ’₯` Β· `P1 - Major πŸ”΄` Β· `P2 - Minor 🟠` Β· `P3 - Trivial 🟒` |

> `feature`, `enhancement`, `chore` tickets must NOT use `Severity`.
| **Priority** | P1 (PM) / Triage | `P0` (Blocker/Fatal) Β· `P1` (Major) Β· `P2` (Minor) |
| **Size** | P4 (Architect) | `XS` (<Β½d) Β· `S` (½–1d) Β· `M` (1–3d) Β· `L` (3–5d) Β· `XL` (>5d) |
| **Estimate** | P1 & P4 | Numeric estimate (days or story points) |

---

Expand All @@ -54,8 +52,8 @@ Every task (feature, bug, refactor, chore, docs) requires:

---

### πŸ›οΈ Rule 0.1 Β· Epic Gating (Tech Complexity: L)
Issues rated `L - Architectural πŸ”΄` are classified as **Epics**.
### πŸ›οΈ Rule 0.1 Β· Epic Gating (Size: L / XL)
Issues rated `Size: L` or `Size: XL` (or `Estimate >= 3d`) are classified as **Epics**.
- **Zero Branch Guardrail**: Never branch or commit directly on an Epic issue.
- **Sequential Decomposition**: P1 & P4 decompose Epics into atomic child issues (< 300 diff lines) referencing the parent (`parent: #<id>`), merged sequentially to `main` (Trunk-Based) using [`.agent/templates/epic-spec.md`](../templates/epic-spec.md).
- **Silent Merges (`skip-release`)**: Intermediate child PRs carry `skip-release`.
Expand All @@ -69,7 +67,7 @@ Issues rated `L - Architectural πŸ”΄` are classified as **Epics**.

- `GitHubMCP:update_issue` targeting `title` or `body` is **strictly forbidden**.
- Branch names and types are **immutable**: a `feat/issue-<id>-*` stays `feat/` even if Phase 2 reveals minor bugs.
- Metadata Triad fields (`Business Value`, `Tech Complexity`, `Severity`) are set during Inception; revisions require an `add_issue_comment`.
- Native project fields (`Priority`, `Size`, `Estimate`, `Status`) are set on the Project board; revisions require an explanatory `add_issue_comment` for auditability.
- All scope changes, plan pivots, and discussions are appended via `GitHubMCP:add_issue_comment`.

---
Expand All @@ -87,8 +85,8 @@ Every Issue and PR must be assigned to `@me` at creation. No unowned tickets.

---

### πŸ“‹ Rule 3 Β· Kanban Attachment, Cycle & Milestone Linking
**At `Backlog` creation**: Attach to project Kanban and assign Metadata Triad.
### πŸ“‹ Rule 3 Β· Kanban Attachment & Milestone Linking
**At `Backlog` creation**: Attach to project board and assign Priority, Size, Estimate, Status.
**At `Ready` transition**: Link active Cycle and target Milestone:
```bash
gh issue edit <id> --milestone "<Milestone>"
Expand Down Expand Up @@ -127,7 +125,7 @@ Acceptance: 0 errors Β· 0 warnings Β· 100% unit/Robolectric tests Β· 100% Firest

### πŸ“± Rule 8 Β· Observability Triage (Crashlytics)
Format incident issues using [`.agent/templates/crashlytics-triage-issue.md`](../templates/crashlytics-triage-issue.md).
- Set `Severity 🚨` (P0 to P3). On PR merge, P6 triggers Dual-Sync closure.
- Set `Priority` (P0 to P2). On PR merge, P6 triggers Dual-Sync closure.

---

Expand Down Expand Up @@ -172,13 +170,13 @@ User Request
β”‚
β–Ό P1: Anti-duplication (GitHubMCP:search_issues)
β”‚
β–Ό P1: Create sealed Issue + assign Business Value + create/link Milestone
β–Ό P1: Create sealed Issue + assign Priority/Estimate + link Milestone
β”‚
β–Ό P1: Kanban attachment (Backlog)
β”‚
β”œβ”€β–Ά P2: Pillar 1 comment (Design Spec)
β”œβ”€β–Ά P3: Pillar 2 comment (Data & Privacy Spec)
└─▢ P4: Pillar 3 comment (Technical Blueprint) + assign Tech Complexity
└─▢ P4: Pillar 3 comment (Technical Blueprint) + assign Size/Estimate
β”‚
β–Ό P1: Cycle & Milestone linking β†’ Kanban to Ready
β”‚
Expand All @@ -193,7 +191,7 @@ User Request

| Status | Meaning | Next Step |
|---|---|---|
| `Backlog` | Issue created, Metadata Triad pending | Run `/plan-issue` |
| `Backlog` | Issue created, native fields assigned | Run `/plan-issue` |
| `Ready` | 4-Pillar plan validated, Cycle & Milestone linked | Create branch β†’ code |
| `In Progress` | Active branch, Cycle & Metadata set | Finish tests, push |
| `In Review` | PR opened with Walkthrough (`Closes #<id>`) | CI gate & review |
Expand Down
4 changes: 2 additions & 2 deletions .agent/sidecars/sync-issue-progress.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function setField(p, i, f, key, val) {

try {
console.log(`πŸ”„ [SyncIssueProgress] Syncing #${issueNum}...`);
const q = `query($o:String!,$r:String!,$i:Int!,$p:Int!){repository(owner:$o,name:$r){issue(number:$i){id milestone{title}projectItems(first:5){nodes{id project{id}fieldValues(first:10){nodes{...on ProjectV2ItemFieldSingleSelectValue{name field{...on ProjectV2FieldCommon{name}}}...on ProjectV2ItemFieldIterationValue{title field{...on ProjectV2FieldCommon{name}}}}}}}}milestones(first:3,states:[OPEN],orderBy:{field:DUE_DATE,direction:ASC}){nodes{number title}}}user(login:$o){projectV2(number:$p){id fields(first:20){nodes{...on ProjectV2SingleSelectField{id name options{id name}}...on ProjectV2IterationField{id name configuration{iterations{id title startDate duration}}}}}}}}`;
const q = `query($o:String!,$r:String!,$i:Int!,$p:Int!){repository(owner:$o,name:$r){issue(number:$i){id milestone{title}projectItems(first:5){nodes{id project{id}}}}milestones(first:3,states:[OPEN],orderBy:{field:DUE_DATE,direction:ASC}){nodes{number title}}}user(login:$o){projectV2(number:$p){id fields(first:20){nodes{...on ProjectV2SingleSelectField{id name options{id name}}...on ProjectV2IterationField{id name configuration{iterations{id title startDate duration}}}}}}}}`;

const data = gql(q, { o: owner, r: repo, i: issueNum, p: pNum });
const issue = data?.repository?.issue;
Expand Down Expand Up @@ -82,7 +82,7 @@ try {
}

if (itemId && statusField) {
const inProgressOpt = statusField.options.find(o => o.name === 'In Progress');
const inProgressOpt = statusField.options.find(o => o.name.toLowerCase() === 'in progress');
if (inProgressOpt) {
console.log(`🎯 Setting Status -> In Progress...`);
setField(project.id, itemId, statusField.id, 'singleSelectOptionId', inProgressOpt.id);
Expand Down
17 changes: 9 additions & 8 deletions .agent/skills/plan-issue/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ GitHubMCP:search_issues { "q": "repo:<owner>/<repo> is:issue <keywords>" }
```
If an open issue already covers the scope, switch to that issue or add context via comment.

### Step 3: Sealed Issue Creation & Metadata Triad (Persona 1)
### Step 3: Sealed Issue Creation & Native Project Metadata (Persona 1)
If new, P1 creates the issue assigned strictly to `@me` (`@me`):
```json
GitHubMCP:create_issue {
Expand All @@ -50,10 +50,11 @@ GitHubMCP:create_issue {
"assignees": ["@me"]
}
```
P1 assigns the **Metadata Triad**:
- `Business Value ⭐`: Low / Medium / High / Critical
- `Severity 🚨`: Low / Medium / High / Critical (bugs only, N/A for features)
- `Tech Complexity 🧩`: S / M / L (determined with P4)
P1 assigns the native **GitHub Projects v2 Metadata**:
- `Priority`: `P0` / `P1` / `P2`
- `Size`: `XS` / `S` / `M` / `L` / `XL` (determined with P4)
- `Estimate`: Numeric estimate in points or days (co-owned with P4)
- `Status`: `Backlog`

### Step 4: 4-Pillar Spec Orchestration & Conditional P2 Design Gate
Consortium members populate [`.agent/templates/4-pillar-spec.md`](../../templates/4-pillar-spec.md) through contextual triage:
Expand All @@ -63,10 +64,10 @@ Consortium members populate [`.agent/templates/4-pillar-spec.md`](../../template
- **Non-UI Changes**: For pure backend, Room, Firestore rules, CI/CD, scripts, or chores, mark: `N/A β€” No visual/UI changes`.
- **Explicit User Override**: If prompt explicitly requests to skip design (e.g. *"skip design"*), bypass P2 immediately.
3. **P3 (Privacy & Data Lead)**: Pillar 2 Data Spec (Zero-PII telemetry, event taxonomy, GDPR).
4. **P4 (System Architect)**: Pillar 3 Technical Blueprint (Room, Firestore, architecture boundaries, and `Tech Complexity 🧩`).
4. **P4 (System Architect)**: Pillar 3 Technical Blueprint (Room, Firestore, architecture boundaries, `Size` and `Estimate`).

### Step 4.1: Complexity L Route β€” Epic Decomposition (Rule 0.1)
If `Tech Complexity` is `L - Architectural πŸ”΄` (new modules, Wear OS, breaking migrations):
### Step 4.1: Complexity L/XL Route β€” Epic Decomposition (Rule 0.1)
If `Size` is `L` or `XL` (or `Estimate >= 3d`):
- **Classify as Epic**: Zero Branch Guardrail β€” strictly forbidden to branch or commit on this issue.
- **Decompose**: P1 & P4 produce [`.agent/templates/epic-spec.md`](../../templates/epic-spec.md) detailing the child-issue DAG (< 300 diff lines each).
- Intermediate child PRs carry the `skip-release` label.
Expand Down
8 changes: 4 additions & 4 deletions .agent/skills/triage-feedback/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ Standardizes the capture, multi-level deduplication, and integration of **fatal

---

## 🎯 1. Severity Qualification
## 🎯 1. Priority Qualification

| Tier | Category | Source & Impact | Target Labels | Project Priority |
|---|---|---|---|---|
| **CRITICAL** | Fatal Crash | Uncaught runtime crash | `["source:crashlytics", "bug"]` | `Critical πŸ’₯` |
| **HIGH** | Non-Fatal Error | Intercepted AI or sync failure | `["source:crashlytics", "bug"]` | `High πŸ”΄` |
| **NORMAL** | Tester Feedback | Firebase App Distribution feedback | `["source:tester-feedback", "bug"\|"feature"]` | `High πŸ”΄` or `Medium 🟠` |
| **CRITICAL** | Fatal Crash | Uncaught runtime crash | `["source:crashlytics", "bug"]` | `P0` |
| **HIGH** | Non-Fatal Error | Intercepted AI or sync failure | `["source:crashlytics", "bug"]` | `P1` |
| **NORMAL** | Tester Feedback | Firebase App Distribution feedback | `["source:tester-feedback", "bug"\|"feature"]` | `P1` or `P2` |

---

Expand Down
10 changes: 5 additions & 5 deletions .agent/templates/4-pillar-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Feature: {{FEATURE_NAME}}
- [ ] Zero regressions on existing Roborazzi snapshots.
- [ ] `./scripts/quality-check.sh` exits 0.

**Metadata**: **Milestone**: `{{MILESTONE_NAME}}` Β· **Cycle**: `{{CYCLE_NAME}}` Β· **Business Value**: `{{BUSINESS_VALUE}}`
**Metadata**: **Milestone**: `{{MILESTONE_NAME}}` Β· **Priority**: `{{PRIORITY_P0_P1_P2}}` Β· **Size**: `{{SIZE_XS_TO_XL}}` Β· **Estimate**: `{{ESTIMATE}}`

---

Expand Down Expand Up @@ -86,7 +86,7 @@ Feature: {{FEATURE_NAME}}

## Pillar 3 Β· Technical Blueprint (P4 β€” System Architect)

**Tech Complexity**: `{{XS_S_M_L}}` Β· **Breaking change**: `{{YES_NO}}`
**Size**: `{{XS_S_M_L_XL}}` Β· **Estimate**: `{{ESTIMATE}}` Β· **Breaking change**: `{{YES_NO}}`

**Data layer**:
- Room entity delta: `{{ENTITY_CHANGES}}`
Expand Down Expand Up @@ -128,8 +128,8 @@ pr: {{PR_NUMBER_OR_NULL}}
milestone: "{{MILESTONE_NAME}}"
cycle: "{{CYCLE_NAME}}"
metadata:
business_value: "{{BUSINESS_VALUE}}"
tech_complexity: "{{TECH_COMPLEXITY}}"
severity: {{SEVERITY_OR_NULL}}
priority: "{{PRIORITY}}"
size: "{{SIZE}}"
estimate: {{ESTIMATE}}
---
```
4 changes: 2 additions & 2 deletions .agent/templates/crashlytics-triage-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ usage: Use as the body for GitHubMCP:create_issue when triaging a Firebase Crash
labels: ["bug", "source:crashlytics"]
---

## 🚨 Severity: {{P0_BLOCKER|P1_MAJOR|P2_MINOR|P3_TRIVIAL}}
## 🚨 Priority: {{P0|P1|P2}}

> **Severity guide**: `P0 - Blocker πŸ’₯` = app crash / data loss / security breach Β· `P1 - Major πŸ”΄` = core feature broken, no workaround Β· `P2 - Minor 🟠` = degraded UX, workaround exists Β· `P3 - Trivial 🟒` = cosmetic / logging
> **Priority guide**: `P0` = app crash / data loss / security breach Β· `P1` = core feature broken, no workaround Β· `P2` = degraded UX, workaround exists

---

Expand Down
5 changes: 3 additions & 2 deletions .agent/templates/epic-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ guardrail: Zero Branch on Epic β€” child issues must be created for implementati
## 🎯 1. Vision & Strategic Objectives

- **Goal**: {{EPIC_GOAL_SUMMARY}}
- **Business Value ⭐**: {{BUSINESS_VALUE}}
- **Tech Complexity 🧩**: `L - Architectural πŸ”΄`
- **Priority**: {{PRIORITY_P0_P1_P2}}
- **Size**: `{{SIZE_L_OR_XL}}` (Epic Gated)
- **Estimate**: {{ESTIMATE_DAYS_OR_POINTS}}
- **Target Milestone**: `{{MILESTONE_NAME}}`

---
Expand Down
11 changes: 5 additions & 6 deletions .github/ISSUE_TEMPLATE/crashlytics_triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ body:
### 🚨 Firebase Crashlytics Incident Triage
This issue follows the structured triage format mapped to `.agent/templates/crashlytics-triage-issue.md`.
- type: dropdown
id: severity
id: priority
attributes:
label: Severity 🚨
label: Priority
description: Assess blast radius and operational impact.
options:
- "P0 - Blocker πŸ’₯ (App crash / data loss / security breach)"
- "P1 - Major πŸ”΄ (Core feature broken, no workaround)"
- "P2 - Minor 🟠 (Degraded UX, workaround exists)"
- "P3 - Trivial 🟒 (Cosmetic / logging)"
- "P0 (App crash / data loss / security breach)"
- "P1 (Core feature broken, no workaround)"
- "P2 (Degraded UX, workaround exists)"
validations:
required: true
- type: input
Expand Down
Loading
Loading