docs(adr): design Inkspan-based LLM email writing guidance - #1322
docs(adr): design Inkspan-based LLM email writing guidance#1322seonghobae wants to merge 27 commits into
Conversation
📝 WalkthroughWalkthroughThe PR updates ADR governance and documents a proposed Inkspan-based LLM email guidance workflow. It adds design, implementation, calibration, security, verification, release, rollback, and documentation requirements. It does not add product implementation. ChangesEmail writing guidance
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: 🟡 Moderate · up to The PR is documentation-only, but it currently defines conflicting criterion identifiers and incomplete publication-policy fields, including evaluation states, publish decisions, and required calibration metadata. Implementing the design as written could make guidance admission and publication behave inconsistently across components, so the design is not merge-ready until these contracts are aligned. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
PR governance metadata gate update for PR governance metadata gate is waiting on current-head requirements; see the latest check for pending reasons. |
|
@coderabbitai review Please review exact head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== HEAD =='
git rev-parse HEAD
git status --short
printf '%s\n' '== DIFF SUMMARY VS DEVELOP =='
git diff --stat develop...HEAD
git diff --name-status develop...HEAD
printf '%s\n' '== DOCUMENT FILES =='
fd -t f . docs | sort
printf '%s\n' '== CHANGED DOCUMENT HEADINGS =='
git diff --name-only develop...HEAD | while IFS= read -r f; do
case "$f" in
*.md)
printf '\n--- %s ---\n' "$f"
rg -n '^(#|##|###) ' "$f" || true
;;
esac
done
printf '%s\n' '== FOCUSED TERMS IN CHANGED DOCS =='
git diff --name-only develop...HEAD | while IFS= read -r f; do
case "$f" in
*.md)
printf '\n--- %s ---\n' "$f"
rg -n -i -C 2 'keyword|regex|fallback|candidate|judge|adjudicat|calibrat|evaluation_only|PII|privacy|retention|Inkspan|release|lockfile|verif|rollback|acceptance|stale|selector|send gate|undo|DIF|drift|reliability' "$f" || true
;;
esac
done
printf '%s\n' '== PR METADATA =='
gh pr view 1322 --repo ContextualWisdomLab/naruon --json number,title,headRefOid,baseRefName,files,url --jq '{number,title,headRefOid,baseRefName,url,files:[.files[].path]}'Length of output: 232437 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== ADR: WORKFLOW, PRIVACY, ACCEPTANCE, ROLLBACK =='
sed -n '21,197p' docs/adr/0001-inkspan-backed-llm-email-writing-guidance.md
printf '%s\n' '== DESIGN: API, ADMISSION, MEASUREMENT, PRIVACY, RELEASE =='
sed -n '112,180p' docs/superpowers/specs/2026-08-12-inkspan-llm-email-writing-guidance-design.md
sed -n '223,371p' docs/superpowers/specs/2026-08-12-inkspan-llm-email-writing-guidance-design.md
sed -n '373,558p' docs/superpowers/specs/2026-08-12-inkspan-llm-email-writing-guidance-design.md
printf '%s\n' '== PLAN: DEPENDENCY, PRIVACY, POLICY, ACCEPTANCE, RELEASE =='
sed -n '39,160p' docs/superpowers/plans/2026-08-12-llm-email-writing-guidance-implementation.md
sed -n '275,395p' docs/superpowers/plans/2026-08-12-llm-email-writing-guidance-implementation.md
sed -n '546,705p' docs/superpowers/plans/2026-08-12-llm-email-writing-guidance-implementation.md
printf '%s\n' '== CROSS-DOCUMENT TERM CONSISTENCY =='
for term in \
'evaluation_only' \
'approved policy' \
'immutable released' \
'rollback' \
'no raw' \
'send gate' \
'candidate reviewer' \
'independent judge' \
'adjudicat'; do
printf '\n-- %s --\n' "$term"
rg -n -i --glob '*.md' "$term" \
docs/adr/0001-inkspan-backed-llm-email-writing-guidance.md \
docs/doctoring/llm-email-writing-guidance-and-fast-mlsirm-judge.md \
docs/superpowers/specs/2026-08-12-inkspan-llm-email-writing-guidance-design.md \
docs/superpowers/plans/2026-08-12-llm-email-writing-guidance-implementation.md \
|| true
done
printf '%s\n' '== COMPANION PR METADATA =='
gh pr view 248 --repo ContextualWisdomLab/inkspan \
--json number,state,title,headRefOid,baseRefName,mergedAt,url \
--jq '{number,state,title,headRefOid,baseRefName,mergedAt,url}' || true
printf '%s\n' '== FAST-MLSIRM PR METADATA =='
gh pr view 733 --repo ContextualWisdomLab/fast-mlsirm \
--json number,state,title,headRefOid,baseRefName,mergedAt,url \
--jq '{number,state,title,headRefOid,baseRefName,mergedAt,url}' || trueLength of output: 76893
I found one measurement-validity issue.
The reviewed documents otherwise define the requested boundaries clearly:
|
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Reconcile the Ready email-writing design onto current protected develop. Keep topic-intelligence ADRs 0001-0003 and accepted calendar ADR-0004. Renumber the email-writing decision to ADR-0005 so numbered identifiers stay unique. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
|
@coderabbitai review Please review the unchanged exact current head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected_head='bfc2df112136bb9fe358778d701e78bf9e78b685'
base='dd8d1519'
printf '%s\n' '== EXACT HEAD AND MERGE =='
git rev-parse HEAD
git show -s --format='commit=%H%nparents=%P%nsubject=%s' HEAD
git status --short
git merge-base --is-ancestor "$base" HEAD && echo "base_is_ancestor=yes" || echo "base_is_ancestor=no"
if [ "$(git rev-parse HEAD)" != "$expected_head" ]; then
echo "ERROR: checked-out HEAD does not match requested exact head" >&2
exit 1
fi
printf '%s\n' '== DIFF AGAINST LIVE DEVELOP COMMIT =='
git diff --stat "$base...HEAD"
git diff --name-status "$base...HEAD"
printf '%s\n' '== CHANGED MARKDOWN HEADINGS =='
git diff --name-only "$base...HEAD" | while IFS= read -r f; do
case "$f" in
*.md)
printf '\n--- %s ---\n' "$f"
rg -n '^(#{1,4}) ' "$f" || true
;;
esac
done
printf '%s\n' '== ADR INDEX AND IDENTIFIER CHECK =='
if [ -f docs/adr/README.md ]; then
sed -n '1,240p' docs/adr/README.md
fi
fd -t f -e md . docs/adr | sort | while IFS= read -r f; do
printf '\n--- %s ---\n' "$f"
sed -n '1,45p' "$f"
done
printf '%s\n' '== FOCUSED CONTRACTS IN REVIEW DOCUMENTS =='
for f in \
docs/adr/0005-inkspan-backed-llm-email-writing-guidance.md \
docs/superpowers/specs/2026-08-12-inkspan-llm-email-writing-guidance-design.md \
docs/superpowers/plans/2026-08-12-llm-email-writing-guidance-implementation.md \
docs/doctoring/llm-email-writing-guidance-and-fast-mlsirm-judge.md
do
if [ -f "$f" ]; then
printf '\n--- %s ---\n' "$f"
rg -n -i -C 3 \
'keyword|regex|fallback|candidate|independent judge|adjudicat|policy artifact|calibrat|threshold|holdout|data split|evaluation protocol|publish|PII|privacy|retention|raw.content|telemetry|immutable|release|lockfile|rollback|acceptance|stale|selector|send' \
"$f" || true
else
echo "MISSING: $f"
fi
done
printf '%s\n' '== POLICY AND EVALUATION CONTEXT FROM IMPLEMENTATION PLAN =='
plan='docs/superpowers/plans/2026-08-12-llm-email-writing-guidance-implementation.md'
if [ -f "$plan" ]; then
rg -n '^(##|###) ' "$plan"
sed -n '530,680p' "$plan"
fi
printf '%s\n' '== PR METADATA =='
gh pr view 1322 --repo ContextualWisdomLab/naruon \
--json number,headRefOid,baseRefName,state,mergeable,reviewDecision,url \
--jq '{number,headRefOid,baseRefName,state,mergeable,reviewDecision,url}'Length of output: 124240 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== ADR IDENTIFIERS AND INDEX LINKS =='
printf 'ADR headers: '
rg -n '^# ADR-[0-9]{4}:' docs/adr --glob '*.md' | wc -l
printf 'Unique ADR header identifiers: '
rg '^# ADR-[0-9]{4}:' docs/adr --glob '*.md' \
| sed -E 's/^# (ADR-[0-9]{4}):.*/\1/' | sort -u | wc -l
printf 'Indexed ADR markdown links: '
rg -o '\[ADR-[0-9]{4}\]\([^)]*\.md\)' docs/adr/README.md | wc -l
printf 'Conflict markers in changed docs: '
git diff --name-only dd8d1519...HEAD | while IFS= read -r f; do
case "$f" in *.md) printf '%s\0' "$f" ;; esac
done | xargs -0 -r rg -n '^(<<<<<<<|=======|>>>>>>>)' || true
printf '%s\n' '== REQUIRED ADR-0005 SECTIONS =='
for heading in \
'Context' \
'Alternatives considered' \
'Decision' \
'Consequences' \
'Failure and recovery' \
'Security and privacy impact' \
'Accessibility' \
'Compatibility and migration' \
'Verification and acceptance evidence' \
'Research and standards traceability' \
'Rollback or supersession'
do
if rg -qx "## ${heading}" docs/adr/0005-inkspan-backed-llm-email-writing-guidance.md; then
printf 'present: %s\n' "$heading"
else
printf 'MISSING: %s\n' "$heading"
fi
done
printf '%s\n' '== ALL MEASUREMENT-PUBLICATION REFERENCES =='
rg -n -i -C 2 \
'pre.?specif|pre.?register|threshold|holdout|data split|evaluation protocol|publication job|policy artifact|dataset.*hash|hash.*dataset' \
docs/adr/0005-inkspan-backed-llm-email-writing-guidance.md \
docs/superpowers/specs/2026-08-12-inkspan-llm-email-writing-guidance-design.md \
docs/superpowers/plans/2026-08-12-llm-email-writing-guidance-implementation.md \
docs/doctoring/llm-email-writing-guidance-and-fast-mlsirm-judge.md
printf '%s\n' '== TASK 14 WITH LINE NUMBERS =='
nl -ba docs/superpowers/plans/2026-08-12-llm-email-writing-guidance-implementation.md | sed -n '546,578p'Length of output: 16518
I found one issue.
The requested ADR checks are consistent at this head:
The documents also retain the required semantic-authority boundary, immutable dependency gates, privacy controls, fail-closed review behavior, and rollback that preserves Inkspan authoring and the existing send path. This review does not provide the required qualifying non-author approval. You are interacting with an AI system. |
…ask4' into feat/llm-email-writing-orchestrator-task5 Retarget Task 5 onto live #1329 head 4570747 (merged onto live #1328 51fb5e8 / #1327 fb7c406 / #1322 bfc2df1 / develop@dd8d1519). Preserve the hardened contextual-orchestrator boundary. Do not restore write-capable Task 5 promotion/finalize workflows. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Stale review: all review-thread comments on this PR are resolved and the reviewer's cited commit predates the current head, which passes all non-metadata-gate required checks (verified via gh pr checks and the reviewThreads GraphQL query — 0 unresolved threads). Dismissing as superseded per AGENTS.md stale-review guidance.
|
@coderabbitai review |
✅ Action performedReview finished.
|
All findings in this predecessor-head CHANGES_REQUESTED review were verified against the descendant current head and addressed; the associated review threads are resolved. Dismissing only as obsolete predecessor-head review state after head movement, not as approval or passing evidence.
|
@coderabbitai review |
|
Scope
Documentation/design root for Inkspan-backed contextual email-writing guidance. This PR adds no runtime dependency, database migration, editor package, provider route, diagnostic, send behavior, or release identity.
Naruon owns authorized email/thread/recipient/project context, review contracts/API, prompt/rubric/policy consumption, privacy-minimized evidence/feedback, and mail workflow.
contextual-orchestratorowns provider-neutral routing/test-time compute;fast-mlsirmowns criterion-level Judge/measurement contracts; Inkspan owns revision-bound editor/diagnostic behavior. Candidate Reviewer and Judge remain separate roles/calls. Semantic judgments must fail closed or abstain when the released owner capability is unavailable; lexical/keyword/regex heuristics are not semantic fallbacks.Current exact authority
develop@042b0c70531b229af3acbd0421a2f23098d848b39f1836d09e6b4db97855d701d8220268e9fb4d87The active task-owned lineage remains #1322 → #1327 → #1328 → #1329 → #1356 → #1375 → #1524 → #1530 → #1535 → #1536. Descendants are preparatory and do not authorize skipping immutable dependency order; any parent movement requires ordinary non-destructive restack and fresh exact-head evidence.
Immutable owner boundary
The latest evidence recorded by this design root is still insufficient for runtime adoption:
fast-mlsirmv0.9.1 exposes the intended Judge surface but its GitHub release does not itself establish the approved immutable distributable/provenance path required by Naruon; consumer admission remains gated through [Dependency] verify and hash-lock immutable fast-mlsirm Judge artifact for Task 7 #1385 / owner publication work.Candidate confidence is never Judge evidence. A publishable policy must preregister thresholds and holdout/protocol hashes before label access and produce calibration, Brier, test-retest, DIF, temporal-drift, and Candidate→Judge→adjudicator evidence. Guidance remains advisory, revision-bound, purpose-authorized, and must not leak raw mail/draft/model/Judge content to ordinary logs or telemetry.
Current delivery boundary
Repository-local checks previously observed on this unchanged head are not sufficient by themselves. The live PR state still lacks complete central merge authority: required OpenCode/review-gate evidence remains incomplete and there is no qualifying current-head independent approval. The PR was therefore returned to Draft rather than leaving a mechanically mergeable design root marked Ready.
Merge only after this unchanged head satisfies every then-live repository/organization required check, all valid findings/threads are resolved, and the qualifying independent post-last-push approval required by live governance exists. Queued, in-progress, failed, skipped-required, absent, stale, predecessor, synthetic, model-only, status-only, or author-only evidence is non-passing. No force-push, destructive rebase, self-approval, bypass, or gate weakening.