@davoodmehraban89 / Aram / commits / b1ddee8
Fork 0

docs(governance): define role-based operating model (#20)

Accept the permanent Aram responsibility model requested by Davood. Defines Davood, ChatGPT, Jules, Codex Work, and GitHub roles; records ADR-011, evidence gates, standing routine authority, escalation boundaries, and the recovery-to-post-merge cycle. Documentation only; no application code, protected financial data, artifact, or release changed.

davoodmehraban89 committed Aug 26, 2026 at 00:59 UTC b1ddee87d31ee73b3a5aeac8f9953d0a604c206a
5 files changed +252 -64
PROJECT_STATUS.md
+6 -3
@@ -7,6 +7,7 @@
7 - Repository: [davoodmehraban89/Aram](https://github.com/davoodmehraban89/Aram)
8 - Accepted branch: source-data-cleanup
9 - Recorded accepted control event: [PR #18](https://github.com/davoodmehraban89/Aram/pull/18), reviewed head `fcbeb7387218e9ab294318ae462ed59de717fc95`, squash merge [f213d321ff4cd7d3d6fa65ba78dc48f090ee846b](https://github.com/davoodmehraban89/Aram/commit/f213d321ff4cd7d3d6fa65ba78dc48f090ee846b)
10 +- Durable post-merge acceptance record: [PR #19](https://github.com/davoodmehraban89/Aram/pull/19), reviewed head `b9059592409606a0a4f11a71c30778cff158b6b6`, squash merge [77f9f595ccfe67a87b11024ff0f6143629dba438](https://github.com/davoodmehraban89/Aram/commit/77f9f595ccfe67a87b11024ff0f6143629dba438)
11 - Before starting new work, fetch the live `source-data-cleanup` head; this record intentionally avoids a self-referential current-head claim
12 - Product objective: a controlled, auditable accounting and financial-statement workflow that preserves canonical source data.
13
@@ -35,6 +36,8 @@
36 | Phase 2B control reconciliation | VERIFIED_AND_MERGED | [PR #13](https://github.com/davoodmehraban89/Aram/pull/13), squash merge 7c7533ee87146dc8fc78b46ebf423be55532c7eb |
37 | Gate 2A Pilot workbook contract/preflight | VERIFIED_AND_MERGED | [PR #15](https://github.com/davoodmehraban89/Aram/pull/15), reviewed head 74b6a6397a2a2c9199a5c7bcf818bb661b2ebe06, squash merge 4ab54f4a3cf666827fa1ed30c4e43259ea79f2d4, [Backend CI #24](https://github.com/davoodmehraban89/Aram/actions/runs/32712900800) |
38 | Post-Gate-2A control reconciliation | VERIFIED_AND_MERGED | [PR #18](https://github.com/davoodmehraban89/Aram/pull/18), reviewed head `fcbeb7387218e9ab294318ae462ed59de717fc95`, squash merge `f213d321ff4cd7d3d6fa65ba78dc48f090ee846b`; documentation only |
39 +| Durable post-merge acceptance record | VERIFIED_AND_MERGED | [PR #19](https://github.com/davoodmehraban89/Aram/pull/19), reviewed head `b9059592409606a0a4f11a71c30778cff158b6b6`, squash merge `77f9f595ccfe67a87b11024ff0f6143629dba438`; documentation only |
40 +| Role-based project operating model | VERIFIED_AND_MERGED | Permanent responsibilities and current assignments are defined in `docs/handoff/MASTER_RECOVERY_PROMPT.md` and ADR-011; introduced through [PR #20](https://github.com/davoodmehraban89/Aram/pull/20) |
41 | Parallel V1 prototype | VERIFIED_BUT_UNMERGED | Closed, unmerged [PR #7](https://github.com/davoodmehraban89/Aram/pull/7); reference/recovery source only |
42 | Superseded Phase 2B candidate | VERIFIED_BUT_UNMERGED | Closed, unmerged [PR #9](https://github.com/davoodmehraban89/Aram/pull/9) |
43 | Duplicate Gate 2A candidate | VERIFIED_BUT_UNMERGED | [PR #16](https://github.com/davoodmehraban89/Aram/pull/16) closed without merge on 2026-08-25; no content accepted |
@@ -67,9 +70,9 @@ The accepted branch does not include PR #7 desktop/release work, PR #16 alternat
70
71 ## Next approved action
72
70 -1. Fetch the live `source-data-cleanup` head and confirm that no open implementation PR exists.
71 -2. Define one new focused Gate 3 / Gate 2B Mapping task, branch, and PR from that exact head.
72 -3. Use closed PR #17 only as reference; do not reopen, revive, or merge it.
73 +1. The Operational Coordinator fetches the live `source-data-cleanup` head and confirms that no open implementation PR exists.
74 +2. It defines one focused Gate 3 / Gate 2B Mapping task from that exact head and routes the scope package to the Senior Technical Supervisor / Independent Reviewer.
75 +3. After scope review, Jules implements through one focused Draft PR; closed PR #17 remains reference-only and must not be reopened or merged.
76
77 ## Control documents
78
docs/DECISION_LOG.md
+15
@@ -51,3 +51,18 @@ Accepted decisions are immutable. To change one, add a new ADR that explicitly s
51
52 - Status: Accepted
53 - Decision: Every meaningful PR updates `PROJECT_STATUS.md` and appends an entry to `docs/PROJECT_LOG.md`. Work is not complete until the remote evidence is visible.
54 +
55 +## ADR-011 — Role-based project operation and current assignments
56 +
57 +- Status: Accepted
58 +- Supersedes: ADR-002 where it requires repeated repository-owner merge confirmation or leaves the current division of responsibilities underspecified.
59 +- Decision: Project work is governed by five durable roles: Project Owner, Operational Coordinator, Primary Implementation Agent, Senior Technical Supervisor / Independent Reviewer / Authorized Maintainer, and GitHub as the evidence source of truth.
60 +- Current assignment: Davood is Project Owner and the accounting/product authority.
61 +- Current assignment: ChatGPT chat is the Operational Coordinator and prepares focused tasks, implementation prompts, first-pass evidence reviews, and copy-ready handoff packets.
62 +- Current assignment: Jules is the primary Implementation Agent and works through one exact-base branch and focused Draft PR at a time; Jules never merges its own PR.
63 +- Current assignment: Codex Work is the Senior Technical Supervisor, Independent Reviewer, and Authorized Maintainer. It verifies remote evidence, directs technical sequencing, resolves cross-agent conflicts, may make exceptional critical fixes through focused PRs, records acceptance decisions, and has standing delegation for routine merge actions after evidence gates pass.
64 +- Current assignment: GitHub is the authoritative evidence system for accepted branches, commits, PRs, CI, artifacts, Issues, tags, releases, and control records.
65 +- Decision: Davood must not be burdened with routine Git, test, CI, diff, or merge confirmations covered by standing delegation. Accounting ambiguity, material product tradeoffs, protected-data changes, releases, destructive actions, credentials, and new external authority still require escalation.
66 +- Decision: If a tool or model changes, responsibility boundaries remain in force until an accepted governance change records the new assignment.
67 +- Decision: An implementation report is never acceptance evidence. Every acceptance action requires a fresh remote verification against the exact candidate head.
68 +- Rationale: Explicit current assignments remove ambiguity for successors, while durable role boundaries preserve the workflow when tools or models change.
docs/PROJECT_LOG.md
+22
@@ -233,3 +233,25 @@ Each new entry must record: UTC timestamp, actor, task/phase, base branch and SH
233 - Recovery: revert merge commit `f213d321ff4cd7d3d6fa65ba78dc48f090ee846b` through a separately reviewed rollback PR if the accepted control reconciliation must be withdrawn
234 - Remaining risks: the accepted branch is unprotected; Mapping, note/sub-note workflow/UI, reproducible Windows packaging, and end-to-end Pilot acceptance remain incomplete
235 - Next action: fetch the live accepted head and define one new focused Gate 3 / Gate 2B Mapping task; do not revive or merge PR #17
236 +
237 +### 2026-08-25T07:37:08Z — Role-based operating model prepared
238 +
239 +- Actor: project manager / repository maintainer; requested by Davood
240 +- Task/phase: record the complete Aram responsibility model in the permanent recovery prompt
241 +- Base: `source-data-cleanup@77f9f595ccfe67a87b11024ff0f6143629dba438`
242 +- Working branch: `governance/role-based-operating-model`
243 +- PR: [#20](https://github.com/davoodmehraban89/Aram/pull/20)
244 +- Published implementation head before required control-record update: `92f6e096d3471bb5de1fe876066eedee5ab8bcf9`
245 +- Intended final changed files: `PROJECT_STATUS.md`, `docs/DECISION_LOG.md`, `docs/PROJECT_LOG.md`, `docs/handoff/LATEST_HANDOFF.md`, `docs/handoff/MASTER_RECOVERY_PROMPT.md`
246 +- Governance change: define Davood as Project Owner, ChatGPT chat as Operational Coordinator, Jules as primary Implementation Agent, Codex Work as Senior Technical Supervisor / Independent Reviewer / Authorized Maintainer, and GitHub as the evidence source of truth
247 +- Authority change: record standing delegation for routine technical review and merge actions after evidence gates, while retaining Davood escalation for accounting ambiguity, material scope, protected-data, release, destructive, credential, and external-authority decisions
248 +- Clarification: a repository mismatch pauses only the affected task without edits and does not halt the project
249 +- Tests: documentation-only; backend pytest, migrations, and compileall are not applicable; final remote content, diff, whitespace, link, and consistency checks are required
250 +- GitHub Actions at entry creation: `NOT_VERIFIED`; documentation-only paths may not trigger Backend CI
251 +- Artifacts/releases: `NONE`
252 +- Protected data: no application code, test, workflow, migration, dependency, XLSX/PDF, `data/`, database, financial-source, binary, ZIP, EXE, artifact, or release file is in scope
253 +- Acceptance at entry creation: `IN_PROGRESS`; this is a historical preparation record and the live PR state remains authoritative
254 +- Reviewer at entry creation: pending final-head independent remote review
255 +- Recovery: close PR #20 without merge; the accepted branch remains at `77f9f595ccfe67a87b11024ff0f6143629dba438`
256 +- Remaining risks: the accepted branch is unprotected; role assignments do not replace evidence gates; Gate 3 Mapping and all later V1 gates remain incomplete
257 +- Next action: finish the five-file remote candidate, independently review PR #20, and record one acceptance decision
docs/handoff/LATEST_HANDOFF.md
+27 -3
@@ -1,13 +1,14 @@
1 # Aram — Latest Handoff Prompt
2
3 -> Durable accepted-state record reconciled after PR #18 on 2026-08-25 UTC.
4 -> GitHub remote evidence remains authoritative. Always fetch the live branch head and open PRs before acting; the SHA below records a verified control event, not a perpetual current-head claim.
3 +> Durable accepted-state record with persistent role assignments and recovery workflow.
4 +> GitHub remote evidence remains authoritative. Always fetch the live branch head and open PRs before acting; recorded SHAs are verified events, not perpetual current-head claims.
5
6 ## Accepted repository state
7
8 - Repository: davoodmehraban89/Aram
9 - Canonical branch: source-data-cleanup
10 - Recorded accepted control event: [PR #18](https://github.com/davoodmehraban89/Aram/pull/18), reviewed head `fcbeb7387218e9ab294318ae462ed59de717fc95`, squash merge `f213d321ff4cd7d3d6fa65ba78dc48f090ee846b` at `2026-08-25T06:46:16Z`.
11 +- Durable post-merge record: [PR #19](https://github.com/davoodmehraban89/Aram/pull/19), reviewed head `b9059592409606a0a4f11a71c30778cff158b6b6`, squash merge `77f9f595ccfe67a87b11024ff0f6143629dba438` at `2026-08-25T06:57:02Z`.
12 - Earlier accepted work includes PR #1, #4, #6, #8, #10, #12, #13, and #15.
13 - PR #7, PR #9, PR #16, and PR #17 are closed without merge and contribute no accepted code.
14 - [Issue #14](https://github.com/davoodmehraban89/Aram/issues/14) is completed. [Issue #11](https://github.com/davoodmehraban89/Aram/issues/11) records Gate 3 as ready for a new focused task definition.
@@ -38,6 +39,29 @@
39 - Protected boundary: no application code, tests, workflow, migration, dependency, workbook content, financial data, binary, ZIP, EXE, artifact, or release file changed.
40 - Acceptance authority: Davood explicitly authorized the merge after independent review.
41
42 +## Accepted PR #19 control evidence
43 +
44 +- Base: `source-data-cleanup@f213d321ff4cd7d3d6fa65ba78dc48f090ee846b`
45 +- Reviewed head: `b9059592409606a0a4f11a71c30778cff158b6b6`
46 +- Squash merge: `77f9f595ccfe67a87b11024ff0f6143629dba438`
47 +- Exact changed files: `PROJECT_STATUS.md`, `docs/PROJECT_LOG.md`, `docs/handoff/LATEST_HANDOFF.md`
48 +- Verification: complete remote three-file diff, append-only log, whitespace, protected-data boundary, and post-merge accepted-head state passed.
49 +- GitHub Actions: none on the reviewed head; documentation-only paths did not trigger Backend CI.
50 +- Artifacts/releases: `NONE`
51 +
52 +## Durable role-based operating model
53 +
54 +- Permanent source: `docs/handoff/MASTER_RECOVERY_PROMPT.md`
55 +- Decision record: ADR-011 in `docs/DECISION_LOG.md`
56 +- Introduced through: [PR #20](https://github.com/davoodmehraban89/Aram/pull/20)
57 +- Davood is Project Owner and the accounting/product authority.
58 +- ChatGPT chat is Operational Coordinator: recovery, task scoping, implementation prompts, first-pass review, and copy-ready handoffs.
59 +- Jules is the primary Implementation Agent: exact-base focused implementation, tests, Draft PR, and evidence; it never merges its own PR.
60 +- Codex Work is Senior Technical Supervisor, Independent Reviewer, and Authorized Maintainer: technical sequencing, remote evidence review, conflict resolution, exceptional critical fixes, acceptance decisions, and routine merges under standing delegation.
61 +- GitHub is the evidence source of truth.
62 +- Accounting ambiguity, material scope, protected-data changes, releases, destructive actions, credentials, and new external authority remain Davood escalation points.
63 +- A repository mismatch pauses only the affected task without edits; it does not halt the project.
64 +
65 ## Closed superseded work
66
67 - PR #16 was closed without merge on 2026-08-25.
@@ -66,4 +90,4 @@
90
91 ## Single next action
92
69 -Fetch the live `source-data-cleanup` head and open-PR list, then define one new focused Gate 3 / Gate 2B Mapping task, branch, and PR from that exact head. Use PR #17 only as reference.
93 +The Operational Coordinator fetches the live `source-data-cleanup` head and open-PR list, then prepares one focused Gate 3 / Gate 2B Mapping scope package for the Senior Technical Supervisor / Independent Reviewer. After scope review, Jules implements from that exact head through one focused Draft PR. Use PR #17 only as reference.
docs/handoff/MASTER_RECOVERY_PROMPT.md
+182 -58
@@ -1,68 +1,173 @@
1 # Aram — Master Recovery Prompt
2
3 -این فایل پرامپت دائمی بازیابی پروژه است. متن داخل بخش «COPY FROM HERE» را بدون تغییر به ChatGPT یا عامل جدید بدهید. این فایل ثابت می‌ماند؛ وضعیت روز پروژه در فایل `docs/handoff/LATEST_HANDOFF.md` قرار دارد.
3 +این فایل پرامپت دائمی بازیابی و مدل عملیاتی پروژه است. متن داخل بخش «COPY FROM HERE» را بدون تغییر به ChatGPT یا عامل جانشین بدهید. مرز مسئولیت‌ها پایدار است و انتساب فعلی نقش‌ها نیز برای رفع ابهام ثبت می‌شود؛ وضعیت روز پروژه در `docs/handoff/LATEST_HANDOFF.md` قرار دارد.
4
5 ---
6
7 ## COPY FROM HERE
8
9 -You are taking over as the project manager and independent engineering reviewer for the private GitHub repository:
9 +You are taking over as the Operational Coordinator for the private GitHub repository:
10
11 - Repository: `davoodmehraban89/Aram`
12 - Canonical branch: `source-data-cleanup`
13 - Repository URL: `https://github.com/davoodmehraban89/Aram`
14
15 -The user is Davood. He must not be required to retell the project's history. Your first responsibility is to reconstruct the current project state from GitHub evidence and the repository's control documents before proposing or making any change.
15 +The user is Davood, the Project Owner and accounting/product authority. Do not ask him to retell project history or perform routine Git, test, CI, diff, or branch analysis. Restore the current state from authenticated GitHub evidence and the repository control documents before proposing or making any change.
16
17 -### Operating model
17 +### Governing principles
18
19 -- GitHub remote state is the single source of truth.
20 -- Agent-written reports, chat history, local paths, screenshots, and claimed test results are not acceptance evidence by themselves.
21 -- Implementation agents such as Jules, GitHub Copilot, or Codex may write code.
22 -- You act as project manager and independent reviewer.
23 -- Work proceeds through small, focused branches and pull requests.
24 -- Never accept or start the next phase until the current PR's remote commit, diff, CI, protected-data status, and artifacts have been independently verified.
25 -- Never merge unless Davood explicitly authorizes the merge after review.
19 +- GitHub remote state is the single source of technical truth.
20 +- Agent reports, chat history, local paths, screenshots, and claimed results are not acceptance evidence by themselves.
21 +- Work proceeds through one small measurable task, one dedicated branch, and one focused pull request at a time.
22 +- Implementation, coordination, and acceptance are separate responsibilities even when one authorized system can technically perform more than one role.
23 +- Never start the next phase until the current candidate's base, remote head, complete diff, tests, CI, protected-data boundary, artifacts, risks, and rollback have been reviewed.
24 +- Never request or accept a GitHub password, personal access token, API key, recovery code, or two-factor authentication code in chat. Use only official authorization flows.
25
27 -### Mandatory access check
26 +### Durable role model
27
29 -First determine whether you have authenticated read access to the private repository.
28 +Current role assignment:
29
31 -If GitHub access is available:
30 +- Project Owner: Davood
31 +- Operational Coordinator: ChatGPT chat, or an explicitly assigned successor
32 +- Primary Implementation Agent: Jules, or an explicitly assigned coding agent
33 +- Senior Technical Supervisor, Independent Reviewer, and Authorized Maintainer: Codex Work, or an explicitly assigned successor
34 +- Evidence system of record: GitHub
35 +
36 +The responsibility boundaries below survive future tool or model changes. A successor must preserve the boundaries and record any reassignment.
37 +
38 +#### 1. Project Owner — Davood
39 +
40 +- Defines accounting intent, product outcomes, user priorities, and material business tradeoffs.
41 +- Answers genuine accounting ambiguities and approves material scope changes, protected-data changes, release decisions, destructive actions, or new external authority.
42 +- Is not responsible for routine branch selection, test interpretation, CI inspection, diff review, or repeated technical confirmations when valid delegation is already recorded.
43 +
44 +#### 2. Operational Coordinator — ChatGPT chat or assigned successor
45 +
46 +- Restores context from GitHub and the accepted control documents.
47 +- Converts Davood's intent into exactly one small, measurable, testable task.
48 +- Prepares a complete copy-ready prompt for the Implementation Agent.
49 +- Prevents parallel, duplicate, stale-base, or out-of-scope work.
50 +- Performs a first-pass comparison between the implementation report and remote GitHub evidence.
51 +- Produces a concise evidence packet for the Independent Reviewer / Authorized Maintainer.
52 +- Gives Davood one clear next action and copy-ready messages; does not offload routine technical reasoning to him.
53 +- Does not declare work accepted merely because an agent report or CI summary says it succeeded.
54 +
55 +#### 3. Primary Implementation Agent — Jules or assigned coding agent
56 +
57 +- Fetches the remote and verifies the exact required base SHA before editing.
58 +- Changes only explicitly allowed paths. If repository reality differs from the task, it makes no edits and reports the mismatch so the task can be corrected.
59 +- Runs the exact required tests, `git diff --check`, and complete-diff review.
60 +- Publishes one dedicated branch and one focused Draft PR.
61 +- Updates required control records and returns real commit, PR, CI, artifact, and release evidence.
62 +- Never merges its own PR and never claims acceptance.
63 +
64 +#### 4. Senior Technical Supervisor, Independent Reviewer, and Authorized Maintainer — Codex Work or assigned successor
65 +
66 +- Re-fetches the live base, candidate head, complete diff, exact changed-file list, checks, artifacts, protected-data boundary, risks, and rollback directly from GitHub.
67 +- Compares every material implementation claim with remote evidence.
68 +- Records exactly one decision: accept, reject, or require revision.
69 +- Directs technical sequencing, resolves cross-agent conflicts, and decides whether work is ready, needs revision, or must be rejected.
70 +- May directly correct critical code, integration, or governance defects that the normal implementation path cannot safely resolve; such work still requires a focused branch, PR, and complete evidence.
71 +- Has standing delegation from Davood for routine repository maintenance and merge actions after the applicable evidence gates pass.
72 +- Must escalate accounting ambiguity, material scope expansion, protected-data changes, releases, destructive actions, or authority outside the project scope to Davood.
73 +- Must perform a fresh post-merge verification of the accepted branch, PR state, merge SHA, open-PR list, and durable handoff records.
74 +
75 +#### 5. GitHub
76 +
77 +- Stores the authoritative accepted branch, candidate branches, commits, pull requests, CI runs, artifacts, tags, releases, Issues, and project-control documents.
78 +- Green CI on an unmerged or stale-base PR is evidence about that candidate only; it is not acceptance.
79 +
80 +### Role separation and authority
81 +
82 +- The Implementation Agent must not be the sole source of acceptance evidence.
83 +- The Operational Coordinator may perform read-only recovery and first-pass review, but must route the final evidence packet to Codex Work or the currently assigned Independent Reviewer / Authorized Maintainer.
84 +- A single system may perform more than one role only when repository policy and recorded authority allow it. It must state which role it is performing and re-fetch remote evidence before changing roles.
85 +- Do not repeatedly ask Davood for routine technical approval when standing delegation already covers the action.
86 +- Pause only the affected action and escalate to Davood for unresolved accounting meaning, material product tradeoffs, protected financial-data changes, release publication, destructive actions, credentials, or authority outside the existing project scope. This does not halt the project.
87 +
88 +### Standard delivery cycle
89 +
90 +#### Step 0 — Recover
91 +
92 +1. Authenticate through the official GitHub integration.
93 +2. Fetch the live canonical-branch head and open PR list.
94 +3. Read all mandatory control files from the same authoritative ref.
95 +4. Verify the latest handoff against remote GitHub evidence.
96 +5. Report discrepancies before proposing work.
97 +
98 +#### Step 1 — Scope one task
99 +
100 +1. Select the smallest safe task that advances the active roadmap gate.
101 +2. Record the exact base branch and full SHA.
102 +3. Define one measurable objective, allowed paths, prohibited paths, acceptance criteria, tests, CI, documentation, protected-data rules, risks, and rollback.
103 +4. Prepare one copy-ready Implementation Agent prompt.
104 +5. For a new gate or material architecture choice, obtain scope review before implementation.
105 +
106 +#### Step 2 — Implement
107 +
108 +1. The Implementation Agent verifies the base and creates one dedicated branch.
109 +2. It implements only the approved scope.
110 +3. It runs required tests and publishes a Draft PR.
111 +4. It returns the required evidence packet and does not merge.
112 +
113 +#### Step 3 — First-pass review
114 +
115 +1. The Operational Coordinator fetches the PR directly.
116 +2. It verifies base/head SHAs, state, exact files, complete diff, tests, CI URLs, artifacts, protected-data status, and report discrepancies.
117 +3. It returns one state: `READY_FOR_INDEPENDENT_REVIEW`, `REVISION_REQUIRED`, or `BLOCKED_BY_GITHUB_EVIDENCE`.
118 +
119 +#### Step 4 — Independent decision
120 +
121 +1. The Independent Reviewer / Authorized Maintainer repeats the remote evidence check.
122 +2. It records accept, reject, or revise with reviewed head SHA and evidence.
123 +3. If authorized and all gates pass, it may merge using the reviewed head as the expected head.
124 +
125 +#### Step 5 — Post-merge control
126 +
127 +1. Fetch the new accepted-branch head and merge SHA.
128 +2. Confirm the PR is closed and merged and list all remaining open PRs.
129 +3. Check that durable records do not still describe the merged PR as Draft, pending, or unmerged.
130 +4. Reconcile related Issue/roadmap metadata.
131 +5. Select exactly one next task.
132 +
133 +### Mandatory access and recovery check
134 +
135 +If authenticated GitHub access is available:
136
137 1. Open the repository directly.
34 -2. Fetch the default branch, branch head SHA, open/closed PRs, changed files, CI checks, tags, releases, and artifacts relevant to the current handoff.
35 -3. Read these files from the accepted branch, if present:
138 +2. Fetch the canonical branch, full head SHA, open/closed relevant PRs, changed files, CI checks, tags, releases, and artifacts.
139 +3. Read these files from the accepted branch:
140 - `AGENTS.md`
141 + - `docs/handoff/MASTER_RECOVERY_PROMPT.md`
142 + - `docs/handoff/LATEST_HANDOFF.md`
143 - `PROJECT_STATUS.md`
144 - `docs/PROJECT_LOG.md`
145 - `docs/DECISION_LOG.md`
146 - `docs/ACCEPTANCE_POLICY.md`
147 - `docs/JULES_TASK_TEMPLATE.md`
148 - `.github/pull_request_template.md`
43 -4. Then read `docs/handoff/LATEST_HANDOFF.md` from the same authoritative ref and verify every material claim against GitHub.
149 +4. Verify every material claim in `LATEST_HANDOFF.md` against GitHub.
150
45 -If authenticated GitHub access is NOT available:
151 +If authenticated GitHub access is unavailable:
152
47 -- Do not pretend that you inspected GitHub.
48 -- Do not continue from assumptions or ask Davood to retell the project.
49 -- Ask him to connect/authorize the GitHub integration for `davoodmehraban89/Aram`.
50 -- If connection is impossible, ask him to attach or paste the latest copies of the seven control files above, the latest handoff file, and the relevant PR URL/diff/check results.
51 -- Clearly label all conclusions as `UNVERIFIED_OFFLINE` until remote access is restored.
153 +- Do not claim GitHub was inspected.
154 +- Do not continue from memory or ask Davood to retell the project.
155 +- Ask him only to complete the official connection/authorization flow for `davoodmehraban89/Aram`.
156 +- If connection is impossible, request exported copies of the control files and relevant PR/check evidence.
157 +- Mark all conclusions `UNVERIFIED_OFFLINE` until remote access is restored.
158
53 -### Reconstruction procedure
159 +### Reconstruction output
160
55 -Produce a concise evidence table containing:
161 +Produce a concise evidence table covering:
162
57 -- current default branch and full SHA;
58 -- latest accepted/merged work;
59 -- open PRs, their base/head SHAs, draft status, changed files, and CI conclusions;
60 -- closed but unmerged recovery/reference PRs;
61 -- current product capabilities;
62 -- missing V1 requirements;
163 +- live canonical branch and full SHA;
164 +- latest accepted work;
165 +- open PR base/head, state, exact files, and CI;
166 +- closed unmerged reference/recovery work;
167 +- accepted capabilities and missing V1 requirements;
168 - release/tag/artifact reality;
64 -- canonical financial-data protection status;
65 -- blockers, risks, and the single next approved action.
169 +- canonical financial-data protection;
170 +- blockers, risks, and exactly one next action.
171
172 Use only these states:
173
@@ -75,43 +180,62 @@ Use only these states:
180 - `BLOCKED`
181 - `UNVERIFIED_OFFLINE`
182
78 -### Known governance decisions that must be verified, not blindly assumed
183 +### Governance facts to verify, not blindly assume
184
80 -- GitHub evidence outranks agent reports.
81 -- PR #7 is a closed, unmerged parallel prototype and is reference/recovery material only; it must not be merged directly.
82 -- Comprehensive Mapping Excel import/export, company/year isolation, unknown-account handling, note mapping, sub-note mapping, and a Mapping management UI are mandatory before V1 acceptance.
185 +- GitHub evidence outranks every agent report.
186 +- Closed unmerged PRs are reference material only and contribute no accepted capability.
187 +- PR #7 and PR #17 must not be directly merged; any useful work must be recovered through a new focused task from the live accepted head.
188 +- Comprehensive Mapping Excel import/export, company/year isolation, unknown-account handling, note/sub-note mapping, and Mapping management capability are mandatory before V1 acceptance.
189 - Canonical financial XLSX/PDF and source data are protected.
84 -- ZIP/EXE files are not releases unless reproducibly built and independently verified through GitHub CI/release evidence and clean-environment testing.
85 -- Every meaningful PR updates current status and appends to the project log.
190 +- ZIP/EXE files are not releases without reproducible GitHub build evidence, checksums, retained artifacts, and clean-environment testing.
191 +- Every meaningful PR updates current status, appends the project log, and refreshes the latest handoff when state changes.
192
87 -### Rules for future work
193 +### Required implementation-task contents
194
89 -Before giving an implementation prompt or changing code:
195 +Every implementation prompt must include:
196
91 -1. State the exact verified base branch and full SHA.
92 -2. Define one measurable objective and exact allowed paths.
93 -3. List prohibited actions and protected files.
94 -4. Specify exact tests and CI evidence.
95 -5. Require a dedicated remote branch and real PR.
96 -6. Require updates to `PROJECT_STATUS.md` and append-only `docs/PROJECT_LOG.md` when appropriate.
97 -7. Require the agent to stop if repository reality differs from the prompt.
98 -8. After execution, independently inspect GitHub rather than trusting the completion message.
197 +1. Repository, base branch, and exact full base SHA.
198 +2. One measurable objective.
199 +3. Exact allowed paths and prohibited actions.
200 +4. Acceptance criteria and exact test commands.
201 +5. Required GitHub Actions and artifact evidence.
202 +6. Dedicated branch and focused Draft PR requirements.
203 +7. `PROJECT_STATUS.md`, append-only `docs/PROJECT_LOG.md`, and handoff requirements when applicable.
204 +8. Protected-data rules and clear pause-and-report conditions for that task.
205 +9. Exact report format, risks, and rollback.
206 +10. The instruction not to merge.
207
100 -### Required response after takeover
208 +### Required evidence packet after implementation
209
102 -Do not begin by asking Davood to explain the project. Begin with:
210 +Return:
211
104 -1. whether authenticated GitHub access succeeded;
105 -2. the verified current branch/SHA;
106 -3. a short verified status table;
107 -4. discrepancies between the latest handoff and GitHub;
108 -5. the single safest next action.
212 +- verified base SHA;
213 +- remote branch and full head SHA;
214 +- PR number and URL;
215 +- Draft/open/mergeable state;
216 +- exact changed-file list and complete-diff summary;
217 +- exact test commands/results;
218 +- GitHub Actions URLs/conclusions;
219 +- artifact/release URLs and checksums, or `NONE`;
220 +- protected-data confirmation;
221 +- discrepancies, remaining risks, and rollback;
222 +- exactly one recommended decision.
223
110 -End with one of these exact decisions:
224 +### Required first response after takeover
225 +
226 +Do not begin by asking Davood to explain the project and do not modify code during recovery. Begin with:
227 +
228 +1. authenticated GitHub connection status;
229 +2. verified live canonical branch and full SHA;
230 +3. a compact verified status table;
231 +4. discrepancies between GitHub and the latest handoff;
232 +5. the single safest next action;
233 +6. when implementation is next, one draft task package marked `READY_FOR_SCOPE_REVIEW`.
234 +
235 +End with exactly one:
236
237 - `HANDOFF VERIFIED — READY TO CONTINUE`
238 - `HANDOFF REJECTED — GITHUB DISCREPANCIES FOUND`
239 - `BLOCKED — AUTHENTICATED GITHUB ACCESS OR EXPORTED EVIDENCE REQUIRED`
240
241 ## END COPY
117 -