Skip to content

Commit 806c962

Browse files
yodemclaude
andcommitted
fix: resolve 6 audit findings from full plugin audit
- Fix dead voice-pull hook: use plugin_root instead of projectDir, drop incorrect src/ prefix so voice-sync.sh is found in deployed installs - Align voice-sync.sh and voice-migrate.sh directory references (.academic-writer → .academic-helper) - Correct CLAUDE.md guard documentation (directory vs profile.md) - Bump all 16 skill metadata versions to match manifest - Normalize voice skill frontmatter to inline JSON arrays - Remove non-standard disallowed_tools from deep-reader agent Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9515c3d commit 806c962

35 files changed

Lines changed: 50 additions & 54 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ researcher on a local machine; the plugin should never assume team workflows.
2525

2626
## Conventions
2727

28-
- **Profile-scoped**: every hook must silently skip in projects without `.academic-helper/profile.md`. The `run-hook.mjs:54` directory guard handles this; new hooks should respect it.
28+
- **Profile-scoped**: every hook must silently skip in projects without `.academic-helper/profile.md`. The `run-hook.mjs:54` outer guard checks for the `.academic-helper/` directory; individual hooks then verify `profile.md` exists. New hooks should include the `profile.md` check.
2929
- **Thresholds**: edit `src/thresholds.json`, never inline numbers in skills or agents.
3030
- **Strict TypeScript**: hooks must compile under `tsc --noEmit`; never use `any` (use `unknown` and narrow).
3131
- **Markdown frontmatter**: skills require `name`, `description`, `user-invocable`, `allowedTools`. Agents require `name`, `description`, `tools`, `model`. Add `metadata: {author, version}` to skills.

plugins/academic-writer/commands/voice.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Stage 2 of the voice subsystem. Run `:voice` to start a 7-session adversarial interview seeded by the past-articles fingerprint. Sub-actions for resume, recompress, audit, quick mode, sync, and status. Use when the user wants to deepen their voice profile beyond what the corpus reveals.
3-
allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent
3+
allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, Agent]
44
---
55

66
# Auto-generated from skills/voice/SKILL.md
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"generatedAt": "2026-05-29T07:45:34.150Z",
3-
"buildTimeMs": 45,
2+
"generatedAt": "2026-06-03T06:46:46.843Z",
3+
"buildTimeMs": 15,
44
"bundles": {
55
"lifecycle": {
6-
"size": 7593,
7-
"sizeKB": "7.42"
6+
"size": 7549,
7+
"sizeKB": "7.37"
88
},
99
"hooks": {
1010
"size": 4975,
1111
"sizeKB": "4.86"
1212
}
1313
},
14-
"totalSize": 7593
14+
"totalSize": 7549
1515
}

plugins/academic-writer/hooks/dist/hooks.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Academic Writer Hooks - Unified Bundle
2-
// Generated: 2026-05-29T07:45:34.193Z
2+
// Generated: 2026-06-03T06:46:46.855Z
33

