@adamchanadam/agent-handoff-kit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +176 -0
- package/bin/agent-handoff-kit.mjs +675 -0
- package/package.json +28 -0
- package/packs/agent-governance.md +30 -0
- package/packs/coding.md +28 -0
- package/packs/communication.md +28 -0
- package/packs/knowledge.md +31 -0
- package/packs/release.md +28 -0
- package/packs/research.md +28 -0
- package/packs/safety.md +29 -0
- package/packs/writing.md +28 -0
- package/runtime-core/AGENTS.core.md +110 -0
- package/runtime-core/CLAUDE.md +13 -0
- package/runtime-core/DOC_SYNC_REGISTRY.md +23 -0
- package/runtime-core/GEMINI.md +13 -0
- package/runtime-core/PROJECT_INDEX.md +92 -0
- package/runtime-core/RULE_PACKS.md +18 -0
- package/runtime-core/SESSION_HANDOFF.md +148 -0
- package/runtime-core/SESSION_LOG.md +46 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Agent Governance Pack
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
Use for governance rules, prompts, agent instructions, handoff systems, startup/closeout behavior, skills, and rule packs.
|
|
6
|
+
|
|
7
|
+
## Load When
|
|
8
|
+
|
|
9
|
+
- User asks to change AI behavior, project governance, prompts, handoff, startup, closeout, or tool-use rules.
|
|
10
|
+
- A change affects `AGENTS.md`, `dev/*`, rule packs, installer templates, or durable workflow docs.
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
1. Locate the existing source of truth before adding a rule.
|
|
15
|
+
2. Prefer merge, replace, or registry rows over append-only rule growth.
|
|
16
|
+
3. Keep public runtime rules generic; project-specific incidents belong in logs, runbooks, or project index.
|
|
17
|
+
4. Do not let development-only workspace rules enter public runtime.
|
|
18
|
+
5. Check complexity budget before adding default-core behavior.
|
|
19
|
+
6. Before creating durable workflow, runbook, or instruction files, first verify whether `dev/SESSION_HANDOFF.md`, `dev/PROJECT_INDEX.md`, `dev/DOC_SYNC_REGISTRY.md`, or existing rule packs can carry the need without a new file.
|
|
20
|
+
|
|
21
|
+
## Checks
|
|
22
|
+
|
|
23
|
+
- Verify affected files are indexed or intentionally installed templates.
|
|
24
|
+
- Check `dev/DOC_SYNC_REGISTRY.md` for governance, closeout/startup, and README sync rows.
|
|
25
|
+
- Confirm old overlapping wording was retired or marked legacy.
|
|
26
|
+
- Confirm any new durable file is reachable from `dev/PROJECT_INDEX.md` and does not rely only on a one-session handoff note.
|
|
27
|
+
|
|
28
|
+
## Closeout
|
|
29
|
+
|
|
30
|
+
Record the changed rule home, reason, complexity impact, retired wording, and follow-up checks.
|
package/packs/coding.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Coding Pack
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
Use for code changes, tests, builds, package managers, SDKs, CLIs, APIs, or developer tooling.
|
|
6
|
+
|
|
7
|
+
## Load When
|
|
8
|
+
|
|
9
|
+
- User asks to write, edit, debug, refactor, test, build, package, or integrate code.
|
|
10
|
+
- The task depends on framework, runtime, dependency, or API behavior.
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
1. Read `dev/PROJECT_INDEX.md` for stack, commands, entry points, and directory roles before editing.
|
|
15
|
+
2. Inspect relevant source, tests, configs, and docs before changing code.
|
|
16
|
+
3. Prefer project-local patterns and helpers over new abstractions.
|
|
17
|
+
4. Do not guess current SDK, CLI, package, API, or deployment behavior when docs or project files can verify it.
|
|
18
|
+
5. Preserve unrelated user changes.
|
|
19
|
+
|
|
20
|
+
## Checks
|
|
21
|
+
|
|
22
|
+
- Run the narrowest relevant test, build, lint, or typecheck available.
|
|
23
|
+
- If a check cannot run, record why and what remains unverified.
|
|
24
|
+
- Check `dev/DOC_SYNC_REGISTRY.md` if behavior, commands, public docs, or runbooks changed.
|
|
25
|
+
|
|
26
|
+
## Closeout
|
|
27
|
+
|
|
28
|
+
Record files changed, commands run, results, remaining risks, and any project index or doc sync updates.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Communication Pack
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
Use for reply format, language behavior, output schema, user-facing explanation, and cross-agent handoff wording.
|
|
6
|
+
|
|
7
|
+
## Load When
|
|
8
|
+
|
|
9
|
+
- User requests a specific response format, language, style, report, review, or schema.
|
|
10
|
+
- The task changes public-facing instructions or AI-facing reply discipline.
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
1. Match the user's language unless a project file requires another language.
|
|
15
|
+
2. Lead with decisions, findings, or results before background.
|
|
16
|
+
3. Mark assumptions and unverified facts.
|
|
17
|
+
4. Keep operational instructions copy-paste-ready when they are meant for future sessions.
|
|
18
|
+
5. Avoid exposing internal process unless it helps the user act.
|
|
19
|
+
|
|
20
|
+
## Checks
|
|
21
|
+
|
|
22
|
+
- Verify required headings, schema fields, or language split.
|
|
23
|
+
- Check public README or docs if user-facing behavior changed.
|
|
24
|
+
- Confirm handoff/opening messages are complete and root-specific when needed.
|
|
25
|
+
|
|
26
|
+
## Closeout
|
|
27
|
+
|
|
28
|
+
Record any durable response-format decisions and where they were persisted.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Knowledge Pack
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
Use for external notes, knowledge bases, Notion, Obsidian, Drive, docs repositories, and source-of-truth mapping.
|
|
6
|
+
|
|
7
|
+
## Load When
|
|
8
|
+
|
|
9
|
+
- User references external knowledge tools or asks to sync project knowledge outside local files.
|
|
10
|
+
- Project truth may be split between local markdown and an external system.
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
1. Determine whether the external surface is source of truth, mirror, index, or attachment store.
|
|
15
|
+
2. Record access mode and sync expectation before relying on external content.
|
|
16
|
+
3. Prefer local durable files for installable runtime text unless the project declares otherwise.
|
|
17
|
+
4. Do not perform destructive external writes without explicit confirmation.
|
|
18
|
+
5. If direct access is unavailable, produce a ready-to-paste sync packet and mark status pending.
|
|
19
|
+
6. When writing to an external mirror or index, read back the written record before claiming sync success.
|
|
20
|
+
7. Preserve local file paths as plain text, code, or structured rich text fields when the external tool parses Markdown links or escape characters.
|
|
21
|
+
|
|
22
|
+
## Checks
|
|
23
|
+
|
|
24
|
+
- Verify external source identity, timestamp, and scope.
|
|
25
|
+
- Check `dev/DOC_SYNC_REGISTRY.md` for required sync targets and status vocabulary.
|
|
26
|
+
- Record conflicts between local and external content.
|
|
27
|
+
- Mark unread relevant sources as unread, pending, or blocked. Do not treat unread sources as absent.
|
|
28
|
+
|
|
29
|
+
## Closeout
|
|
30
|
+
|
|
31
|
+
Record external sync status, pending paste/manual steps, unresolved conflicts, and next verification point.
|
package/packs/release.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Release Pack
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
Use for release, publish, deploy, tag, version bump, hotfix, or GA completion claims.
|
|
6
|
+
|
|
7
|
+
## Load When
|
|
8
|
+
|
|
9
|
+
- User asks to publish, deploy, tag, release, upload, announce, or mark work as production-ready.
|
|
10
|
+
- A task changes package metadata, changelog, release notes, or distribution artifacts.
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
1. Treat release claims as evidence-bound.
|
|
15
|
+
2. Verify version, target branch, commit, artifacts, release notes, and public docs before claiming completion.
|
|
16
|
+
3. Do not publish, deploy, tag, or upload without explicit user approval.
|
|
17
|
+
4. Keep rollback or recovery notes when release risk is non-trivial.
|
|
18
|
+
5. Preserve migration and upgrade safety for existing users.
|
|
19
|
+
|
|
20
|
+
## Checks
|
|
21
|
+
|
|
22
|
+
- Run build/test/package checks required by `dev/PROJECT_INDEX.md`.
|
|
23
|
+
- Check README, changelog, migration notes, and `dev/DOC_SYNC_REGISTRY.md`.
|
|
24
|
+
- Record exact command results or blockers.
|
|
25
|
+
|
|
26
|
+
## Closeout
|
|
27
|
+
|
|
28
|
+
Record release status, version, commit, artifacts, verification evidence, blocked items, and post-release follow-up.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Research Pack
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
Use for source gathering, evidence comparison, fact synthesis, recommendations, and uncertainty handling.
|
|
6
|
+
|
|
7
|
+
## Load When
|
|
8
|
+
|
|
9
|
+
- User asks for current facts, comparisons, recommendations, source-backed conclusions, or external evidence.
|
|
10
|
+
- The topic may have changed recently or needs precise attribution.
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
1. Prefer primary sources, official docs, papers, standards, or direct data when available.
|
|
15
|
+
2. Separate verified facts, source summaries, and inference.
|
|
16
|
+
3. Record dates for time-sensitive facts.
|
|
17
|
+
4. Do not overstate confidence when sources conflict or coverage is thin.
|
|
18
|
+
5. Keep source quotes short and cite where evidence came from.
|
|
19
|
+
|
|
20
|
+
## Checks
|
|
21
|
+
|
|
22
|
+
- Confirm source relevance, date, and authority.
|
|
23
|
+
- Cross-check important claims with more than one source when practical.
|
|
24
|
+
- Record open questions or unverified claims.
|
|
25
|
+
|
|
26
|
+
## Closeout
|
|
27
|
+
|
|
28
|
+
Record sources used, conclusions, uncertainty, and any facts that should be persisted into project files.
|
package/packs/safety.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Safety Pack
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
Use for file operations, shell commands, Git changes, package managers, installers, deploy tools, release tools, cloud tools, external APIs, locked files, permission errors, sandbox restrictions, or any task that could affect data loss, credentials, public release state, or external systems.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
1. Before deleting, overwriting, moving, renaming, cleaning, resetting, publishing, or running destructive tool operations, list the exact target paths, expected scope, impact, and required confirmation.
|
|
10
|
+
2. Preserve user-provided source files by default. Create renamed outputs instead of in-place overwrites unless overwrite is explicitly requested.
|
|
11
|
+
3. Never operate on a filesystem root, drive root, home directory root, repository parent root, system directory, or ambiguous path.
|
|
12
|
+
4. Do not bypass permissions, file locks, sandbox limits, failed safety checks, or denied operations. Report the blocker and manual action needed.
|
|
13
|
+
5. Do not run recursive or bulk destructive commands such as `rm -rf`, `Remove-Item -Recurse -Force`, `git clean -fdx`, or equivalent cleanup operations unless the user explicitly requested the operation and resolved absolute targets are verified.
|
|
14
|
+
6. On Windows, do not use `cmd /c rmdir`, `cmd /c rd`, or any `cmd.exe /c` variant combined with `rmdir` or `rd`. Prefer native PowerShell cmdlets when PowerShell is active, and do not compose filesystem modification commands across shells.
|
|
15
|
+
7. On macOS / Linux, do not run `rm -rf`, `sudo rm`, recursive `chmod`, recursive `chown`, or destructive wildcard operations unless the user explicitly requested the operation and target paths are listed and verified.
|
|
16
|
+
8. Do not run `git reset --hard`, branch deletion, tag deletion, force push, or history rewrite unless the user explicitly requested it and affected refs/files are listed.
|
|
17
|
+
9. Before staging or committing, inspect current status and avoid staging unrelated parent-repo, sibling-directory, generated, credential, or user-owned changes.
|
|
18
|
+
10. Before using external APIs, SDKs, CLIs, package managers, deploy tools, cloud tools, or release tools, verify current official documentation or project-local runbooks. If verification is blocked, mark the result unverified instead of guessing.
|
|
19
|
+
11. Do not print, copy, log, commit, upload, or generate files containing secret values. Use redacted placeholders or line references.
|
|
20
|
+
|
|
21
|
+
## Checks
|
|
22
|
+
|
|
23
|
+
- Report which safety-relevant command, path, API, install, deploy, release, or Git check was performed and the result.
|
|
24
|
+
- If checks cannot run, state the reason and mark the result unverified.
|
|
25
|
+
- For durable governance changes, update the project index, sync registry, and any human review map if they exist.
|
|
26
|
+
|
|
27
|
+
## Closeout
|
|
28
|
+
|
|
29
|
+
Record unresolved safety risks, blocked verification, pending manual actions, dirty worktrees, or external sync gaps in `dev/SESSION_HANDOFF.md`.
|
package/packs/writing.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Writing Pack
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
Use for drafting, editing, style, structure, publication copy, documentation prose, and tone control.
|
|
6
|
+
|
|
7
|
+
## Load When
|
|
8
|
+
|
|
9
|
+
- User asks to write, rewrite, summarize, translate, or edit text.
|
|
10
|
+
- The task has a target audience, voice, format, or publication surface.
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
|
|
14
|
+
1. Identify audience, purpose, and target surface before rewriting.
|
|
15
|
+
2. Preserve factual meaning unless the user asks for content changes.
|
|
16
|
+
3. Keep terminology consistent with project docs.
|
|
17
|
+
4. Mark uncertain claims instead of inventing support.
|
|
18
|
+
5. Do not bury durable requirements only in prose; use project index, spec, runbook, or handoff when needed.
|
|
19
|
+
|
|
20
|
+
## Checks
|
|
21
|
+
|
|
22
|
+
- Verify requested format, language, and tone.
|
|
23
|
+
- Check links, commands, names, and version-sensitive claims when relevant.
|
|
24
|
+
- Check `dev/DOC_SYNC_REGISTRY.md` if public docs or user-facing instructions changed.
|
|
25
|
+
|
|
26
|
+
## Closeout
|
|
27
|
+
|
|
28
|
+
Record changed documents, unresolved content questions, and any sync or follow-up needed.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Agent Handoff Kit Core Runtime
|
|
2
|
+
|
|
3
|
+
This is the lightweight core. It is the always-read contract for AI sessions.
|
|
4
|
+
|
|
5
|
+
## 1. Startup Reads
|
|
6
|
+
|
|
7
|
+
After this core is loaded, read in order:
|
|
8
|
+
|
|
9
|
+
1. `dev/SESSION_HANDOFF.md`
|
|
10
|
+
2. the latest entry in `dev/SESSION_LOG.md`
|
|
11
|
+
3. `dev/PROJECT_INDEX.md`
|
|
12
|
+
4. `dev/RULE_PACKS.md`
|
|
13
|
+
|
|
14
|
+
Then classify the user's task and read only the required rule pack(s). State which pack(s) you loaded and why, using plain language so the user understands the working mode without needing to know pack names.
|
|
15
|
+
|
|
16
|
+
If the user did not paste the previous opening message but the current project root is clear, read `AGENTS.md` first as fallback entry, then use this read order. If the root is unclear or mismatched, stop and ask for the intended project root before reading or editing project state.
|
|
17
|
+
|
|
18
|
+
If a required file is missing, create the smallest useful version only after confirming the target project root.
|
|
19
|
+
|
|
20
|
+
Before acting on a non-trivial task, identify required local source-of-truth files and external sources from the handoff, project index, user request, and sync registry. Read them or mark them blocked. Reachable is not the same as ingested. Do not treat unread sources as absent.
|
|
21
|
+
|
|
22
|
+
After startup reads are complete, show a short startup card:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
/\_/\ Agent Handoff Kit v<version>
|
|
26
|
+
( o.o ) continuity ready
|
|
27
|
+
> ^ <
|
|
28
|
+
|
|
29
|
+
🔎 Handoff: loaded
|
|
30
|
+
📌 Objective: <current objective>
|
|
31
|
+
⚠️ Boundary: <important boundary or none>
|
|
32
|
+
🚀 Next: <next action>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Keep the card short. Use the full product name, not an abbreviation. If the installed template or CLI version is unknown, write `version unverified` instead of guessing.
|
|
36
|
+
|
|
37
|
+
## 2. Work Loop
|
|
38
|
+
|
|
39
|
+
Use this loop for every task:
|
|
40
|
+
|
|
41
|
+
1. PLAN: restate the user's intent, scope, risk, and acceptance criteria.
|
|
42
|
+
2. READ: inspect relevant files from `PROJECT_INDEX.md` and search for related definitions before editing.
|
|
43
|
+
3. CHANGE: make focused changes only.
|
|
44
|
+
4. QC: run available checks or state why they cannot run.
|
|
45
|
+
5. PERSIST: update handoff/log and any affected project index or sync registry.
|
|
46
|
+
|
|
47
|
+
For high-risk work, pause after PLAN. High-risk means destructive operations, ambiguous target, external systems, release/publish, or broad multi-file change.
|
|
48
|
+
|
|
49
|
+
## 3. Safety Boundaries
|
|
50
|
+
|
|
51
|
+
Do not delete, reset, overwrite, bulk-move, or publish without explicit user approval.
|
|
52
|
+
|
|
53
|
+
Do not guess commands, APIs, SDK behavior, deployment steps, or file ownership when project docs or official docs are needed. Mark unverified facts as unverified.
|
|
54
|
+
|
|
55
|
+
Do not modify unrelated files. If unexpected user changes appear, work with them or ask before touching them.
|
|
56
|
+
|
|
57
|
+
Do not claim completion without evidence from checks, inspection, or a clear explanation of what could not be verified.
|
|
58
|
+
|
|
59
|
+
## 4. Closeout And Handoff
|
|
60
|
+
|
|
61
|
+
Detect end-of-session or handoff intent in natural language, such as "收工", "wrap up", or "handoff". If intent is ambiguous, ask one concise confirmation question.
|
|
62
|
+
|
|
63
|
+
At full closeout:
|
|
64
|
+
|
|
65
|
+
1. Reconcile `dev/SESSION_HANDOFF.md`. Do not append a new state snapshot under old state. Verify `Durable Anchors`, then rewrite or explicitly confirm every section under `Closeout-Reconciled State`.
|
|
66
|
+
2. Add a concise entry to `dev/SESSION_LOG.md` with work actually completed this session and the exact next-session opening message.
|
|
67
|
+
3. Update `dev/PROJECT_INDEX.md` if files, stack, commands, entry points, workspace identity, or durable document map changed.
|
|
68
|
+
4. Check `dev/DOC_SYNC_REGISTRY.md` and record required sync status.
|
|
69
|
+
5. Record unresolved drift risk, active worktree, parallel workspace, uncommitted changes, or blocked verification.
|
|
70
|
+
6. Complete the `State Reconciliation Check`: it must state when reconciliation happened, which state sections were rewritten or confirmed current, whether stale snapshots remain, and whether the opening message matches current state.
|
|
71
|
+
7. Run the handoff sufficiency check: the next AI should be able to continue from `AGENTS.md`, `dev/SESSION_HANDOFF.md`, `dev/PROJECT_INDEX.md`, and needed rule packs without searching old log history.
|
|
72
|
+
8. If either check fails, fix `dev/SESSION_HANDOFF.md` first; do not push current-state responsibility into `dev/SESSION_LOG.md`.
|
|
73
|
+
9. Show a short closeout card, then provide a copy-paste-ready next-session opening message inside a fenced `text` code block, so the user can clearly copy and paste it into the next session.
|
|
74
|
+
|
|
75
|
+
Installed handoff templates use English headings by default for cross-tool stability, but project teams may translate `dev/SESSION_HANDOFF.md` section headings and visible field labels into the project's working language. Keep the `ack:section:*` and `ack:field:*` semantic markers intact; `doctor` validates those markers so localized handoff notes remain supported.
|
|
76
|
+
|
|
77
|
+
Use this closeout card:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
/\_/\ Agent Handoff Kit v<version>
|
|
81
|
+
( -.- ) handoff saved
|
|
82
|
+
> ^ <
|
|
83
|
+
|
|
84
|
+
✅ Done: <completed summary>
|
|
85
|
+
🔎 QC: <validation summary>
|
|
86
|
+
📌 Handoff: opening message ready
|
|
87
|
+
⚠️ Boundary: <important boundary or none>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Immediately before the fenced opening message, write:
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
📋 Next session: copy and paste the whole block below
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Record only work actually performed in the current session. Do not copy old completed work forward as new work.
|
|
97
|
+
`dev/SESSION_HANDOFF.md` carries continuity. `dev/SESSION_LOG.md` carries recent evidence. Archive old detail only when needed; do not create an archive directory by default.
|
|
98
|
+
Do not declare handoff ready if `dev/SESSION_HANDOFF.md` still contains stale state, unreconciled placeholders in current-state sections, or an opening message that no longer matches the reconciled state.
|
|
99
|
+
|
|
100
|
+
## 5. Pack Loading
|
|
101
|
+
|
|
102
|
+
Use `dev/RULE_PACKS.md` to decide which pack to read.
|
|
103
|
+
|
|
104
|
+
A pack may add task-specific requirements. A pack cannot weaken core safety. If two packs conflict, choose the safer and more verifiable path, then record the conflict in closeout.
|
|
105
|
+
|
|
106
|
+
After the task, persist durable facts into handoff/log/index/registry. Do not assume the next session remembers pack context unless it is recorded.
|
|
107
|
+
|
|
108
|
+
## Core Complexity Rule
|
|
109
|
+
|
|
110
|
+
New default-core rules are allowed only when they apply to most sessions, protect safety or continuity, cannot live in a pack or registry, and keep the core within budget.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Claude Entry Bridge
|
|
2
|
+
|
|
3
|
+
This file exists so Claude Code can find the Agent Handoff Kit startup path.
|
|
4
|
+
|
|
5
|
+
Authoritative operating rules remain in `AGENTS.md`. Do not duplicate or fork the rules here.
|
|
6
|
+
|
|
7
|
+
At session startup:
|
|
8
|
+
|
|
9
|
+
1. Confirm the current root is the intended project root.
|
|
10
|
+
2. Read `AGENTS.md`.
|
|
11
|
+
3. Follow the startup read order in `AGENTS.md`.
|
|
12
|
+
|
|
13
|
+
If the current root does not match the intended project root, stop and ask the user to confirm the workspace before reading or editing project state.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Doc Sync Registry
|
|
2
|
+
|
|
3
|
+
Purpose: map change types to documents and checks. Keep this as rows, not long prose.
|
|
4
|
+
|
|
5
|
+
## Status Vocabulary
|
|
6
|
+
|
|
7
|
+
Use: `confirmed`, `unverified`, `pending`, `blocked`, `not_applicable`.
|
|
8
|
+
|
|
9
|
+
| Change type | Also check/update | Verification |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| New file or directory | `dev/PROJECT_INDEX.md` Directory Map | path listed |
|
|
12
|
+
| Stack or command change | `dev/PROJECT_INDEX.md` Stack / Entry Points | command verified or marked unverified |
|
|
13
|
+
| Public behavior change | README, public docs, changelog | docs mention current behavior |
|
|
14
|
+
| API or SDK behavior change | API docs, examples, tests | tests or documented reason |
|
|
15
|
+
| Runbook change | runbook path in `PROJECT_INDEX.md` | procedure still executable |
|
|
16
|
+
| Governance rule change | relevant pack/core, registry, README if public-facing | complexity budget checked |
|
|
17
|
+
| Closeout/startup contract change | `AGENTS.md`, `dev/SESSION_HANDOFF.md`, `dev/SESSION_LOG.md`, `dev/PROJECT_INDEX.md`, README quick usage | opening message schema + workspace identity present |
|
|
18
|
+
| Workspace identity change | `dev/SESSION_HANDOFF.md`, `dev/PROJECT_INDEX.md` | root/branch/commit/status recorded or marked unverified |
|
|
19
|
+
| Release | release notes, README version, changelog | release pack checklist |
|
|
20
|
+
|
|
21
|
+
## Registry Rule
|
|
22
|
+
|
|
23
|
+
If a change has no matching row, add a row before closeout or record why no durable sync rule is needed. At closeout, record sync status for every row touched by the session.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Gemini Entry Bridge
|
|
2
|
+
|
|
3
|
+
This file exists so Gemini CLI can find the Agent Handoff Kit startup path.
|
|
4
|
+
|
|
5
|
+
Authoritative operating rules remain in `AGENTS.md`. Do not duplicate or fork the rules here.
|
|
6
|
+
|
|
7
|
+
At session startup:
|
|
8
|
+
|
|
9
|
+
1. Confirm the current root is the intended project root.
|
|
10
|
+
2. Read `AGENTS.md`.
|
|
11
|
+
3. Follow the startup read order in `AGENTS.md`.
|
|
12
|
+
|
|
13
|
+
If the current root does not match the intended project root, stop and ask the user to confirm the workspace before reading or editing project state.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Project Index
|
|
2
|
+
|
|
3
|
+
Purpose: give a stateless AI a compact map of the project before it reads or edits files.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
| Field | Value | Last verified |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Agent Handoff Kit template version | 0.1.0 | package prototype |
|
|
10
|
+
| Runtime | TBD | TBD |
|
|
11
|
+
| Framework | TBD | TBD |
|
|
12
|
+
| Package manager | TBD | TBD |
|
|
13
|
+
| Test command | TBD | TBD |
|
|
14
|
+
| Build command | TBD | TBD |
|
|
15
|
+
| Deploy command | TBD | TBD |
|
|
16
|
+
|
|
17
|
+
## Directory Map
|
|
18
|
+
|
|
19
|
+
| Path | Role | Read when |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `AGENTS.md` | primary Agent Handoff Kit entry and startup contract | session startup |
|
|
22
|
+
| `CLAUDE.md` | Claude Code bridge to the same startup path | Claude Code startup |
|
|
23
|
+
| `GEMINI.md` | Gemini CLI bridge to the same startup path | Gemini CLI startup |
|
|
24
|
+
| `src/` | application source | coding task |
|
|
25
|
+
| `tests/` | tests | coding/QC |
|
|
26
|
+
| `docs/` | user or product docs | doc/public behavior change |
|
|
27
|
+
| `dev/` | governance state | startup/closeout |
|
|
28
|
+
| `TBD` | local source-of-truth files | before tasks that depend on project facts |
|
|
29
|
+
| `TBD` | external-source indexes or mirrors | before research, writing, or knowledge-sync tasks |
|
|
30
|
+
|
|
31
|
+
## Entry Points
|
|
32
|
+
|
|
33
|
+
| Entry | Path | Notes |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| App entry | TBD | TBD |
|
|
36
|
+
| Main config | TBD | TBD |
|
|
37
|
+
| Test suite | TBD | TBD |
|
|
38
|
+
| Runbook | TBD | TBD |
|
|
39
|
+
| Public docs | TBD | TBD |
|
|
40
|
+
|
|
41
|
+
## Fact Base
|
|
42
|
+
|
|
43
|
+
Reachable means the source can be found. It does not mean the source has been read in this session.
|
|
44
|
+
|
|
45
|
+
| Source | Role | Required before | Access method | Last verified |
|
|
46
|
+
|---|---|---|---|---|
|
|
47
|
+
| TBD | local source of truth / reference / draft / archive | TBD | path or instruction | TBD |
|
|
48
|
+
|
|
49
|
+
## External Sources
|
|
50
|
+
|
|
51
|
+
| Source | Role | Required before | Access method | Write-back rule | Last verified |
|
|
52
|
+
|---|---|---|---|---|---|
|
|
53
|
+
| TBD | source of truth / mirror / index / attachment store | TBD | URL, connector, or manual packet | read-back required / manual only / no write | TBD |
|
|
54
|
+
|
|
55
|
+
## Local QC Commands
|
|
56
|
+
|
|
57
|
+
| Check | Command | Run before | Last verified |
|
|
58
|
+
|---|---|---|---|
|
|
59
|
+
| Agent Handoff Kit doctor | TBD | closeout / governance changes | TBD |
|
|
60
|
+
| Project governance check | TBD | closeout / durable file changes | TBD |
|
|
61
|
+
|
|
62
|
+
## Workspace Identity
|
|
63
|
+
|
|
64
|
+
Record this at closeout so the next AI can detect wrong-root or workspace drift.
|
|
65
|
+
|
|
66
|
+
| Field | Value | Last verified |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| Expected project root | TBD | TBD |
|
|
69
|
+
| Git root | TBD | TBD |
|
|
70
|
+
| Branch / commit | TBD | TBD |
|
|
71
|
+
| Worktree or parallel workspace | TBD | TBD |
|
|
72
|
+
| Uncommitted change summary | TBD | TBD |
|
|
73
|
+
|
|
74
|
+
## Change Hotspots
|
|
75
|
+
|
|
76
|
+
| Change type | Likely files | Required checks |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| API behavior | TBD | tests + docs sync |
|
|
79
|
+
| UI behavior | TBD | build + visual/manual check |
|
|
80
|
+
| Data model | TBD | migration/checks |
|
|
81
|
+
| Governance behavior | `AGENTS.md`, `dev/*` | doc sync registry |
|
|
82
|
+
| Closeout/startup contract | `AGENTS.md`, `dev/SESSION_HANDOFF.md`, `dev/SESSION_LOG.md`, `dev/PROJECT_INDEX.md` | opening message present + workspace identity current |
|
|
83
|
+
|
|
84
|
+
## External Services
|
|
85
|
+
|
|
86
|
+
| Service | Scope | Verification source | Last verified |
|
|
87
|
+
|---|---|---|---|
|
|
88
|
+
| TBD | TBD | TBD | TBD |
|
|
89
|
+
|
|
90
|
+
## Maintenance Rule
|
|
91
|
+
|
|
92
|
+
Update this file when stack, commands, directory roles, entry points, external services, workspace identity, durable runbooks, or governance file map changes.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Rule Packs Router
|
|
2
|
+
|
|
3
|
+
Read only the packs needed for the current task.
|
|
4
|
+
|
|
5
|
+
| Task signal | Pack | Purpose |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| Destructive file operations, shell writes, Git state changes, package managers, installers, deploy, release, cloud tools, external APIs, credentials, locked files, permission errors | `dev/rules/safety.md` | safety checks for data loss, external systems, secrets, and high-risk operations |
|
|
8
|
+
| Code, tests, build, package manager, SDK, CLI, API | `dev/rules/coding.md` | development workflow and verification |
|
|
9
|
+
| Draft, edit, style, publication content | `dev/rules/writing.md` | writing workflow and tone control |
|
|
10
|
+
| Sources, evidence, comparison, fact finding | `dev/rules/research.md` | source handling and uncertainty |
|
|
11
|
+
| Governance, prompts, agents, handoff, startup/closeout, skills | `dev/rules/agent-governance.md` | governance changes and boundary control |
|
|
12
|
+
| Release, publish, deploy, tag, hotfix, GA | `dev/rules/release.md` | release verification and evidence |
|
|
13
|
+
| External notes, knowledge base, Notion, Obsidian, Drive | `dev/rules/knowledge.md` | external knowledge source integration |
|
|
14
|
+
| Reply format, language, output schema | `dev/rules/communication.md` | user-facing response rules |
|
|
15
|
+
|
|
16
|
+
## Routing Rule
|
|
17
|
+
|
|
18
|
+
Load the minimum set. If uncertain, load the narrower pack first. If a task clearly involves safety risk plus another domain, load `dev/rules/safety.md` with the relevant domain pack and state why. Packs can add stricter rules, but cannot weaken core safety or closeout requirements.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Session Handoff
|
|
2
|
+
|
|
3
|
+
Last Updated: TBD
|
|
4
|
+
|
|
5
|
+
<!-- ack:section:durable-anchors -->
|
|
6
|
+
## Durable Anchors
|
|
7
|
+
|
|
8
|
+
Stable facts that should survive across sessions. Update only when they change, but verify they still match reality at closeout.
|
|
9
|
+
|
|
10
|
+
1. Project root and boundary: TBD
|
|
11
|
+
2. Product/system identity: TBD
|
|
12
|
+
3. Governance model: TBD
|
|
13
|
+
4. Source-of-truth ownership: TBD
|
|
14
|
+
5. Release / publish boundary: TBD
|
|
15
|
+
|
|
16
|
+
<!-- ack:section:closeout-reconciled-state -->
|
|
17
|
+
## Closeout-Reconciled State
|
|
18
|
+
|
|
19
|
+
This is the current-state area. At every full closeout, rewrite or explicitly confirm every section below. Do not append a new state snapshot under an old one.
|
|
20
|
+
|
|
21
|
+
<!-- ack:section:current-baseline -->
|
|
22
|
+
## Current Baseline
|
|
23
|
+
|
|
24
|
+
1. Project root: TBD
|
|
25
|
+
2. Product/system state: TBD
|
|
26
|
+
3. Governance state: TBD
|
|
27
|
+
4. Source-of-truth notes: TBD
|
|
28
|
+
|
|
29
|
+
<!-- ack:section:task-understanding-summary -->
|
|
30
|
+
## Task Understanding Summary
|
|
31
|
+
|
|
32
|
+
<!-- ack:field:user-intent -->
|
|
33
|
+
- User intent: TBD
|
|
34
|
+
<!-- ack:field:task-essence -->
|
|
35
|
+
- Task essence: TBD
|
|
36
|
+
- User value: TBD
|
|
37
|
+
<!-- ack:field:success-criteria -->
|
|
38
|
+
- Success criteria: TBD
|
|
39
|
+
- Key background already read: TBD
|
|
40
|
+
- Background still unread or blocked: TBD
|
|
41
|
+
- Non-goals / boundaries: TBD
|
|
42
|
+
|
|
43
|
+
<!-- ack:section:active-objective -->
|
|
44
|
+
## Active Objective
|
|
45
|
+
|
|
46
|
+
TBD
|
|
47
|
+
|
|
48
|
+
<!-- ack:section:completed-this-session -->
|
|
49
|
+
## Completed This Session
|
|
50
|
+
|
|
51
|
+
Record only work actually completed in the current session.
|
|
52
|
+
|
|
53
|
+
1. TBD
|
|
54
|
+
|
|
55
|
+
<!-- ack:section:next-priorities -->
|
|
56
|
+
## Next Priorities
|
|
57
|
+
|
|
58
|
+
1. TBD
|
|
59
|
+
|
|
60
|
+
<!-- ack:section:next-task-required-reading -->
|
|
61
|
+
## Next Task Required Reading
|
|
62
|
+
|
|
63
|
+
Before acting on the next task, read or mark blocked:
|
|
64
|
+
|
|
65
|
+
| Source | Why required | Status |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| TBD | TBD | pending |
|
|
68
|
+
|
|
69
|
+
<!-- ack:section:risks-blockers -->
|
|
70
|
+
## Risks / Blockers
|
|
71
|
+
|
|
72
|
+
1. TBD
|
|
73
|
+
|
|
74
|
+
<!-- ack:section:validation-qc -->
|
|
75
|
+
## Validation / QC
|
|
76
|
+
|
|
77
|
+
- Checks run this session: TBD
|
|
78
|
+
- Checks not run and why: TBD
|
|
79
|
+
- Handoff evidence location: TBD
|
|
80
|
+
|
|
81
|
+
<!-- ack:section:workspace-identity -->
|
|
82
|
+
## Workspace Identity
|
|
83
|
+
|
|
84
|
+
Expected project root: TBD
|
|
85
|
+
Git root: TBD
|
|
86
|
+
Branch: TBD
|
|
87
|
+
Commit: TBD
|
|
88
|
+
Worktree / parallel workspace status: TBD
|
|
89
|
+
Uncommitted changes summary: TBD
|
|
90
|
+
|
|
91
|
+
<!-- ack:section:sync-status -->
|
|
92
|
+
## Sync Status
|
|
93
|
+
|
|
94
|
+
Use statuses from `dev/DOC_SYNC_REGISTRY.md`: `confirmed`, `unverified`, `pending`, `blocked`, `not_applicable`.
|
|
95
|
+
|
|
96
|
+
- Project index: TBD
|
|
97
|
+
- Doc sync registry: TBD
|
|
98
|
+
- Public docs / README: TBD
|
|
99
|
+
- External knowledge tools: TBD
|
|
100
|
+
|
|
101
|
+
<!-- ack:section:state-reconciliation-check -->
|
|
102
|
+
## State Reconciliation Check
|
|
103
|
+
|
|
104
|
+
At full closeout, complete this check after updating the state sections above.
|
|
105
|
+
|
|
106
|
+
- Reconciled at: TBD
|
|
107
|
+
<!-- ack:field:state-sections-rewritten-or-confirmed -->
|
|
108
|
+
- State sections rewritten or confirmed current: TBD
|
|
109
|
+
<!-- ack:field:stale-snapshots-left -->
|
|
110
|
+
- Stale snapshots left in this handoff: TBD
|
|
111
|
+
<!-- ack:field:opening-message-matches-current-state -->
|
|
112
|
+
- Opening message matches current state: TBD
|
|
113
|
+
<!-- ack:field:next-ai-can-continue -->
|
|
114
|
+
- Next AI can continue from `AGENTS.md`, this handoff, `dev/PROJECT_INDEX.md`, and needed rule packs without searching old log history: TBD
|
|
115
|
+
|
|
116
|
+
If any answer is no, blocked, or uncertain, fix this handoff before declaring handoff ready.
|
|
117
|
+
|
|
118
|
+
<!-- ack:section:handoff-sufficiency-check -->
|
|
119
|
+
## Handoff Sufficiency Check
|
|
120
|
+
|
|
121
|
+
Can the next AI continue from `AGENTS.md`, this handoff, `dev/PROJECT_INDEX.md`, and needed rule packs without searching old log history?
|
|
122
|
+
|
|
123
|
+
Answer: TBD
|
|
124
|
+
If no, update this handoff before closeout.
|
|
125
|
+
|
|
126
|
+
Continuity rule: this file carries current state and next action. `dev/SESSION_LOG.md` carries recent evidence only. Archive old detail only when needed; do not create an archive directory by default.
|
|
127
|
+
|
|
128
|
+
<!-- ack:section:next-session-opening-message -->
|
|
129
|
+
## Next Session Opening Message
|
|
130
|
+
|
|
131
|
+
📋 Next session: copy and paste the whole block below
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
Work in <absolute project root>.
|
|
135
|
+
|
|
136
|
+
Read in order:
|
|
137
|
+
1. AGENTS.md
|
|
138
|
+
2. dev/SESSION_HANDOFF.md
|
|
139
|
+
3. dev/SESSION_LOG.md
|
|
140
|
+
4. dev/PROJECT_INDEX.md
|
|
141
|
+
5. dev/RULE_PACKS.md
|
|
142
|
+
|
|
143
|
+
Read dev/DOC_SYNC_REGISTRY.md before file changes or closeout.
|
|
144
|
+
|
|
145
|
+
If this root does not match the expected project root, stop and ask for confirmation.
|
|
146
|
+
|
|
147
|
+
After reading, summarize current objective, task understanding, confirmed decisions, pending work, risks, and the next recommended action.
|
|
148
|
+
```
|