docs: establish project control and durable handoff system (#10)
Add repository governance, acceptance policy, agent instructions, project logs, and durable recovery prompts. Documentation-only; no application code or canonical financial data changes.
davoodmehraban89 committed
Aug 24, 2026 at 10:16 UTC
e42d76a24e591a265d3bb6c79ac614ff5b2f211f
10 files changed
+794
.github/pull_request_template.md
new
+74
@@ -0,0 +1,74 @@
1
+## Objective
2
+
3
+<!-- One measurable outcome. -->
4
+
5
+## Base branch and base SHA
6
+
7
+- Base branch:
8
+- Verified base SHA:
9
+
10
+## Scope
11
+
12
+### Included
13
+
14
+-
15
+
16
+### Excluded
17
+
18
+-
19
+
20
+## Changed files
21
+
22
+<!-- Exact list; explain every binary/generated file. -->
23
+
24
+-
25
+
26
+## Tests
27
+
28
+| Command | Result |
29
+|---|---|
30
+| | |
31
+
32
+## GitHub Actions evidence
33
+
34
+- Run URL:
35
+- Result:
36
+
37
+## Canonical data verification
38
+
39
+- [ ] No canonical XLSX/PDF or financial source changed.
40
+- [ ] Any approved exception is listed with before/after hashes and recovery steps.
41
+
42
+## Binary / artifact changes
43
+
44
+- [ ] None
45
+- [ ] Present and explained below with workflow URL and checksums:
46
+
47
+## Documentation updates
48
+
49
+- [ ] `PROJECT_STATUS.md` updated, or no current-status change explained.
50
+- [ ] `docs/PROJECT_LOG.md` appended; historical entries were not rewritten.
51
+- [ ] Decision changes recorded as a new ADR, if applicable.
52
+
53
+## Risks
54
+
55
+-
56
+
57
+## Rollback / recovery
58
+
59
+-
60
+
61
+## Acceptance checklist
62
+
63
+- [ ] Correct base branch and SHA
64
+- [ ] Focused PR
65
+- [ ] Exact changed-file list
66
+- [ ] No unexplained binary or data changes
67
+- [ ] Tests executed
68
+- [ ] Required CI successful
69
+- [ ] Documentation updated
70
+- [ ] Independent review pending/completed
71
+- [ ] Artifact/release evidence verified when applicable
72
+- [ ] Explicit acceptance decision recorded
73
+
74
+**Agent reports are not acceptance evidence. Do not merge until remote evidence is independently reviewed.**
AGENTS.md
new
+55
@@ -0,0 +1,55 @@
1
+# Repository Agent Instructions
2
+
3
+These instructions apply to every AI coding agent working in this repository, including Jules, Copilot, and Codex.
4
+
5
+## Source of truth
6
+
7
+GitHub remote state is authoritative. Before editing:
8
+
9
+1. Fetch the remote.
10
+2. Read `PROJECT_STATUS.md`, `docs/ACCEPTANCE_POLICY.md`, and `docs/PROJECT_LOG.md`.
11
+3. Verify the requested base branch and full base SHA.
12
+4. If the actual SHA or repository state differs from the task, stop without changes and report the mismatch.
13
+
14
+Never treat a local file, task summary, or agent report as proof that a branch, PR, CI run, artifact, tag, or release exists.
15
+
16
+## Work rules
17
+
18
+- Use one dedicated branch and one focused PR per task.
19
+- Modify only explicitly allowed paths.
20
+- Do not merge your own PR.
21
+- Do not incorporate work from closed PR #7 except when a task explicitly identifies the exact feature and files to recover.
22
+- Do not modify canonical XLSX/PDF, `data/`, databases, or financial source values unless the task is an approved data-change task with hashes and recovery steps.
23
+- Do not commit ZIP, EXE, build output, secrets, credentials, caches, or local databases unless explicitly required by an approved artifact task.
24
+- Do not invent financial values, mapping rules, tests, CI outcomes, URLs, or acceptance status.
25
+
26
+## Verification
27
+
28
+- Run the exact tests required by the task.
29
+- Run `git diff --check`.
30
+- Inspect the complete diff against the approved base SHA.
31
+- Confirm the exact changed-file list.
32
+- Push the branch and open a real PR into the requested base branch.
33
+- Provide real commit, PR, CI, artifact, and release URLs when applicable.
34
+- If GitHub publication fails, the task is not complete.
35
+
36
+## Project records
37
+
38
+Every meaningful PR must:
39
+
40
+- update `PROJECT_STATUS.md` when current state changes;
41
+- append a complete entry to `docs/PROJECT_LOG.md`;
42
+- add a new ADR instead of silently rewriting an accepted decision;
43
+- satisfy `docs/ACCEPTANCE_POLICY.md`;
44
+- use `.github/pull_request_template.md`;
45
+- update `docs/handoff/LATEST_HANDOFF.md` after every meaningful completed or rejected step so a successor can resume without chat history;
46
+- keep `docs/handoff/MASTER_RECOVERY_PROMPT.md` stable unless the governance process itself changes;
47
+- keep `docs/handoff/CHATGPT_BOOTSTRAP_PROMPT.txt` as the saveable entry point for a successor chat.
48
+
49
+An agent's written success report is not acceptance evidence.
50
+
51
+## Required final response
52
+
53
+Return the verified base SHA, remote branch, full head SHA, PR number and URL, exact changed files, test commands/results, GitHub Actions URLs/results, artifact/release evidence or `NONE`, protected-data confirmation, and remaining risks.
54
+
55
+End with: `Ready for independent GitHub review; not merged.`
PROJECT_STATUS.md
new
+64
@@ -0,0 +1,64 @@
1
+# Aram Project Status
2
+
3
+> Canonical status entry point. Update this file in every meaningful pull request.
4
+
5
+## Repository baseline
6
+
7
+- Repository: [davoodmehraban89/Aram](https://github.com/davoodmehraban89/Aram)
8
+- Accepted branch: `source-data-cleanup`
9
+- Accepted baseline commit: [`5122fd052ebe0ffe0e07dbb8153a872a4f047355`](https://github.com/davoodmehraban89/Aram/commit/5122fd052ebe0ffe0e07dbb8153a872a4f047355)
10
+- Product objective: a controlled, auditable accounting and financial-statement workflow that preserves canonical source data.
11
+
12
+## Status vocabulary
13
+
14
+| State | Meaning |
15
+|---|---|
16
+| `VERIFIED_AND_MERGED` | Present on the accepted branch with Git evidence. |
17
+| `VERIFIED_BUT_UNMERGED` | Present in a remote commit or PR, but not accepted. |
18
+| `PRESENT_BUT_UNVERIFIED` | Present, but required tests or evidence are missing. |
19
+| `CLAIMED_BUT_NOT_PROVEN` | Reported by an actor, with no sufficient GitHub evidence. |
20
+| `NOT_IMPLEMENTED` | Required capability is absent. |
21
+| `IN_PROGRESS` | Work is in an open PR and is not accepted. |
22
+| `BLOCKED` | Work cannot proceed until the recorded blocker is resolved. |
23
+
24
+## Verified state
25
+
26
+| Area | State | Evidence / note |
27
+|---|---|---|
28
+| Phase 1B-1 source inventory | `VERIFIED_AND_MERGED` | [PR #1](https://github.com/davoodmehraban89/Aram/pull/1) |
29
+| Phase 1B-2 audit corrections | `VERIFIED_AND_MERGED` | [PR #4](https://github.com/davoodmehraban89/Aram/pull/4) |
30
+| Phase 2A backend foundation | `VERIFIED_AND_MERGED` | [PR #6](https://github.com/davoodmehraban89/Aram/pull/6) |
31
+| One-file model refactor | `VERIFIED_AND_MERGED` | [PR #8](https://github.com/davoodmehraban89/Aram/pull/8) |
32
+| Phase 2B ingestion foundation | `IN_PROGRESS` | Draft [PR #9](https://github.com/davoodmehraban89/Aram/pull/9); not merged |
33
+| Parallel V1 prototype | `VERIFIED_BUT_UNMERGED` | Closed, unmerged [PR #7](https://github.com/davoodmehraban89/Aram/pull/7); reference/recovery source only |
34
+| PR #7 test/release claims | `CLAIMED_BUT_NOT_PROVEN` | No independent acceptance evidence recorded |
35
+| Official V1 release | `NOT_IMPLEMENTED` | No accepted user-ready release |
36
+| Comprehensive Mapping Excel import/export | `NOT_IMPLEMENTED` | Mandatory before V1 acceptance |
37
+| Note and sub-note mapping workflow/UI | `NOT_IMPLEMENTED` | Mandatory before V1 acceptance |
38
+
39
+The accepted branch does not include PR #7's `desktop/`, `dist/`, ZIP/EXE, or V1 release-documentation changes. A generated binary inside an unmerged branch is not an official release.
40
+
41
+## Current risks and blockers
42
+
43
+- Agent reports have previously diverged from the remote repository.
44
+- PR #7 is large, unmerged, and cannot be accepted as a single unit.
45
+- PR #9 is draft work and must not be treated as accepted.
46
+- Binary execution on a clean Windows environment has not been independently proven.
47
+- Mapping, notes, and sub-notes are incomplete for V1.
48
+
49
+## Next approved action
50
+
51
+1. Review and merge this documentation-control PR only after confirming its nine-file documentation and handoff scope.
52
+2. Independently review PR #9 and accept, correct, or close it.
53
+3. Audit PR #7 feature-by-feature; recover useful work through small PRs only.
54
+4. Build the mandatory Mapping Excel and note/sub-note workflow before V1 acceptance.
55
+
56
+## Control documents
57
+
58
+- [Project log](docs/PROJECT_LOG.md)
59
+- [Decision log](docs/DECISION_LOG.md)
60
+- [Acceptance policy](docs/ACCEPTANCE_POLICY.md)
61
+- [Jules task template](docs/JULES_TASK_TEMPLATE.md)
62
+- [Master recovery prompt](docs/handoff/MASTER_RECOVERY_PROMPT.md)
63
+- [Latest handoff snapshot](docs/handoff/LATEST_HANDOFF.md)
64
+- [Saveable ChatGPT bootstrap prompt](docs/handoff/CHATGPT_BOOTSTRAP_PROMPT.txt)
docs/ACCEPTANCE_POLICY.md
new
+41
@@ -0,0 +1,41 @@
1
+# Acceptance Policy
2
+
3
+> An agent's written success report is not acceptance evidence.
4
+
5
+Every phase must satisfy all applicable gates below.
6
+
7
+## Mandatory gates
8
+
9
+- [ ] The target branch and exact base SHA match the approved starting point.
10
+- [ ] A dedicated working branch exists remotely.
11
+- [ ] The PR is focused and targets the approved branch.
12
+- [ ] The PR lists every changed file and explains each change.
13
+- [ ] No unexplained binary, generated, database, or financial-data change exists.
14
+- [ ] Required test commands and results are recorded.
15
+- [ ] Required GitHub Actions checks succeeded and their URLs are recorded.
16
+- [ ] Canonical XLSX/PDF and financial source hashes or unchanged status are verified.
17
+- [ ] `PROJECT_STATUS.md` is updated when current state changes.
18
+- [ ] `docs/PROJECT_LOG.md` receives an append-only entry.
19
+- [ ] An independent reviewer checks the remote commit, diff, and evidence.
20
+- [ ] The acceptance decision is explicit: accepted, rejected, or changes requested.
21
+- [ ] Artifact checksums, provenance, and download URLs are verified when relevant.
22
+- [ ] Rollback or recovery instructions are recorded.
23
+
24
+## Artifact and release gate
25
+
26
+A local file or a file committed to an unmerged branch is not a release. Acceptance requires a reproducible workflow, successful run URL, artifact metadata/checksum, tag, release URL, correct target commit, downloadable assets, and clean-environment verification appropriate to the artifact.
27
+
28
+## Stop conditions
29
+
30
+Stop and report without making changes if the base SHA differs, required files are unavailable, canonical data would be changed outside explicit scope, unrelated changes are present, tests cannot run, authentication blocks remote publication, or evidence cannot be obtained.
31
+
32
+## Decision record
33
+
34
+The reviewer must record:
35
+
36
+- reviewed commit SHA;
37
+- reviewed file list;
38
+- CI run URLs and conclusions;
39
+- artifact/release URLs if applicable;
40
+- detected risks;
41
+- final decision and reviewer identity.
docs/DECISION_LOG.md
new
+53
@@ -0,0 +1,53 @@
1
+# Decision Log
2
+
3
+Accepted decisions are immutable. To change one, add a new ADR that explicitly supersedes it.
4
+
5
+## ADR-001 — GitHub is the source of truth
6
+
7
+- Status: Accepted
8
+- Decision: Remote commits, pull requests, CI runs, tags, releases, and downloadable assets outrank agent-written reports.
9
+
10
+## ADR-002 — Separate implementation and acceptance
11
+
12
+- Status: Accepted
13
+- Decision: Jules or another coding agent may implement. ChatGPT/Codex acts as project manager and independent GitHub reviewer. The repository owner makes the final merge decision.
14
+
15
+## ADR-003 — Small reviewable pull requests
16
+
17
+- Status: Accepted
18
+- Decision: Each task uses a dedicated branch and a focused PR. Unrelated work is rejected or split.
19
+
20
+## ADR-004 — Evidence gates are mandatory
21
+
22
+- Status: Accepted
23
+- Decision: No phase is accepted without the correct base SHA, remote commit, exact diff, test evidence, successful required CI, and explicit review.
24
+
25
+## ADR-005 — Binary verification
26
+
27
+- Status: Accepted
28
+- Decision: EXE/ZIP files require a reproducible build workflow, checksums, retained CI artifacts, and clean-environment execution evidence.
29
+
30
+## ADR-006 — Release verification
31
+
32
+- Status: Accepted
33
+- Decision: A release is accepted only after its tag, release page, URL, commit, and downloadable assets are independently verified.
34
+
35
+## ADR-007 — PR #7 is reference material
36
+
37
+- Status: Accepted
38
+- Decision: [PR #7](https://github.com/davoodmehraban89/Aram/pull/7) must not be merged directly. Useful capabilities may be recovered through small, tested PRs from the accepted baseline.
39
+
40
+## ADR-008 — Mapping is mandatory for V1
41
+
42
+- Status: Accepted
43
+- Decision: Comprehensive Mapping Excel import/export, company/year isolation, unknown-account handling, note mapping, sub-note mapping, and management UI are required before V1 acceptance.
44
+
45
+## ADR-009 — Canonical financial data is protected
46
+
47
+- Status: Accepted
48
+- Decision: Canonical XLSX/PDF and financial-source files are immutable unless a separately approved data-change task identifies exact files, hashes, rationale, and recovery procedure.
49
+
50
+## ADR-010 — Persistent handoff records
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.
docs/JULES_TASK_TEMPLATE.md
new
+71
@@ -0,0 +1,71 @@
1
+# Jules Task Template
2
+
3
+Copy this template for one focused task. Replace every placeholder.
4
+
5
+## Objective
6
+
7
+[One measurable outcome.]
8
+
9
+## Verified starting point
10
+
11
+- Repository: `davoodmehraban89/Aram`
12
+- Base branch: `[BASE_BRANCH]`
13
+- Required base SHA: `[FULL_SHA]`
14
+
15
+Fetch the remote and verify the SHA before editing. If it differs, stop and report the actual SHA. Do not guess or continue.
16
+
17
+## Strict scope
18
+
19
+Allowed paths:
20
+
21
+- `[PATH]`
22
+
23
+Required implementation:
24
+
25
+1. [Requirement]
26
+2. [Requirement]
27
+
28
+## Prohibited actions
29
+
30
+- Do not merge the PR.
31
+- Do not modify files outside the allowed paths.
32
+- Do not modify canonical XLSX/PDF or financial source data.
33
+- Do not add unrelated refactors, generated binaries, releases, or dependency changes.
34
+- Do not claim success without remote evidence.
35
+
36
+## Tests and verification
37
+
38
+Run:
39
+
40
+```text
41
+[EXACT COMMANDS]
42
+```
43
+
44
+Also run `git diff --check` and inspect the complete diff against the required base SHA.
45
+
46
+## GitHub evidence
47
+
48
+Create a dedicated branch and a focused PR into `[BASE_BRANCH]`. Return:
49
+
50
+- verified base SHA;
51
+- remote branch;
52
+- full head commit SHA;
53
+- PR number and real URL;
54
+- exact changed-file list;
55
+- exact test commands/results;
56
+- GitHub Actions run URLs/results;
57
+- artifacts/releases and checksums, or `NONE`;
58
+- confirmation of canonical-data status;
59
+- remaining risks.
60
+
61
+## Documentation updates
62
+
63
+Update `PROJECT_STATUS.md` if current status changes. Append one complete entry to `docs/PROJECT_LOG.md`. Never rewrite accepted log history.
64
+
65
+## Completion statement
66
+
67
+End with: `Ready for independent GitHub review; not merged.`
68
+
69
+## Stop conditions
70
+
71
+Stop without edits if repository state differs from this task, the scope is ambiguous, required evidence is unavailable, protected data would change, or publication to GitHub fails.
docs/PROJECT_LOG.md
new
+105
@@ -0,0 +1,105 @@
1
+# Project Log
2
+
3
+This is an append-only operational log. Never delete or rewrite accepted entries. Corrections must be added as new entries that reference the original entry.
4
+
5
+## Required entry fields
6
+
7
+Each new entry must record: UTC timestamp, actor, task/phase, base branch and SHA, working branch, PR number/URL, commit SHA, exact changed files, test command, GitHub Actions run URL/result, artifact or release URL, acceptance status, reviewer, remaining risks, and next action. Unknown evidence must be written as `NOT_VERIFIED`, never guessed.
8
+
9
+## Historical entries imported from GitHub
10
+
11
+### 2026-08-18T11:08:12Z — Phase 1B-1
12
+
13
+- Actor: Jules / repository owner
14
+- Base: `source-data-cleanup@d18287a74c9453e8071ed03db6b369805b5ccde3`
15
+- Working branch: `phase-1b1-audit-report-7365389436990903239`
16
+- PR: [#1](https://github.com/davoodmehraban89/Aram/pull/1)
17
+- Head SHA: `a3e3f675ca637b5ab719b1d6e5fc37c9fb47f707`
18
+- Merge SHA: `cd074095c3d63a4a2da1ab8490ce772f555fc91d`
19
+- Changed files: 3; exact list available in the PR
20
+- Tests / CI / artifacts: `NOT_VERIFIED`
21
+- Acceptance: `VERIFIED_AND_MERGED`
22
+- Reviewer: repository owner
23
+- Remaining risk: historical test evidence not recorded here
24
+- Next action: Phase 1B-2
25
+
26
+### 2026-08-19T16:29:06Z — Phase 1B-2 corrections
27
+
28
+- Actor: Jules / repository owner
29
+- Base: `source-data-cleanup@cd074095c3d63a4a2da1ab8490ce772f555fc91d`
30
+- Working branch: `jules-1168663913887856558-73b8a885`
31
+- PR: [#4](https://github.com/davoodmehraban89/Aram/pull/4)
32
+- Head SHA: `ce77f7511066ff85845e6d1f383f20a264f4730b`
33
+- Merge SHA: `f8084268c1080595d9da672d490834ed677ad77f`
34
+- Changed files: 7; exact list available in the PR
35
+- Tests / CI / artifacts: `NOT_VERIFIED`
36
+- Acceptance: `VERIFIED_AND_MERGED`
37
+- Reviewer: repository owner
38
+- Remaining risk: claims must still be interpreted against the source evidence
39
+- Next action: Phase 2A
40
+
41
+### 2026-08-20T18:53:39Z — Phase 2A backend foundation
42
+
43
+- Actor: ChatGPT/Codex implementation; repository owner
44
+- Base: `source-data-cleanup@f8084268c1080595d9da672d490834ed677ad77f`
45
+- Working branch: `codex/phase-2a-backend-foundation`
46
+- PR: [#6](https://github.com/davoodmehraban89/Aram/pull/6)
47
+- Head SHA: `2bcf2b3cbab6d3df1d9340397cec43e363aec8f7`
48
+- Merge SHA: `84b19ef1a6efe3e82291a565829ba3e1fc47d246`
49
+- Changed files: 18; exact list available in the PR
50
+- Reported test command: `cd backend && pytest`
51
+- GitHub Actions: reported successful in PR; direct run URL not recorded here
52
+- Artifacts: none
53
+- Acceptance: `VERIFIED_AND_MERGED`
54
+- Reviewer: repository owner
55
+- Remaining risk: preserve data and fiscal-year invariants
56
+- Next action: focused ingestion work
57
+
58
+### 2026-08-24T00:34:12Z — Model refactor
59
+
60
+- Actor: Jules / repository owner
61
+- Base: `source-data-cleanup@84b19ef1a6efe3e82291a565829ba3e1fc47d246`
62
+- Working branch: `refactor/drg-parent-year-id-15088443704684163304`
63
+- PR: [#8](https://github.com/davoodmehraban89/Aram/pull/8)
64
+- Head SHA: `b602ced45b04ac0876acac2dcca381d72de38c27`
65
+- Merge SHA: `5122fd052ebe0ffe0e07dbb8153a872a4f047355`
66
+- Changed files: `backend/src/aram_backend/models.py`
67
+- Reported test command: `python -m pytest backend/tests/`
68
+- GitHub Actions URL: `NOT_VERIFIED`
69
+- Artifacts: none
70
+- Acceptance: `VERIFIED_AND_MERGED`
71
+- Reviewer: repository owner
72
+- Remaining risk: none newly recorded
73
+- Next action: Phase 2B review
74
+
75
+### 2026-08-24T00:34:36Z — Parallel V1 prototype closed
76
+
77
+- Actor: Jules / repository owner
78
+- Base: `source-data-cleanup@84b19ef1a6efe3e82291a565829ba3e1fc47d246`
79
+- Working branch: `phase-2a-backend-foundation-10237597358138521261`
80
+- PR: [#7](https://github.com/davoodmehraban89/Aram/pull/7)
81
+- Head SHA: `a06aab6f2e2c50ec8111316b1a689fb71660c000`
82
+- Merge SHA: none
83
+- Changed files: 94; exact list available in the PR
84
+- Tests / GitHub Actions / official release: `NOT_VERIFIED`
85
+- Branch artifacts: present in the unmerged PR; not accepted release assets
86
+- Acceptance: `VERIFIED_BUT_UNMERGED`; closed, superseded/out of scope
87
+- Reviewer: repository owner
88
+- Remaining risk: large parallel implementation; do not merge directly
89
+- Next action: recover feature-by-feature through focused PRs
90
+
91
+### 2026-08-24T01:34:25Z — Phase 2B ingestion foundation opened
92
+
93
+- Actor: ChatGPT/Codex implementation; repository owner
94
+- Base: `source-data-cleanup@5122fd052ebe0ffe0e07dbb8153a872a4f047355`
95
+- Working branch: `codex/phase-2b-source-registration`
96
+- PR: [#9](https://github.com/davoodmehraban89/Aram/pull/9)
97
+- Head SHA at import: `8b141d793ad2d534fdf7399bb79d101d53ae29af`
98
+- Changed files: 8; exact list available in the PR
99
+- Reported test command: `pytest`
100
+- Reported GitHub Actions: success; direct run URL must be checked during review
101
+- Artifacts: none
102
+- Acceptance: `IN_PROGRESS`; draft, not merged
103
+- Reviewer: pending independent review
104
+- Remaining risk: evidence and diff review incomplete
105
+- Next action: review before any acceptance
docs/handoff/CHATGPT_BOOTSTRAP_PROMPT.txt
new
+111
@@ -0,0 +1,111 @@
1
+پرامپت شروع مجدد پروژه Aram
2
+
3
+این متن را کامل و بدون تغییر به ChatGPT یا Codex جدید بده:
4
+
5
+-------------------------------- BEGIN PROMPT --------------------------------
6
+
7
+You are the successor project manager and independent GitHub reviewer for Davood's private software project, Aram.
8
+
9
+Your immediate task is to restore the project context from GitHub without asking Davood to retell the history.
10
+
11
+Repository:
12
+- Owner: davoodmehraban89
13
+- Name: Aram
14
+- Full name: davoodmehraban89/Aram
15
+- URL: https://github.com/davoodmehraban89/Aram
16
+- Expected canonical branch: source-data-cleanup
17
+
18
+SECURITY RULES
19
+
20
+- Never ask Davood to paste his GitHub password, personal access token, API key, recovery code, or two-factor authentication code into chat.
21
+- Use only the official GitHub connector/plugin or Codex cloud GitHub authorization flow.
22
+- If authorization is required, present or trigger the official Connect/Authorize flow and let Davood complete authentication directly on GitHub.
23
+- Request access only to the repository needed for this task when repository selection is available.
24
+- Do not claim that GitHub was inspected unless an authenticated GitHub tool call actually succeeded.
25
+
26
+STEP 1 — DISCOVER OR CONNECT GITHUB
27
+
28
+1. Check the tools/plugins/connectors available in this chat for GitHub access.
29
+2. If the official GitHub plugin is already installed, invoke it and check whether it is connected.
30
+3. If it is not installed and plugin installation is supported:
31
+ - Open the Plugins directory.
32
+ - Find the official GitHub plugin.
33
+ - Install it.
34
+ - Start or continue in a supported ChatGPT Work/Codex chat as required.
35
+4. If it is installed but disconnected, trigger Connect/Reconnect and ask Davood only to complete the official GitHub authorization screen.
36
+5. For Codex cloud, connect GitHub when prompted, select the repository davoodmehraban89/Aram, and create/select an environment for that repository.
37
+6. Never replace these official authorization steps by collecting credentials in chat.
38
+
39
+Do not stop at a generic statement such as "I cannot access GitHub." First exhaust the GitHub plugin/connector discovery and official connection path available in the current product. If this environment genuinely provides no GitHub integration, state that precise limitation and tell Davood which supported ChatGPT Work/Codex surface must be opened to install/connect the official GitHub plugin.
40
+
41
+STEP 2 — VERIFY REPOSITORY ACCESS
42
+
43
+After connection, make a harmless read-only request:
44
+
45
+1. Fetch repository metadata for davoodmehraban89/Aram.
46
+2. Confirm that authenticated access to the private repository succeeded.
47
+3. Fetch the current default branch and its full head SHA.
48
+4. List open pull requests, especially PR #10 and PR #9.
49
+
50
+If any read request fails, report the exact access/authorization failure. Do not guess repository state.
51
+
52
+STEP 3 — LOCATE THE DURABLE RECOVERY FILES
53
+
54
+Look first on the current default/canonical branch for:
55
+
56
+- docs/handoff/MASTER_RECOVERY_PROMPT.md
57
+- docs/handoff/LATEST_HANDOFF.md
58
+
59
+If they are not yet on the accepted branch, inspect:
60
+
61
+- Pull request: https://github.com/davoodmehraban89/Aram/pull/10
62
+- Branch: codex/project-control-foundation
63
+
64
+Read these files from PR #10's current head branch if the PR is still open and unmerged.
65
+
66
+Also read, from the same authoritative ref:
67
+
68
+- AGENTS.md
69
+- PROJECT_STATUS.md
70
+- docs/PROJECT_LOG.md
71
+- docs/DECISION_LOG.md
72
+- docs/ACCEPTANCE_POLICY.md
73
+- docs/JULES_TASK_TEMPLATE.md
74
+- .github/pull_request_template.md
75
+
76
+STEP 4 — RECONSTRUCT AND VERIFY
77
+
78
+1. Read MASTER_RECOVERY_PROMPT.md first.
79
+2. Read LATEST_HANDOFF.md second.
80
+3. Independently compare every material claim in LATEST_HANDOFF.md with current GitHub evidence:
81
+ - branch and commit SHAs;
82
+ - PR state, base, head, draft/merge status;
83
+ - exact changed files and diff;
84
+ - GitHub Actions/check conclusions and real URLs;
85
+ - tags, releases, and downloadable artifacts;
86
+ - accepted versus unmerged capabilities;
87
+ - canonical financial-data protection.
88
+4. Treat GitHub remote evidence as the source of truth. Never accept an agent's narrative report as evidence.
89
+5. Do not modify code, open a new PR, close a PR, or merge anything during recovery unless Davood explicitly asks after seeing your verification report.
90
+
91
+STEP 5 — FIRST RESPONSE TO DAVOOD
92
+
93
+Respond in Persian with:
94
+
95
+1. GitHub connection status: CONNECTED or BLOCKED.
96
+2. Verified repository/default branch/full SHA.
97
+3. Which ref contained the recovery files: accepted branch or PR #10 branch.
98
+4. A compact table of accepted work, open work, unmerged recovery work, missing V1 requirements, CI/release reality, and blockers.
99
+5. Every discrepancy between LATEST_HANDOFF.md and current GitHub.
100
+6. Exactly one safest next action.
101
+
102
+End with exactly one of:
103
+
104
+HANDOFF VERIFIED — READY TO CONTINUE
105
+HANDOFF REJECTED — GITHUB DISCREPANCIES FOUND
106
+BLOCKED — OFFICIAL GITHUB CONNECTION REQUIRED
107
+
108
+Do not ask Davood to explain the project from the beginning.
109
+
110
+--------------------------------- END PROMPT ---------------------------------
111
+
docs/handoff/LATEST_HANDOFF.md
new
+103
@@ -0,0 +1,103 @@
1
+# Aram — Latest Handoff Prompt
2
+
3
+> Current authoritative handoff snapshot created: 2026-08-24 UTC
4
+> This file supersedes every earlier handoff prompt. After each meaningful project step, replace this file with a newer version. Do not use older versions as the continuation baseline.
5
+
6
+---
7
+
8
+## COPY FROM HERE
9
+
10
+Use the permanent instructions in `ARAM_MASTER_RECOVERY_PROMPT.md`, then verify this current handoff against the private GitHub repository `davoodmehraban89/Aram`.
11
+
12
+### Last independently verified repository state
13
+
14
+- Default/canonical branch: `source-data-cleanup`
15
+- Accepted baseline SHA at the start of the control-documentation work: `5122fd052ebe0ffe0e07dbb8153a872a4f047355`
16
+- Baseline URL: `https://github.com/davoodmehraban89/Aram/commit/5122fd052ebe0ffe0e07dbb8153a872a4f047355`
17
+
18
+### Accepted and merged state
19
+
20
+- Phase 1B-1: merged through PR #1.
21
+- Phase 1B-2 corrections: merged through PR #4.
22
+- Phase 2A backend/data-model foundation: merged through PR #6.
23
+- One-file model refactor: merged through PR #8.
24
+- No accepted, user-ready V1 release has been proven.
25
+
26
+### Work currently requiring attention
27
+
28
+#### PR #10 — project-control foundation
29
+
30
+- URL: `https://github.com/davoodmehraban89/Aram/pull/10`
31
+- State at last verification: OPEN, DRAFT, NOT MERGED
32
+- Base: `source-data-cleanup`
33
+- Verified base SHA: `5122fd052ebe0ffe0e07dbb8153a872a4f047355`
34
+- Head branch: `codex/project-control-foundation`
35
+- Precursor head SHA immediately before this handoff update: `21a31d5dc1c394d268e75fa3bc8e15cd0f5c784c`
36
+- Important: the commit that updates this handoff file necessarily changes the PR head again. Always fetch the current PR head from GitHub; do not treat the embedded precursor SHA as the current head.
37
+- Verified scope: 10 files and 0 deletions. The exact current line count must be fetched because updating this handoff changes it.
38
+- Verified changed files:
39
+ - `.github/pull_request_template.md`
40
+ - `AGENTS.md`
41
+ - `PROJECT_STATUS.md`
42
+ - `docs/ACCEPTANCE_POLICY.md`
43
+ - `docs/DECISION_LOG.md`
44
+ - `docs/JULES_TASK_TEMPLATE.md`
45
+ - `docs/PROJECT_LOG.md`
46
+ - `docs/handoff/CHATGPT_BOOTSTRAP_PROMPT.txt`
47
+ - `docs/handoff/LATEST_HANDOFF.md`
48
+ - `docs/handoff/MASTER_RECOVERY_PROMPT.md`
49
+- Verification: no trailing whitespace and no conflict markers were found.
50
+- Scope: documentation, agent instructions, and PR template only.
51
+- No application code, tests, workflows, XLSX, PDF, ZIP, EXE, database, or financial-data file changed.
52
+- GitHub Actions/check status at last verification: no workflow run and no status checks were attached to the head commit.
53
+- Mergeability at last verification: GitHub reported mergeable, but it was intentionally left Draft and unmerged.
54
+
55
+The ten-file count supersedes the earlier six-file, seven-file, and nine-file reports. `AGENTS.md` was added after confirming from official Jules documentation that Jules reads repository-level instructions. Two durable handoff files were added so recovery remains possible when ChatGPT history is unavailable. A plain-text `CHATGPT_BOOTSTRAP_PROMPT.txt` was then added as the saveable entry point that guides a successor chat through official GitHub connection and evidence recovery.
56
+
57
+#### PR #9 — Phase 2B ingestion foundation
58
+
59
+- URL: `https://github.com/davoodmehraban89/Aram/pull/9`
60
+- Last known state: OPEN, DRAFT, NOT MERGED
61
+- Base: `source-data-cleanup@5122fd052ebe0ffe0e07dbb8153a872a4f047355`
62
+- Last observed head SHA: `8b141d793ad2d534fdf7399bb79d101d53ae29af`
63
+- Claimed scope: source registration, read-only XLSX preflight, and ledger parsing.
64
+- Independent verification confirmed Backend CI run #14 succeeded with the PR head and the exact eight-file scope.
65
+- An independent review comment requested two changes before acceptance: reject same-hash registrations when filename/document type conflicts with the existing record, and integrate the project-control documents after PR #10 becomes the baseline.
66
+- Review comment ID: `5391629767`.
67
+
68
+#### PR #7 — closed prototype/recovery source
69
+
70
+- URL: `https://github.com/davoodmehraban89/Aram/pull/7`
71
+- State: CLOSED, UNMERGED.
72
+- It contains a large parallel prototype including desktop and branch-level ZIP/EXE work.
73
+- It is not an accepted V1 and must not be merged directly.
74
+- Recover useful features only through small, focused PRs based on the accepted branch.
75
+
76
+### Current product boundary
77
+
78
+- Comprehensive financial-statement Mapping Excel import/export is not complete.
79
+- Note and sub-note mapping workflow is not complete.
80
+- Mapping management UI is not complete.
81
+- Official `v1.0.0-pilot` GitHub Release and independently verified downloadable assets have not been proven.
82
+- Branch-level ZIP/EXE existence does not equal an official or tested release.
83
+- A governed Pilot Excel contract named `Aram_Pilot_Input_and_Mapping_Template_v0.1.xlsx` has been created for user testing and future importer implementation. It contains Company, Accounts, Notes, Mapping, Test_Log, Checks, and data-dictionary sheets. It is a data contract, not proof that the current application can import it yet.
84
+- GitHub Issue #11 is the canonical V1 Pilot roadmap: `https://github.com/davoodmehraban89/Aram/issues/11`.
85
+
86
+### Current operating decision
87
+
88
+- Davood has Google AI Pro and therefore uses Jules in Pro. At the time of this handoff, the published Jules in Pro allowance is 100 tasks per rolling 24 hours and 15 concurrent tasks; this is not expected to constrain the project's controlled, sequential workflow.
89
+- Jules is the primary implementation agent under the repository controls in `AGENTS.md` and the acceptance policy.
90
+- ChatGPT/Codex must independently verify the remote branch, commit, diff, CI, and artifacts after each task.
91
+- GitHub Copilot Cloud Agent is not the planned replacement because it requires a paid Copilot plan and may introduce payment/access risk for Davood in Iran.
92
+- If Jules reports completion that is absent or contradictory in GitHub, reject that task and issue one controlled corrective prompt. Escalate the specific task to direct GitHub/Codex implementation only if the corrective attempt also fails.
93
+- The project must never depend on a single chat session or agent memory.
94
+
95
+### Single next action
96
+
97
+PR #10 has been independently reviewed and is approved for merge from a scope/content perspective. Obtain Davood's explicit merge authorization, merge PR #10, record the new accepted baseline SHA, and then issue the focused Jules corrective task for PR #9. Do not begin the Excel importer until the corrected Phase 2B foundation is accepted.
98
+
99
+### Mandatory first response
100
+
101
+Report whether GitHub access succeeded, then compare this handoff with current GitHub evidence. Do not ask Davood to retell the history and do not start new implementation work before the comparison is complete.
102
+
103
+## END COPY
docs/handoff/MASTER_RECOVERY_PROMPT.md
new
+117
@@ -0,0 +1,117 @@
1
+# Aram — Master Recovery Prompt
2
+
3
+این فایل پرامپت دائمی بازیابی پروژه است. متن داخل بخش «COPY FROM HERE» را بدون تغییر به ChatGPT یا عامل جدید بدهید. این فایل ثابت میماند؛ وضعیت روز پروژه در فایل `ARAM_LATEST_HANDOFF_PROMPT.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:
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.
16
+
17
+### Operating model
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.
26
+
27
+### Mandatory access check
28
+
29
+First determine whether you have authenticated read access to the private repository.
30
+
31
+If GitHub access is available:
32
+
33
+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:
36
+ - `AGENTS.md`
37
+ - `PROJECT_STATUS.md`
38
+ - `docs/PROJECT_LOG.md`
39
+ - `docs/DECISION_LOG.md`
40
+ - `docs/ACCEPTANCE_POLICY.md`
41
+ - `docs/JULES_TASK_TEMPLATE.md`
42
+ - `.github/pull_request_template.md`
43
+4. Then read the newest `ARAM_LATEST_HANDOFF_PROMPT.md` supplied by Davood and verify every material claim against GitHub.
44
+
45
+If authenticated GitHub access is NOT available:
46
+
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.
52
+
53
+### Reconstruction procedure
54
+
55
+Produce a concise evidence table containing:
56
+
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;
63
+- release/tag/artifact reality;
64
+- canonical financial-data protection status;
65
+- blockers, risks, and the single next approved action.
66
+
67
+Use only these states:
68
+
69
+- `VERIFIED_AND_MERGED`
70
+- `VERIFIED_BUT_UNMERGED`
71
+- `PRESENT_BUT_UNVERIFIED`
72
+- `CLAIMED_BUT_NOT_PROVEN`
73
+- `NOT_IMPLEMENTED`
74
+- `IN_PROGRESS`
75
+- `BLOCKED`
76
+- `UNVERIFIED_OFFLINE`
77
+
78
+### Known governance decisions that must be verified, not blindly assumed
79
+
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.
83
+- 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.
86
+
87
+### Rules for future work
88
+
89
+Before giving an implementation prompt or changing code:
90
+
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.
99
+
100
+### Required response after takeover
101
+
102
+Do not begin by asking Davood to explain the project. Begin with:
103
+
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.
109
+
110
+End with one of these exact decisions:
111
+
112
+- `HANDOFF VERIFIED — READY TO CONTINUE`
113
+- `HANDOFF REJECTED — GITHUB DISCREPANCIES FOUND`
114
+- `BLOCKED — AUTHENTICATED GITHUB ACCESS OR EXPORTED EVIDENCE REQUIRED`
115
+
116
+## END COPY
117
+