44
import{existsSync as h,readdirSync as E}from"node:fs";import{join as m}from"node:path";import{existsSync as w,readFileSync as R}from"node:fs";import{join as D}from"node:path";var I=".academic-helper/profile.md";function f(o){return D(o,I)}function b(o){try{let e={},n=o.match(/^---\n([\s\S]*?)\n---/);if(n){let r=n[1].split(`
55
`),s=0;for(;s<r.length;){let p=r[s],c=p.match(/^([\w-]+): (.+)$/);if(c){let[,u,d]=c,a=d.trim();a==="null"?e[u]=null:a==="[]"?e[u]=[]:e[u]=a,s++}else if(/^[\w-]+:\s*$/.test(p)){let u=p.split(":")[0],d=[];for(s++;s<r.length&&r[s].startsWith(" - ");)d.push(r[s].slice(4)),s++;e[u]=d}else s++}}let t=/^## ([^\n]+)\n+```json\n([\s\S]*?)\n```/gm,i;for(;(i=t.exec(o))!==null;){let r=i[1].trim().toLowerCase().replace(/\s+/g,"");try{let s=JSON.parse(i[2]);switch(r){case"tools":e.tools=s;break;case"stylefingerprint":e.styleFingerprint=s;break;case"sources":e.sources=s;break;case"articlestructure":e.articleStructure=s;break;case"outputformatpreferences":e.outputFormatPreferences=s;break}}catch{}}return e}catch{return null}}function S(o){let e=f(o);if(!w(e))return null;try{let n=R(e,"utf-8");return b(n)}catch{return null}}function j(o){let e=o.project_dir??process.env.CLAUDE_PROJECT_DIR??".",n=S(e);if(!n)return{continue:!0,suppressOutput:!0};let t=[];t.push(""),t.push("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),t.push("\u2551 ACADEMIC WRITER \u2014 SESSION START \u2551"),t.push("\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563"),t.push(`\u2551 Field: ${(n.fieldOfStudy??"Not set").padEnd(38)}\u2551`),t.push(`\u2551 Language: ${(n.targetLanguage??"Not set").padEnd(36)}\u2551`),t.push(`\u2551 Citation: ${(n.citationStyle??"Not set").padEnd(36)}\u2551`),t.push(`\u2551 Fingerprint: ${(n.styleFingerprint?"Loaded":"Missing").padEnd(33)}\u2551`);let i=m(e,"articles"),r=0;if(h(i))try{r=E(i).filter(l=>l.endsWith(".docx")).length}catch{}t.push(`\u2551 Articles: ${String(r).padEnd(36)}\u2551`);let s=n.sources?.length??0;t.push(`\u2551 Sources indexed: ${String(s).padEnd(29)}\u2551`);let p=n.tools??{},c=[];for(let[a,l]of Object.entries(p))l&&typeof l=="object"&&"enabled"in l&&l.enabled&&c.push(a);t.push(`\u2551 Tools: ${(c.length>0?c.join(", "):"None").substring(0,38).padEnd(38)}\u2551`);let u=m(e,".academic-helper","research-brief.md");h(u)&&t.push("\u2551 Research brief: Available \u2551");let d=m(e,"past-articles");if(h(d))try{let a=E(d),l=n.analyzedArticles?.length??0,g=a.filter(y=>y.endsWith(".pdf")||y.endsWith(".docx")).length-l;g>0&&(t.push(`\u2551 New past articles: ${String(g).padEnd(27)}\u2551`),t.push("\u2551 \u2192 Run /academic-writer:voice to update style \u2551"))}catch{}return t.push("\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563"),t.push("\u2551 /academic-writer:write \u2014 Write new article \u2551"),t.push("\u2551 /academic-writer:ideate \u2014 Brainstorm ideas \u2551"),t.push("\u2551 /academic-writer:research \u2014 Investigate a topic \u2551"),t.push("\u2551 /academic-writer:health \u2014 Check integrations \u2551"),t.push("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),{continue:!0,systemMessage:t.join(`
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Academic Writer Hooks - lifecycle bundle
2-
// Generated: 2026-05-29T07:45:34.152Z
2+
// Generated: 2026-06-03T06:46:46.844Z
33

44
import{execFile as _}from"node:child_process";import{existsSync as C}from"node:fs";import{join as v}from"node:path";function S(s){let e=s.project_dir??process.env.CLAUDE_PROJECT_DIR??".";return C(v(e,".academic-helper","profile.md"))?process.platform!=="darwin"?{continue:!0,suppressOutput:!0}:(_("osascript",["-e",'display notification "Task complete" with title "Academic Writer" sound name "Glass"'],{timeout:2e3},()=>{}),{continue:!0,suppressOutput:!0}):{continue:!0,suppressOutput:!0}}import{existsSync as m,readdirSync as E}from"node:fs";import{join as h}from"node:path";import{existsSync as A,readFileSync as H}from"node:fs";import{join as L}from"node:path";var $=".academic-helper/profile.md";function d(s){return L(s,$)}function F(s){try{let e={},r=s.match(/^---\n([\s\S]*?)\n---/);if(r){let i=r[1].split(`
5-
`),o=0;for(;o<i.length;){let u=i[o],c=u.match(/^([\w-]+): (.+)$/);if(c){let[,l,f]=c,a=f.trim();a==="null"?e[l]=null:a==="[]"?e[l]=[]:e[l]=a,o++}else if(/^[\w-]+:\s*$/.test(u)){let l=u.split(":")[0],f=[];for(o++;o<i.length&&i[o].startsWith(" - ");)f.push(i[o].slice(4)),o++;e[l]=f}else o++}}let t=/^## ([^\n]+)\n+```json\n([\s\S]*?)\n```/gm,n;for(;(n=t.exec(s))!==null;){let i=n[1].trim().toLowerCase().replace(/\s+/g,"");try{let o=JSON.parse(n[2]);switch(i){case"tools":e.tools=o;break;case"stylefingerprint":e.styleFingerprint=o;break;case"sources":e.sources=o;break;case"articlestructure":e.articleStructure=o;break;case"outputformatpreferences":e.outputFormatPreferences=o;break}}catch{}}return e}catch{return null}}function k(s){let e=d(s);if(!A(e))return null;try{let r=H(e,"utf-8");return F(r)}catch{return null}}function R(s){let e=s.project_dir??process.env.CLAUDE_PROJECT_DIR??".",r=k(e);if(!r)return{continue:!0,suppressOutput:!0};let t=[];t.push(""),t.push("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),t.push("\u2551 ACADEMIC WRITER \u2014 SESSION START \u2551"),t.push("\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563"),t.push(`\u2551 Field: ${(r.fieldOfStudy??"Not set").padEnd(38)}\u2551`),t.push(`\u2551 Language: ${(r.targetLanguage??"Not set").padEnd(36)}\u2551`),t.push(`\u2551 Citation: ${(r.citationStyle??"Not set").padEnd(36)}\u2551`),t.push(`\u2551 Fingerprint: ${(r.styleFingerprint?"Loaded":"Missing").padEnd(33)}\u2551`);let n=h(e,"articles"),i=0;if(m(n))try{i=E(n).filter(p=>p.endsWith(".docx")).length}catch{}t.push(`\u2551 Articles: ${String(i).padEnd(36)}\u2551`);let o=r.sources?.length??0;t.push(`\u2551 Sources indexed: ${String(o).padEnd(29)}\u2551`);let u=r.tools??{},c=[];for(let[a,p]of Object.entries(u))p&&typeof p=="object"&&"enabled"in p&&p.enabled&&c.push(a);t.push(`\u2551 Tools: ${(c.length>0?c.join(", "):"None").substring(0,38).padEnd(38)}\u2551`);let l=h(e,".academic-helper","research-brief.md");m(l)&&t.push("\u2551 Research brief: Available \u2551");let f=h(e,"past-articles");if(m(f))try{let a=E(f),p=r.analyzedArticles?.length??0,g=a.filter(y=>y.endsWith(".pdf")||y.endsWith(".docx")).length-p;g>0&&(t.push(`\u2551 New past articles: ${String(g).padEnd(27)}\u2551`),t.push("\u2551 \u2192 Run /academic-writer:voice to update style \u2551"))}catch{}return t.push("\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563"),t.push("\u2551 /academic-writer:write \u2014 Write new article \u2551"),t.push("\u2551 /academic-writer:ideate \u2014 Brainstorm ideas \u2551"),t.push("\u2551 /academic-writer:research \u2014 Investigate a topic \u2551"),t.push("\u2551 /academic-writer:health \u2014 Check integrations \u2551"),t.push("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),{continue:!0,systemMessage:t.join(`
6-
`)}}import{existsSync as I,appendFileSync as N}from"node:fs";import{join as O}from"node:path";function b(s){let e=s.project_dir??process.env.CLAUDE_PROJECT_DIR??".";if(!I(d(e)))return{continue:!0,suppressOutput:!0};let r=O(e,".academic-helper","logs");if(!I(r))return{continue:!0,suppressOutput:!0};try{let t=new Date,n=t.toISOString().split("T")[0],i=t.toISOString().split("T")[1].split(".")[0],o=O(r,`${n}.log`),u=s.session_id??"unknown",c=["",`--- Session End: ${i} (${u}) ---`,`Timestamp: ${t.toISOString()}`,"---",""].join(`
7-
`);N(o,c,"utf-8")}catch{}return{continue:!0,suppressOutput:!0}}import{existsSync as w,readFileSync as U}from"node:fs";import{join as D}from"node:path";function j(s){let e=s.project_dir??process.env.CLAUDE_PROJECT_DIR??".";if(!w(D(e,".academic-helper","profile.md")))return{continue:!0,suppressOutput:!0};let r=s.subagent_type??s.subagentType??"";if(r!=="auditor"&&r!=="academic-writer:auditor")return{continue:!0,suppressOutput:!0};let t=s.plugin_root??process.env.CLAUDE_PLUGIN_ROOT,n="";if(t){let o=D(t,"thresholds.json");if(w(o))try{let u=U(o,"utf-8"),c=JSON.parse(u);n=`
5+
`),o=0;for(;o<i.length;){let a=i[o],c=a.match(/^([\w-]+): (.+)$/);if(c){let[,l,f]=c,u=f.trim();u==="null"?e[l]=null:u==="[]"?e[l]=[]:e[l]=u,o++}else if(/^[\w-]+:\s*$/.test(a)){let l=a.split(":")[0],f=[];for(o++;o<i.length&&i[o].startsWith(" - ");)f.push(i[o].slice(4)),o++;e[l]=f}else o++}}let t=/^## ([^\n]+)\n+```json\n([\s\S]*?)\n```/gm,n;for(;(n=t.exec(s))!==null;){let i=n[1].trim().toLowerCase().replace(/\s+/g,"");try{let o=JSON.parse(n[2]);switch(i){case"tools":e.tools=o;break;case"stylefingerprint":e.styleFingerprint=o;break;case"sources":e.sources=o;break;case"articlestructure":e.articleStructure=o;break;case"outputformatpreferences":e.outputFormatPreferences=o;break}}catch{}}return e}catch{return null}}function k(s){let e=d(s);if(!A(e))return null;try{let r=H(e,"utf-8");return F(r)}catch{return null}}function R(s){let e=s.project_dir??process.env.CLAUDE_PROJECT_DIR??".",r=k(e);if(!r)return{continue:!0,suppressOutput:!0};let t=[];t.push(""),t.push("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),t.push("\u2551 ACADEMIC WRITER \u2014 SESSION START \u2551"),t.push("\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563"),t.push(`\u2551 Field: ${(r.fieldOfStudy??"Not set").padEnd(38)}\u2551`),t.push(`\u2551 Language: ${(r.targetLanguage??"Not set").padEnd(36)}\u2551`),t.push(`\u2551 Citation: ${(r.citationStyle??"Not set").padEnd(36)}\u2551`),t.push(`\u2551 Fingerprint: ${(r.styleFingerprint?"Loaded":"Missing").padEnd(33)}\u2551`);let n=h(e,"articles"),i=0;if(m(n))try{i=E(n).filter(p=>p.endsWith(".docx")).length}catch{}t.push(`\u2551 Articles: ${String(i).padEnd(36)}\u2551`);let o=r.sources?.length??0;t.push(`\u2551 Sources indexed: ${String(o).padEnd(29)}\u2551`);let a=r.tools??{},c=[];for(let[u,p]of Object.entries(a))p&&typeof p=="object"&&"enabled"in p&&p.enabled&&c.push(u);t.push(`\u2551 Tools: ${(c.length>0?c.join(", "):"None").substring(0,38).padEnd(38)}\u2551`);let l=h(e,".academic-helper","research-brief.md");m(l)&&t.push("\u2551 Research brief: Available \u2551");let f=h(e,"past-articles");if(m(f))try{let u=E(f),p=r.analyzedArticles?.length??0,g=u.filter(y=>y.endsWith(".pdf")||y.endsWith(".docx")).length-p;g>0&&(t.push(`\u2551 New past articles: ${String(g).padEnd(27)}\u2551`),t.push("\u2551 \u2192 Run /academic-writer:voice to update style \u2551"))}catch{}return t.push("\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563"),t.push("\u2551 /academic-writer:write \u2014 Write new article \u2551"),t.push("\u2551 /academic-writer:ideate \u2014 Brainstorm ideas \u2551"),t.push("\u2551 /academic-writer:research \u2014 Investigate a topic \u2551"),t.push("\u2551 /academic-writer:health \u2014 Check integrations \u2551"),t.push("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),{continue:!0,systemMessage:t.join(`
6+
`)}}import{existsSync as I,appendFileSync as N}from"node:fs";import{join as b}from"node:path";function w(s){let e=s.project_dir??process.env.CLAUDE_PROJECT_DIR??".";if(!I(d(e)))return{continue:!0,suppressOutput:!0};let r=b(e,".academic-helper","logs");if(!I(r))return{continue:!0,suppressOutput:!0};try{let t=new Date,n=t.toISOString().split("T")[0],i=t.toISOString().split("T")[1].split(".")[0],o=b(r,`${n}.log`),a=s.session_id??"unknown",c=["",`--- Session End: ${i} (${a}) ---`,`Timestamp: ${t.toISOString()}`,"---",""].join(`
7+
`);N(o,c,"utf-8")}catch{}return{continue:!0,suppressOutput:!0}}import{existsSync as O,readFileSync as U}from"node:fs";import{join as D}from"node:path";function j(s){let e=s.project_dir??process.env.CLAUDE_PROJECT_DIR??".";if(!O(D(e,".academic-helper","profile.md")))return{continue:!0,suppressOutput:!0};let r=s.subagent_type??s.subagentType??"";if(r!=="auditor"&&r!=="academic-writer:auditor")return{continue:!0,suppressOutput:!0};let t=s.plugin_root??process.env.CLAUDE_PLUGIN_ROOT,n="";if(t){let o=D(t,"thresholds.json");if(O(o))try{let a=U(o,"utf-8"),c=JSON.parse(a);n=`
88
Current thresholds: anti-AI ${c.antiAi?.passThreshold}/${c.antiAi?.maxScore}, max rewrite cycles ${c.rewriteCycles?.max}.`}catch{}}return{continue:!0,hookSpecificOutput:{hookEventName:"SubagentStart",additionalContext:["AUDITOR CONTEXT (injected by SubagentStart hook):","- Verify every citation against the canonical sources.json registry.","- A citation passes only when title, author, year, and page all match.","- Mark [NEEDS REVIEW: <field>] when a field is missing or low-confidence.","- Use WebSearch for external verification only when the registry has no entry.","- Validate WebSearch results: title (exact), author, year (\xB11), page range \u2014 anything weaker = [NEEDS REVIEW: external_verification].","- Final output must be a single VERDICT line: PASS or FAIL with reasons.",n].filter(Boolean).join(`
9-
`)}}}import{existsSync as x}from"node:fs";import{spawnSync as W}from"node:child_process";import{join as P}from"node:path";function T(s){let e=s.project_dir??process.env.CLAUDE_PROJECT_DIR??process.cwd();if(!x(P(e,".academic-helper","profile.md")))return{continue:!0,suppressOutput:!0};let r=s.plugin_root??process.env.CLAUDE_PLUGIN_ROOT;if(!r)return{continue:!0,suppressOutput:!0};let t=P(r,"skills","voice","voice-sync.sh");if(!x(t))return{continue:!0,suppressOutput:!0};let n=W("bash",[t,"pull"],{cwd:e,env:{...process.env,VOICE_PROJECT_ROOT:e},encoding:"utf-8"});return n.status!==0&&console.warn(`[voice-pull] non-fatal: ${n.stderr}`),{continue:!0,suppressOutput:!0}}var yt={"lifecycle/notify-stop":S,"lifecycle/session-dashboard":R,"lifecycle/session-end-log":b,"lifecycle/subagent-start":j,"lifecycle/voice-pull":T};export{yt as hooks};
9+
`)}}}import{existsSync as x}from"node:fs";import{spawnSync as W}from"node:child_process";import{join as P}from"node:path";function T(s){let e=s.project_dir??process.env.CLAUDE_PROJECT_DIR??process.cwd();if(!x(P(e,".academic-helper","profile.md")))return{continue:!0,suppressOutput:!0};let r=s.plugin_root??process.env.CLAUDE_PLUGIN_ROOT??"",t=P(r,"skills","voice","voice-sync.sh");if(!x(t))return{continue:!0,suppressOutput:!0};let n=W("bash",[t,"pull"],{cwd:e,env:{...process.env,VOICE_PROJECT_ROOT:e},encoding:"utf-8"});return n.status!==0&&console.warn(`[voice-pull] non-fatal: ${n.stderr}`),{continue:!0,suppressOutput:!0}}var yt={"lifecycle/notify-stop":S,"lifecycle/session-dashboard":R,"lifecycle/session-end-log":w,"lifecycle/subagent-start":j,"lifecycle/voice-pull":T};export{yt as hooks};
1010
//# sourceMappingURL=lifecycle.mjs.map

0 commit comments

Comments
 (0)