konoha-mcp 2.1.13 → 2.1.14

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.
Files changed (52) hide show
  1. package/.agents/skills/konoha/SKILL.md +16 -3
  2. package/.agents/skills/tokubetsu-jonin-skill/SKILL.md +48 -23
  3. package/.agents/skills/tokubetsu-jonin-skill/references/docx.md +25 -4
  4. package/.agents/skills/tokubetsu-jonin-skill/references/elite-powerpoint-designer.md +48 -23
  5. package/.agents/skills/tokubetsu-jonin-skill/references/pdf.md +78 -46
  6. package/.agents/skills/tokubetsu-jonin-skill/references/pptx.md +25 -3
  7. package/.agents/skills/tokubetsu-jonin-skill/references/xlsx.md +60 -33
  8. package/.agents/skills/tokubetsu-jonin-skill/references/zero-ai-human-writing.md +34 -11
  9. package/.agents/skills.fingerprint +1 -1
  10. package/README.md +18 -6
  11. package/apps/web/build/adapter-node.js +1 -1
  12. package/apps/web/build/client/_app/version.json +1 -1
  13. package/apps/web/build/client/_app/version.json.br +0 -0
  14. package/apps/web/build/client/_app/version.json.gz +0 -0
  15. package/apps/web/build/server/chunks/instance.js +3 -3
  16. package/apps/web/build/server/chunks/internal.js +1 -1
  17. package/apps/web/package.json +1 -1
  18. package/bin/cli.js +3 -3
  19. package/docs/ALL-WORKFLOW-DIAGRAMS.md +642 -0
  20. package/docs/ARCHITECTURE.md +11 -7
  21. package/docs/SETUP-CLI.md +1 -1
  22. package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.13_2026-10-07.md +10 -0
  23. package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.14_2026-10-08.md +88 -0
  24. package/docs/diagrams/README.md +1 -1
  25. package/package.json +3 -2
  26. package/src/agent_manager.js +20 -4
  27. package/src/canonical_skills.js +1 -1
  28. package/src/file_tools_router.js +3 -1
  29. package/src/mcp/anti_slop.js +281 -0
  30. package/src/mcp/memory_reporting.js +21 -0
  31. package/src/mcp/skills.js +274 -0
  32. package/src/mcp/tool_dispatch.js +14 -1
  33. package/src/mcp/workflow.js +1 -1
  34. package/src/mcp_tool_manifest.json +59 -0
  35. package/src/templates/agents.yaml +21 -0
  36. package/src/templates/skills/konoha/SKILL.md +16 -3
  37. package/src/templates/skills/tokubetsu-jonin-skill/SKILL.md +48 -23
  38. package/src/templates/skills/tokubetsu-jonin-skill/references/docx.md +25 -4
  39. package/src/templates/skills/tokubetsu-jonin-skill/references/elite-powerpoint-designer.md +48 -23
  40. package/src/templates/skills/tokubetsu-jonin-skill/references/pdf.md +78 -46
  41. package/src/templates/skills/tokubetsu-jonin-skill/references/pptx.md +25 -3
  42. package/src/templates/skills/tokubetsu-jonin-skill/references/xlsx.md +60 -33
  43. package/src/templates/skills/tokubetsu-jonin-skill/references/zero-ai-human-writing.md +34 -11
  44. package/.agents/skills/helm-chart-scaffolding/SKILL.md +0 -71
  45. package/.agents/skills/helm-chart-scaffolding/assets/Chart.yaml.template +0 -42
  46. package/.agents/skills/helm-chart-scaffolding/assets/values.yaml.template +0 -185
  47. package/.agents/skills/helm-chart-scaffolding/references/chart-structure.md +0 -509
  48. package/.agents/skills/helm-chart-scaffolding/references/details.md +0 -497
  49. package/.agents/skills/helm-chart-scaffolding/scripts/validate-chart.sh +0 -244
  50. package/src/templates/skills/helm-chart-scaffolding/SKILL.md +0 -71
  51. package/src/templates/skills/helm-chart-scaffolding/references/chart-structure.md +0 -509
  52. package/src/templates/skills/helm-chart-scaffolding/references/details.md +0 -497
package/src/mcp/skills.js CHANGED
@@ -521,6 +521,279 @@ function getSkill(name, agentName = null, options = {}) {
521
521
  }
522
522
  }
523
523
 
524
+ /**
525
+ * useSkills — Load and activate one or more skills by name.
526
+ * Looks up in the database skills table first.
527
+ * If not found in database, logs a warning and falls back to reading mirror skills from disk.
528
+ *
529
+ * @param {string|string[]} skillsInput - Skill name, comma-separated names, or array of names
530
+ * @param {string|null} agentName - Calling agent name
531
+ * @param {object} options - { tokenBudget, section, taskId }
532
+ * @returns {string} JSON response string
533
+ */
534
+ function useSkills(skillsInput, agentName = null, options = {}) {
535
+ process.stderr.write(`[mcp konoha] tool_call: use_skills(skills=${JSON.stringify(skillsInput)})\n`);
536
+ try {
537
+ autoMigrateProjectSkills();
538
+ } catch (_) { /* ignore */ }
539
+
540
+ let normalizedInput = skillsInput;
541
+ if (typeof normalizedInput === 'object' && normalizedInput !== null && !Array.isArray(normalizedInput)) {
542
+ normalizedInput = normalizedInput.skills || normalizedInput.name || normalizedInput.skill || normalizedInput.names;
543
+ }
544
+
545
+ let skillNames = [];
546
+ if (Array.isArray(normalizedInput)) {
547
+ skillNames = normalizedInput.map(s => String(s).trim()).filter(Boolean);
548
+ } else if (typeof normalizedInput === 'string') {
549
+ if (normalizedInput.includes(',')) {
550
+ skillNames = normalizedInput.split(',').map(s => s.trim()).filter(Boolean);
551
+ } else {
552
+ skillNames = [normalizedInput.trim()].filter(Boolean);
553
+ }
554
+ }
555
+
556
+ if (skillNames.length === 0) {
557
+ const errRes = JSON.stringify({
558
+ error: 'Missing required argument: skills (skill name or array of skill names).'
559
+ });
560
+ logToolCall('use_skills', '', errRes, agentName);
561
+ return errRes;
562
+ }
563
+
564
+ const tokenBudget = (typeof options === 'object' && options !== null && options.tokenBudget) ? parseInt(options.tokenBudget, 10) : 0;
565
+ const requestedSection = (typeof options === 'object' && options !== null && options.section) ? String(options.section).trim() : null;
566
+ const taskId = (typeof options === 'object' && options !== null && options.taskId) ? options.taskId : null;
567
+
568
+ if (taskId) {
569
+ for (const name of skillNames) {
570
+ getServedSkillsSet(taskId).add(normalizeLegacySkillName(name));
571
+ }
572
+ }
573
+
574
+ const ws = getWorkspaceRoot() || process.env.KONOHA_WORKSPACE || process.env.WORKSPACE_ROOT || process.cwd();
575
+ const mirrorRoots = [
576
+ path.join(ws, '.agents', 'skills'),
577
+ path.join(ws, 'src', 'templates', 'skills'),
578
+ path.join(HOME, '.agents', 'skills'),
579
+ path.join(ws, '.cursor', 'skills'),
580
+ path.join(ws, '.gemini', 'skills'),
581
+ path.join(ws, '.commandcode', 'skills'),
582
+ path.join(ws, '.claude', 'skills'),
583
+ path.join(ws, '.opencode', 'skills'),
584
+ path.join(ws, '.codex', 'skills'),
585
+ ];
586
+
587
+ function findInMirror(name) {
588
+ const norm = normalizeLegacySkillName(name);
589
+ for (const root of mirrorRoots) {
590
+ if (!fs.existsSync(root)) continue;
591
+ if (norm.includes('/')) {
592
+ const parts = norm.split('/');
593
+ const parentSkill = parts[0];
594
+ const subName = parts.slice(1).join('/');
595
+ const candidatePaths = [
596
+ path.join(root, parentSkill, 'references', `${subName}.md`),
597
+ path.join(root, parentSkill, 'references', subName),
598
+ path.join(root, parentSkill, `${subName}.md`),
599
+ path.join(root, parentSkill, subName, 'SKILL.md'),
600
+ path.join(root, `${norm}.md`),
601
+ path.join(root, norm, 'SKILL.md')
602
+ ];
603
+ for (const cp of candidatePaths) {
604
+ if (fs.existsSync(cp) && fs.statSync(cp).isFile()) {
605
+ return { filePath: cp, type: 'reference' };
606
+ }
607
+ }
608
+ } else {
609
+ const candidatePaths = [
610
+ path.join(root, norm, 'SKILL.md'),
611
+ path.join(root, `${norm}.md`),
612
+ path.join(root, norm)
613
+ ];
614
+ for (const cp of candidatePaths) {
615
+ if (fs.existsSync(cp) && fs.statSync(cp).isFile()) {
616
+ return { filePath: cp, type: 'skill' };
617
+ }
618
+ }
619
+ try {
620
+ const subs = fs.readdirSync(root, { withFileTypes: true });
621
+ for (const sub of subs) {
622
+ if (!sub.isDirectory()) continue;
623
+ const refPath = path.join(root, sub.name, 'references', `${norm}.md`);
624
+ if (fs.existsSync(refPath) && fs.statSync(refPath).isFile()) {
625
+ return { filePath: refPath, type: 'reference' };
626
+ }
627
+ }
628
+ } catch (_) { /* ignore */ }
629
+ }
630
+ }
631
+ return null;
632
+ }
633
+
634
+ const loadedSkills = [];
635
+ const allWarnings = [];
636
+
637
+ let conn = null;
638
+ try {
639
+ conn = getDb();
640
+ } catch (err) {
641
+ allWarnings.push(`Database connection failed: ${err.message}. Falling back to mirror skills.`);
642
+ }
643
+
644
+ for (const rawName of skillNames) {
645
+ const normName = normalizeLegacySkillName(rawName);
646
+ let row = null;
647
+ let source = 'database';
648
+ let warning = null;
649
+
650
+ if (conn) {
651
+ try {
652
+ row = conn.prepare(`
653
+ SELECT name, skill_name, type, tags, content, byte_size, line_count, file_path
654
+ FROM skills
655
+ WHERE name = ?
656
+ `).get(normName);
657
+
658
+ if (!row) {
659
+ row = conn.prepare(`
660
+ SELECT name, skill_name, type, tags, content, byte_size, line_count, file_path
661
+ FROM skills
662
+ WHERE name LIKE ?
663
+ LIMIT 1
664
+ `).get(`%/${normName}`);
665
+ }
666
+
667
+ if (row && !isPathVisible(row.file_path)) {
668
+ row = null;
669
+ }
670
+ } catch (dbErr) {
671
+ process.stderr.write(`[mcp konoha] DB lookup error for '${normName}': ${dbErr.message}\n`);
672
+ }
673
+ }
674
+
675
+ let content = '';
676
+ let skillType = 'skill';
677
+ let filePath = null;
678
+
679
+ if (row && row.content) {
680
+ content = row.content;
681
+ skillType = row.type || 'skill';
682
+ filePath = row.file_path;
683
+ source = 'database';
684
+ process.stderr.write(` → [use_skills] Retrieved '${normName}' from database (${row.byte_size || content.length} bytes)\n`);
685
+ } else {
686
+ warning = `Skill '${normName}' not found in database. Falling back to mirror skills.`;
687
+ process.stderr.write(` ⚠️ [use_skills] ${warning}\n`);
688
+ allWarnings.push(warning);
689
+
690
+ const mirrorHit = findInMirror(normName);
691
+ if (mirrorHit) {
692
+ try {
693
+ content = fs.readFileSync(mirrorHit.filePath, 'utf8');
694
+ skillType = mirrorHit.type;
695
+ filePath = mirrorHit.filePath;
696
+ source = 'mirror_fallback';
697
+ process.stderr.write(` → [use_skills] Retrieved '${normName}' from mirror: ${filePath} (${content.length} bytes)\n`);
698
+ } catch (readErr) {
699
+ warning = `Failed to read mirror skill '${normName}' from ${mirrorHit.filePath}: ${readErr.message}`;
700
+ allWarnings.push(warning);
701
+ }
702
+ } else {
703
+ warning = `Skill '${normName}' not found in database or mirror skills.`;
704
+ allWarnings.push(warning);
705
+ }
706
+ }
707
+
708
+ if (!content) {
709
+ loadedSkills.push({
710
+ name: normName,
711
+ status: 'not_found',
712
+ error: warning || `Skill '${normName}' not found.`,
713
+ source: 'none'
714
+ });
715
+ continue;
716
+ }
717
+
718
+ const shielded = shieldPromptInjection(content);
719
+ let finalContent = shielded;
720
+ let truncated = false;
721
+ let remainingSections = [];
722
+
723
+ if (tokenBudget > 0 || requestedSection) {
724
+ const maxChars = tokenBudget > 0 ? tokenBudget * 4 : Infinity;
725
+ const rawSections = shielded.split(/\n(?=#{1,3}\s)/);
726
+ if (rawSections.length > 1) {
727
+ if (requestedSection) {
728
+ const reqLower = requestedSection.toLowerCase().replace(/^#+/, '').trim();
729
+ const foundIdx = rawSections.findIndex(s => extractSectionTitle(s).toLowerCase().includes(reqLower));
730
+ if (foundIdx !== -1) {
731
+ finalContent = rawSections[foundIdx];
732
+ remainingSections = rawSections.filter((_, idx) => idx !== foundIdx).map(extractSectionTitle).slice(0, 10);
733
+ } else {
734
+ finalContent = rawSections[0];
735
+ remainingSections = rawSections.slice(1).map(extractSectionTitle).slice(0, 10);
736
+ }
737
+ } else {
738
+ finalContent = rawSections[0];
739
+ remainingSections = rawSections.slice(1).map(extractSectionTitle).slice(0, 10);
740
+ }
741
+ truncated = remainingSections.length > 0;
742
+ if (remainingSections.length > 0) {
743
+ finalContent += `\n\n[+${remainingSections.length} remaining sections: ${remainingSections.map(s => '#' + s).join(', ')}. Pass section parameter to read each.]`;
744
+ }
745
+ } else if (finalContent.length > maxChars) {
746
+ const truncRes = smartTruncate(finalContent, maxChars, normName);
747
+ finalContent = truncRes.text;
748
+ truncated = truncRes.truncated;
749
+ }
750
+ } else if (finalContent.length > MAX_CONTENT_SIZE) {
751
+ const truncRes = smartTruncate(finalContent, MAX_CONTENT_SIZE, normName);
752
+ finalContent = truncRes.text;
753
+ truncated = truncRes.truncated;
754
+ }
755
+
756
+ const item = {
757
+ name: normName,
758
+ type: skillType,
759
+ status: 'loaded',
760
+ source,
761
+ content: finalContent,
762
+ byte_size: Buffer.byteLength(finalContent, 'utf8'),
763
+ line_count: (finalContent.match(/\n/g) || []).length + 1,
764
+ truncated,
765
+ hash: contentHash(shielded)
766
+ };
767
+ if (warning) item.warning = warning;
768
+ if (remainingSections.length > 0) item.remaining_sections = remainingSections;
769
+ loadedSkills.push(item);
770
+ }
771
+
772
+ if (conn) {
773
+ try { conn.close(); } catch (_) { /* ignore */ }
774
+ }
775
+
776
+ let resPayload;
777
+ if (skillNames.length === 1 && loadedSkills.length === 1) {
778
+ const single = loadedSkills[0];
779
+ resPayload = {
780
+ ...single,
781
+ skills: loadedSkills,
782
+ warnings: allWarnings
783
+ };
784
+ } else {
785
+ resPayload = {
786
+ status: loadedSkills.some(s => s.status === 'loaded') ? 'success' : 'failed',
787
+ skills: loadedSkills,
788
+ warnings: allWarnings
789
+ };
790
+ }
791
+
792
+ const resStr = JSON.stringify(resPayload);
793
+ logToolCall('use_skills', skillNames.join(','), resStr, agentName);
794
+ return resStr;
795
+ }
796
+
524
797
  function optimizeReport(keyword = null, agentName = null) {
525
798
  process.stderr.write(`[mcp konoha] tool_call: optimize_report(keyword='${keyword}')\n`);
526
799
  const conn = getDb();
@@ -697,6 +970,7 @@ module.exports = {
697
970
  findSkill,
698
971
  listSkills,
699
972
  getSkill,
973
+ useSkills,
700
974
  optimizeReport,
701
975
  getAgentSkills,
702
976
  fuzzyResolveSkill,
@@ -10,7 +10,8 @@ const { spawnSync } = require('child_process');
10
10
  const personaMemory = require('../persona_memory');
11
11
  const { getWorkspaceRoot } = require('./runtime_state');
12
12
  const { detectActiveAgent } = require('./client_detection');
13
- const { findSkill, listSkills, getSkill, optimizeReport } = require('./skills');
13
+ const { findSkill, listSkills, getSkill, useSkills, optimizeReport } = require('./skills');
14
+ const { runAntiSlopAudit } = require('./anti_slop');
14
15
  const { buildFromSource, buildFromText } = require('./build_spec');
15
16
  const { getResolvedTaskDir, runSannin } = require('./workflow');
16
17
  const { runWebSearch } = require('./web_search');
@@ -93,6 +94,14 @@ function _executeToolInternal(toolName, args, agent) {
93
94
  taskId: args.task_id || args.taskId || args.session_id || args.sessionId || null
94
95
  });
95
96
  }
97
+ if (toolName === 'use_skills' || toolName === 'use_skill') {
98
+ const skillsArg = args.skills || args.name || args.skill || args.names;
99
+ return useSkills(skillsArg, agent, {
100
+ tokenBudget: args.token_budget || args.tokenBudget || args.budget || 0,
101
+ section: args.section || null,
102
+ taskId: args.task_id || args.taskId || args.session_id || args.sessionId || null
103
+ });
104
+ }
96
105
  if (toolName === 'optimize_report') {
97
106
  return optimizeReport(args.keyword, agent);
98
107
  }
@@ -322,6 +331,10 @@ function boundPersonaMemories(mems) {
322
331
  });
323
332
  }
324
333
 
334
+ if (toolName === 'anti_slop') {
335
+ return runAntiSlopAudit(args, agent);
336
+ }
337
+
325
338
  if (toolName === 'website_ai_detector') {
326
339
  const target = args.target || args.path || args.url || args.site;
327
340
  if (!target) return JSON.stringify({ error: 'Missing required argument: target (site directory path or http(s) URL)' });
@@ -1117,7 +1117,7 @@ function runMcpWorkflow(taskDir = null) {
1117
1117
  ? 'The mechanical gate requires a 100/100 aislop scan (zero findings of any severity) before synthesis.'
1118
1118
  : 'Run the two-step review (Step 1 aislop_scan, Step 2 anti-slop rules) and verify 0 findings.';
1119
1119
  const dispatch = workflowDispatch(resolvedTaskDir, status, 'review', 'kage');
1120
- fs.writeFileSync(path.join(resolvedTaskDir, 'delegate.md'), `agent: kage\npriority: critical\nPhase: Review\ndispatch_id: ${dispatch.id}\n\n## TASK\n\nVerify every task in status.json is completed, required files exist, validation evidence has no errors or warnings, security/rollback checks are documented. Run the TWO-STEP Zero-AI-Slop review: Step 1 aislop_scan (scanner), Step 2 anti-slop rule review (antislop skill Delivery Gate) — TARGET 100%: zero findings of any severity. ${gateTarget}${gate.enforced ? ` Current mechanical scan: score ${gate.score ?? 'n/a'}, findings ${gate.findings ?? 'n/a'}.` : ''} Write kage_review.json with approved, verified_task_ids, validation, security_reviewed, rollback_reviewed, ai_slop_findings, ai_slop_clean, and findings fields, then write result.md.\n`, 'utf8');
1120
+ fs.writeFileSync(path.join(resolvedTaskDir, 'delegate.md'), `agent: kage\npriority: critical\nPhase: Review\ndispatch_id: ${dispatch.id}\n\n## TASK\n\nVerify every task in status.json is completed, required files exist, validation evidence has no errors or warnings, security/rollback checks are documented. Run the TWO-STEP Zero-AI-Slop review: Step 1 aislop_scan (scanner), Step 2 call konoha.anti_slop tool (final verify zero slop across all changes & enforce antislop skill Delivery Gate) — TARGET 100%: zero findings of any severity. ${gateTarget}${gate.enforced ? ` Current mechanical scan: score ${gate.score ?? 'n/a'}, findings ${gate.findings ?? 'n/a'}.` : ''} Write kage_review.json with approved, verified_task_ids, validation, security_reviewed, rollback_reviewed, ai_slop_findings, ai_slop_clean, and findings fields, then write result.md.\n`, 'utf8');
1121
1121
  status.assigned_agent = 'kage';
1122
1122
  saveWorkflowStatus(resolvedTaskDir, status);
1123
1123
  return JSON.stringify({ status: 'ready', phase: 'review', agent: 'kage', dispatch_id: dispatch.id, task_dir: resolvedTaskDir, aislop_gate: gate });
@@ -438,6 +438,35 @@
438
438
  "additionalProperties": false
439
439
  }
440
440
  },
441
+ {
442
+ "name": "use_skills",
443
+ "description": "Load and activate specific skill(s) by name from the database, with automatic fallback to mirror skills and warning if missing in database.",
444
+ "inputSchema": {
445
+ "type": "object",
446
+ "properties": {
447
+ "skills": {
448
+ "description": "Skill name, comma-separated names, or array of skill names to load."
449
+ },
450
+ "name": {
451
+ "type": "string",
452
+ "description": "Alias for skills (single skill name)."
453
+ },
454
+ "agent": {
455
+ "type": "string"
456
+ },
457
+ "token_budget": {
458
+ "type": "number"
459
+ },
460
+ "section": {
461
+ "type": "string"
462
+ },
463
+ "task_id": {
464
+ "type": "string"
465
+ }
466
+ },
467
+ "additionalProperties": false
468
+ }
469
+ },
441
470
  {
442
471
  "name": "optimize_report",
443
472
  "description": "Analyze skill token footprint.",
@@ -1405,6 +1434,36 @@
1405
1434
  "additionalProperties": false
1406
1435
  }
1407
1436
  },
1437
+ {
1438
+ "name": "anti_slop",
1439
+ "description": "Perform final Zero-AI-Slop audit across changed files or target paths during Kage review, verifying zero AI slop findings and a perfect 100/100 score.",
1440
+ "inputSchema": {
1441
+ "type": "object",
1442
+ "properties": {
1443
+ "project_path": {
1444
+ "type": "string",
1445
+ "description": "Base directory to inspect (defaults to workspace root)."
1446
+ },
1447
+ "files": {
1448
+ "description": "Specific files or comma-separated file paths to audit."
1449
+ },
1450
+ "changed_files": {
1451
+ "type": "array",
1452
+ "items": { "type": "string" },
1453
+ "description": "Array of changed file paths to audit."
1454
+ },
1455
+ "task_id": {
1456
+ "type": "string",
1457
+ "description": "Associated SDLC task ID."
1458
+ },
1459
+ "strict": {
1460
+ "type": "boolean",
1461
+ "description": "Enforce strict zero tolerance for any slop pattern."
1462
+ }
1463
+ },
1464
+ "additionalProperties": false
1465
+ }
1466
+ },
1408
1467
  {
1409
1468
  "name": "qa_codify",
1410
1469
  "description": "Deterministically compiles and codifies an agent-browser flow JSON file into a Playwright test specification after verifying it via agent-browser batch.",
@@ -4,6 +4,7 @@
4
4
  purpose: MCP task triage, subagent selection, and orchestration
5
5
  skills:
6
6
  - sannin-skill
7
+ - antislop
7
8
  delegateWhen: Complex tasks requiring subagent delegation, task routing, or phase synthesis
8
9
  constraints: Router only — does not execute tasks. Base personality: High Effort + Instruct Style — direct action first, ADHD-friendly structured format, strictly ZERO conversational filler (banned: "hmmmm", "let me", "wait - but"), zero hallucination, strictly no lies, minimum 98% confidence gate. Use konoha MCP (get_skill) for skill reference loading. NEVER use semble. Write instructions to delegate.md and invoke subagent.
9
10
  workflow: Evaluate prompt → Write delegate.md → Invoke Subagent MCP Tool
@@ -19,6 +20,9 @@
19
20
  skills:
20
21
  - genin-skill
21
22
  - i-have-adhd
23
+ - antislop
24
+ - antislop-human
25
+ - antislop-code
22
26
  delegateWhen: Need to understand code structure, trace how something works, map dependencies
23
27
  constraints: Read-only — does not modify files. Base personality: High Effort + Instruct Style — direct action first, ADHD-friendly structured format, strictly ZERO conversational filler (banned: "hmmmm", "let me", "wait - but"), zero hallucination, strictly no lies, minimum 98% confidence gate. Call konoha.find_skill for skills. Call the semble MCP tools (search/find_related) directly for codebase search. Do NOT mix them. Do NOT call `semble` tools (search, find_related) for finding or locating skills, as `semble` is strictly a project code search engine and querying it for skills burns quota tokens. Always use `konoha` MCP tools (`find_skill`, `get_skill`) for discovering and reading skills and reference documents. NEVER use `semble` search for skills. NEVER use grep, glob, find, rg/ripgrep, or built-in Grep/Glob/SemanticSearch for codebase discovery — use semble MCP search/find_related only (always pass repo with absolute project path).
24
28
  workflow: Search symbols with `semble` → open relevant files → summarize with file paths and line numbers.
@@ -34,6 +38,8 @@
34
38
  skills:
35
39
  - kage-skill
36
40
  - antislop
41
+ - antislop-human
42
+ - antislop-code
37
43
  delegateWhen: Architecture decisions, security audits, complex refactoring, production incident analysis, technology selection
38
44
  constraints: Always assess risk, blast radius, and rollback plan. Minimum 98% confidence gate. Base personality: High Effort + Instruct Style — direct action first, ADHD-friendly structured format, strictly ZERO conversational filler (banned: "hmmmm", "let me", "wait - but"), zero hallucination, strictly no lies. Call konoha.find_skill for skills. Call the semble MCP tools (search/find_related) directly for codebase search. Do NOT mix them. Do NOT call `semble` tools (search, find_related) for finding or locating skills, as `semble` is strictly a project code search engine and querying it for skills burns quota tokens. Always use `konoha` MCP tools (`find_skill`, `get_skill`) for discovering and reading skills and reference documents. NEVER use `semble` search for skills. NEVER use grep, glob, find, rg/ripgrep, or built-in Grep/Glob/SemanticSearch for codebase discovery — use semble MCP search/find_related only (always pass repo with absolute project path).
39
45
  workflow: Deep analysis → trade-off matrix → prioritized recommendations → rollback procedures.
@@ -49,6 +55,9 @@
49
55
  skills:
50
56
  - chunin-skill
51
57
  - i-have-adhd
58
+ - antislop
59
+ - antislop-human
60
+ - antislop-code
52
61
  delegateWhen: Need external information, library docs, best practices, technology comparisons, compliance standards
53
62
  constraints: Call konoha.find_skill for skills. Call the semble MCP tools (search/find_related) directly for codebase search. Do NOT mix them. External research only — redirect codebase questions to @genin. Base personality: High Effort + Instruct Style — direct action first, ADHD-friendly structured format, strictly ZERO conversational filler (banned: "hmmmm", "let me", "wait - but"), zero hallucination, strictly no lies, minimum 98% confidence gate. Do NOT call `semble` tools (search, find_related) for finding or locating skills, as `semble` is strictly a project code search engine and querying it for skills burns quota tokens. Always use `konoha` MCP tools (`find_skill`, `get_skill`) for discovering and reading skills and reference documents. NEVER use `semble` search for skills. NEVER use grep, glob, find, rg/ripgrep, or built-in Grep/Glob/SemanticSearch for codebase discovery — use semble MCP search/find_related only (always pass repo with absolute project path).
54
63
  workflow: Decompose question → multi-query generation → parallel search → source ranking → evidence synthesis → cited report.
@@ -64,6 +73,11 @@
64
73
  skills:
65
74
  - jonin-skill
66
75
  - i-have-adhd
76
+ - antislop
77
+ - antislop-ui
78
+ - antislop-human
79
+ - antislop-layoutmobile
80
+ - antislop-code
67
81
  delegateWhen: UI design, component building, styling, layouts, animations, frontend development
68
82
  constraints: Visual excellence required — no basic/minimal designs. Use `agent-browser` for QA. Base personality: High Effort + Instruct Style — direct action first, ADHD-friendly structured format, strictly ZERO conversational filler (banned: "hmmmm", "let me", "wait - but"), zero hallucination, strictly no lies, minimum 98% confidence gate. Call konoha.find_skill for skills. Call the semble MCP tools (search/find_related) directly for codebase search. Do NOT mix them. Do NOT call `semble` tools (search, find_related) for finding or locating skills, as `semble` is strictly a project code search engine and querying it for skills burns quota tokens. Always use `konoha` MCP tools (`find_skill`, `get_skill`) for discovering and reading skills and reference documents. NEVER use `semble` search for skills. NEVER use grep, glob, find, rg/ripgrep, or built-in Grep/Glob/SemanticSearch for codebase discovery — use semble MCP search/find_related only (always pass repo with absolute project path).
69
83
  workflow: 4 Frameworks Supported (SvelteKit default | Next.js 16 | Nuxt 3 | Angular v19+) | pnpm + Tailwind v4.
@@ -79,6 +93,9 @@
79
93
  skills:
80
94
  - anbu-skill
81
95
  - i-have-adhd
96
+ - antislop
97
+ - antislop-human
98
+ - antislop-code
82
99
  delegateWhen: Backend development, database schema/migration, bug reports, build failures, infrastructure provisioning, security hardening, deployments, CI/CD, cybersecurity defense, penetration testing in dev/local environments, distributed messaging/caching, prompt engineering
83
100
  constraints: Minimal safe changes — diagnose/plan before building, validate with dry-runs and `agent-browser` QA tests. Base personality: High Effort + Instruct Style — direct action first, ADHD-friendly structured format, strictly ZERO conversational filler (banned: "hmmmm", "let me", "wait - but"), zero hallucination, strictly no lies, minimum 98% confidence gate. Call konoha.find_skill for skills. Call the semble MCP tools (search/find_related) directly for codebase search. Do NOT mix them. Do NOT call `semble` tools (search, find_related) for finding or locating skills, as `semble` is strictly a project code search engine and querying it for skills burns quota tokens. Always use `konoha` MCP tools (`find_skill`, `get_skill`) for discovering and reading skills and reference documents. NEVER use `semble` search for skills. NEVER use grep, glob, find, rg/ripgrep, or built-in Grep/Glob/SemanticSearch for codebase discovery — use semble MCP search/find_related only (always pass repo with absolute project path).
84
101
  workflow: Gather requirements/diagnose → design backend implementation/minimal fix → build features/implement fix → test/verify → report.
@@ -94,6 +111,10 @@
94
111
  skills:
95
112
  - tokubetsu-jonin-skill
96
113
  - i-have-adhd
114
+ - antislop
115
+ - antislop-copywriting
116
+ - antislop-human
117
+ - antislop-code
97
118
  delegateWhen: Technical writing, README creation, API specs, runbooks, onboarding guides, documentation updates, PDF reports, incident postmortems, RCA, technical blog articles, whitepapers, Word docs (docx), Excel spreadsheets (xlsx), PowerPoint presentations (pptx), publication-grade PDFs (pdf), and zero-AI human-style document writing
98
119
  constraints: Follow reader-first principles, include code examples, link references, enforce zero-AI human writing (0% AI detection, high perplexity and burstiness, metadata scrubbing), and adhere strictly to base personality: High Effort + Instruct Style (zero filler: banned "hmmmm", "let me", "wait - but", direct action first, zero hallucination, no lies, minimum 98% confidence gate). Call konoha.find_skill for skills. Call the semble MCP tools (search/find_related) directly for codebase search. Do NOT mix them. Do NOT call `semble` tools (search, find_related) for finding or locating skills, as `semble` is strictly a project code search engine and querying it for skills burns quota tokens. Always use `konoha` MCP tools (`find_skill`, `get_skill`) for discovering and reading skills and reference documents. NEVER use `semble` search for skills. NEVER use grep, glob, find, rg/ripgrep, or built-in Grep/Glob/SemanticSearch for codebase discovery — use semble MCP search/find_related only (always pass repo with absolute project path).
99
120
  workflow: Search skills/references with `konoha` → construct clear documentation → show code examples/commands → link references → enforce zero-AI writing and metadata scrubbing.
@@ -439,10 +439,10 @@ These standards apply to every build mode (`build_from_text`, clone-url flows, `
439
439
  - **High & Medium Risk Elimination**: The target repository manifests MUST be strictly clean from **High** (error/critical/malware/CVE) and **Medium** (warn/gptAnomaly/eval/anomaly) risk alerts (0 High, 0 Medium). Low-level risk (informational/monitor notices like telemetry or minified file alerts) is excluded from blocking delivery.
440
440
  - **Delivery Blocking**: If any High or Medium risk vulnerability or supply-chain issue is detected, delivery is strictly BLOCKED until dependencies are upgraded, overridden, or remediated.
441
441
  - **Standard Confidence Gate Report**: The Kage Reviewer Confidence Gate Report table must include the `Socket Security Gate` row verifying 0 High, 0 Medium findings before delivery.
442
- 75. **Canonical Skills Single Source of Truth & Database Parity (v2.1.13)**:
443
- - **Single Source of Truth (`src/canonical_skills.js`)**: Authoritatively defines `CANONICAL_SKILL_NAMES` (the 16 canonical ninja and core skills) and `KNOWN_EMBEDDED_REFERENCE_SKILLS` (190+ reference skills consolidated inside ninja skills).
442
+ 75. **Canonical Skills Single Source of Truth & Database Parity (v2.1.13 - v2.1.14)**:
443
+ - **Single Source of Truth (`src/canonical_skills.js`)**: Authoritatively defines `CANONICAL_SKILL_NAMES` (the 15 canonical ninja and core skills, with `helm-chart-scaffolding` consolidated into `anbu-skill`) and `KNOWN_EMBEDDED_REFERENCE_SKILLS` (190+ reference skills consolidated inside ninja skills).
444
444
  - **Automatic Deduplication Without Pruning**: `isEmbeddedReference()` in `src/migrate.js` and `src/mcp/skills.js` prevents duplicate standalone skill registration from mirror or project directories, while preserving all user custom skills.
445
- - **100% Database Parity**: The database `~/.konoha/konoha.db` must strictly contain exactly 16 skills of `type = 'skill'` and all referenced sub-skills indexed as `type = 'reference'`.
445
+ - **100% Database Parity**: The database `~/.konoha/konoha.db` strictly contains exactly 15 skills of `type = 'skill'` and all referenced sub-skills indexed as `type = 'reference'`.
446
446
  - **Skill & Mirror Preservation Invariant**: Strictly never prune, delete, or strip `~/.agents/skills/` or any client mirror trees (`.cursor/skills`, `.gemini/skills`, etc.).
447
447
  76. **Least-Privilege Security Boundaries & Scoped Client Tool Permissions (v2.1.13)**:
448
448
  - **Elimination of Wildcard Grants**: Replaces all `*` wildcard approvals in Command Code, Claude Code, and Cursor with explicit, enumerated tool names (`konoha_*`, `semble_*`, `aislop_*`).
@@ -450,4 +450,17 @@ These standards apply to every build mode (`build_from_text`, clone-url flows, `
450
450
  77. **LibreOffice Shim Integrity & Supply Chain Hardening (v2.1.13)**:
451
451
  - **Zero Dynamic Interposition**: Document generation tools (`soffice.py`) avoid dynamic, runtime compilation of untrusted C source code into shared objects (`LD_PRELOAD`).
452
452
  - **Integrity Validation**: Shims and prebuilt binaries must pass cryptographic hash validation or execute directly through safe standard LibreOffice headless CLI flags (`--headless --convert-to`).
453
+ 78. **Accurate Skill Resolution via `use_skills` MCP Tool (v2.1.14)**:
454
+ - **Precise Database Lookup**: Direct resolution from SQLite `konoha.db` by exact skill name (`use_skills({ skills: [...] })`).
455
+ - **Fallback Warning**: If not present in DB, logs structured warning to console and gracefully falls back to local mirror (`.agents/skills/` / `~/.agents/skills/`).
456
+ - **Eliminates Hallucination**: Prevents skill misattribution or agent capability hallucination.
457
+ 79. **Deterministic `anti_slop` Verification Pre-Gate & Tokubetsu-Jonin Human Document Design Layer (v2.1.14)**:
458
+ - **Anti-Slop Pre-Gate Tool (`anti_slop`)**: Executed in Kage pre-delivery review alongside `aislop_scan`. Validates zero AI-slop patterns (lazy placeholders, generic syntax comments, speculative over-engineering, conversational fluff).
459
+ - **Mandatory Agent Anti-Slop Matrix**: `antislop` in all official agents; `antislop-ui` in `jonin`; `antislop-copywriting` in `tokubetsu-jonin`; `antislop-human` in all official agents except `sannin`; `antislop-layoutmobile` in `jonin`; `antislop-code` in all official agents except `sannin`.
460
+ - **Tokubetsu-Jonin Human Document Design Layer**: Strict standards for Word/DOCX, PowerPoint/PPTX, Excel/XLSX, and PDF:
461
+ * 20 gradient themes (T01–T20) with 4-base-color gradients.
462
+ * Text rendered in medium slate `#64748B` on white/light backgrounds.
463
+ * Zero dark colors (no black, dark gray, dark blue anywhere).
464
+ * Typography pairing contracts: Georgia + Calibri (DOCX/reports), Segoe UI Semibold/Georgia + Segoe UI/Calibri (PPTX), Calibri (XLSX), Inter (PDF).
465
+ * Mandatory Kage review gate for all generated documents.
453
466
 
@@ -37,35 +37,60 @@ In the Konoha workflow, Tokubetsu-Jonin handles the documentation phase after al
37
37
  3. Include rollback and incident response notes.
38
38
 
39
39
  ## SOP 4: Professional Word Document (DOCX) Generation & Refinement
40
- 1. **Strict Light Mode Invariant (Zero Dark Style)**: Strictly enforce pure light mode. Never generate or refine documents with dark covers, dark headers, dark footers, or black/near-black fills. Backgrounds must be pure white (`#FFFFFF`) or pearl (`#F8FAFC`).
41
- 2. **3-Color Minimum Gradient Invariant**: When decorative color is needed for cover ribbons, header bands, or footer accents, create a smooth multi-stop gradient with a **minimum of 3 colors** (e.g., Crimson `#B91C1C` → Amber `#D97706` → Gold `#FDE68A`, or Sapphire `#1E3A8A` → Azure `#2563EB` → Sky `#60A5FA`).
42
- 3. **Burstiness ($\sigma/\mu \ge 0.85$) & Primary Archival Citations**: Every paragraph must juxtapose 1–4 word punchy assertions with 25–45 word multi-clause analytical sentences. Cite exact shelfmarks, docket numbers, and dates (e.g. *ANRI Algemene Secretarie Besluit*, *Arsip Koloniën*, *Mailrapport*, *Prasasti*, *Babad*).
43
- 4. **Executive Table Styling**: Table headers use light executive tint fills (`#F1F5F9`) with bold dark text (`#0F172A`), subtle grid borders (`#CBD5E1`), and numeric columns right-aligned.
44
- 5. **Exact Physical Page Budget**: For N-page targets, calibrate content (~200–260 words per page with table/callout) and add explicit page breaks (`doc.add_page_break()`) up to page N-1.
45
- 6. **Automated Container Scrubbing**: Run `scrub_opc_zip` with `re.IGNORECASE` to purge `python-docx` tags, normalize `docProps/app.xml` to `Microsoft Word for Windows`, and reset `core.xml` attributes.
46
- 7. **Strict Zero Watermark Invariant**: Documents must NEVER contain watermarks, diagonal background stamps ("DRAFT", "CONFIDENTIAL", "SAMPLE"), or translucent overlays.
40
+ 1. **Strict Light Mode & Zero Black/Dark Invariant**: Strictly enforce pure light mode. Never use black, dark gray, or dark blue anywhere (text, fills, lines, backgrounds). Only bright to mid-tone colors on pure white (`#FFFFFF`) or pearl (`#F8FAFC`) backgrounds, with text in **medium slate `#64748B`**.
41
+ 2. **20 Enterprise 4-Base-Color Themes**: Apply a 4-base-color gradient to the cover, header, and footer lines. Randomly pick ONE of the 20 canonical themes (T01–T20) per document and keep it consistent throughout:
42
+ - T01: `linear-gradient(90deg,#8A4FD0,#E8453C,#F08A24,#F7C948)`
43
+ - T02: `linear-gradient(90deg,#17B3A3,#3A8DDE,#8A4FD0,#E85DA0)`
44
+ - T03: `linear-gradient(90deg,#34B38A,#F7C948,#F08A24,#E85DA0)`
45
+ - T04: `linear-gradient(90deg,#3A8DDE,#17B3A3,#6FCF7A,#F7C948)`
46
+ - T05: `linear-gradient(90deg,#8A4FD0,#D6459E,#E8453C,#F5A04A)`
47
+ - T06: `linear-gradient(90deg,#5CC46A,#F7C948,#F08A24,#E8453C)`
48
+ - T07: `linear-gradient(90deg,#4F8DF0,#8A4FD0,#E85DA0,#F5A04A)`
49
+ - T08: `linear-gradient(90deg,#17B3A3,#6FCF7A,#F7C948,#F2705F)`
50
+ - T09: `linear-gradient(90deg,#3AA6C9,#8A4FD0,#E85DA0,#F7C948)`
51
+ - T10: `linear-gradient(90deg,#3A8DDE,#52D1BC,#8BCB4A,#F5A623)`
52
+ - T11: `linear-gradient(90deg,#8A4FD0,#E85DA0,#F2705F,#F7C948)`
53
+ - T12: `linear-gradient(90deg,#17B3A3,#8BCB4A,#F7C948,#E85D75)`
54
+ - T13: `linear-gradient(90deg,#4F8DF0,#D6459E,#E85D75,#F5A04A)`
55
+ - T14: `linear-gradient(90deg,#8A4FD0,#3A8DDE,#17B3A3,#8BCB4A)`
56
+ - T15: `linear-gradient(90deg,#E85DA0,#E8453C,#F08A24,#8BCB4A)`
57
+ - T16: `linear-gradient(90deg,#7C5CE0,#3A8DDE,#52D1BC,#6FCF7A)`
58
+ - T17: `linear-gradient(90deg,#E8453C,#F08A24,#F7C948,#8BCB4A)`
59
+ - T18: `linear-gradient(90deg,#3A8DDE,#8A4FD0,#D6459E,#F2705F)`
60
+ - T19: `linear-gradient(90deg,#17B3A3,#8BCB4A,#F7C948,#F08A24)`
61
+ - T20: `linear-gradient(90deg,#E85DA0,#F08A24,#F7C948,#17B3A3)`
62
+ 3. **Typography Contract**: Word/reports strictly use **Georgia (headings) + Calibri (body)** with consistent spacing, alignment, and visual hierarchy.
63
+ 4. **Burstiness ($\sigma/\mu \ge 0.85$) & Primary Archival Citations**: Clean human-written prose (no robotic, filler, or AI-sounding phrasing). Every paragraph juxtaposes punchy assertions with multi-clause analytical sentences, supported by verifiable primary citations and exact metrics.
64
+ 5. **Executive Table Styling**: Table headers use light executive tint fills (`#F1F5F9`) with medium slate text (`#64748B`), subtle grid borders (`#E2E8F0`), and numeric columns right-aligned.
65
+ 6. **Exact Physical Page Budget**: For N-page targets, calibrate content (~200–260 words per page with table/callout) and add explicit page breaks (`doc.add_page_break()`) up to page N-1.
66
+ 7. **Automated Container Scrubbing**: Run `scrub_opc_zip` with `re.IGNORECASE` to purge `python-docx` tags, normalize `docProps/app.xml` to `Microsoft Word for Windows`, and reset `core.xml` attributes.
67
+ 8. **Mandatory Kage Review Gate**: Always use Kage review in every generated DOCX document before final delivery.
47
68
 
48
69
  ## SOP 5: Executive Presentation (PPTX) Deck Design
49
- 1. **Strict Light Mode Invariant**: 100% pure white (`#FFFFFF`) or soft pearl (`#F8FAFC`) slide canvas on ALL slides (including title and conclusion slides). Dark navy or black presentation slides are strictly forbidden.
50
- 2. **3-Color Minimum Gradient Accent**: Title slide and section dividers must feature a smooth 3-color minimum gradient accent bar.
51
- 3. **Visual Hierarchy & Multi-Tier Cards**: 16:9 widescreen layout, 3 rounded rectangle cards per content slide (`#F8FAFC` background, subtle border `#E2E8F0`, 4px accent top strip) featuring Header Tag, Punchy Hook, Analytical Body, and Verifiable Quote.
52
- 4. **Metadata Scrubbing**: Run `scrub_opc_zip` to remove generator tags (`python-pptx`, `pptxgenjs`) from presentation core properties and slides.
53
- 5. **Strict Zero Watermark Invariant**: Presentation slides must NEVER contain watermarks, diagonal stamps, or background evaluation marks.
70
+ 1. **Strict Light Mode & Zero Black/Dark Invariant**: 100% pure white (`#FFFFFF`) or soft pearl (`#F8FAFC`) slide canvas on ALL slides. Never use black, dark gray, or dark blue anywhere. Text strictly in medium slate `#64748B`.
71
+ 2. **4-Base-Color Gradient Theme Accent**: Select ONE of the 20 canonical themes (T01–T20) consistently across title slide, section dividers, and header accent strips.
72
+ 3. **Typography Contract**: PowerPoint strictly uses **Segoe UI Semibold or Georgia (headings) + Segoe UI or Calibri (body)**.
73
+ 4. **Visual Hierarchy & Multi-Tier Cards**: 16:9 widescreen layout, 3 rounded rectangle cards per content slide (`#F8FAFC` background, subtle border `#E2E8F0`, 4px theme gradient accent top strip) featuring Header Tag, Punchy Hook, Analytical Body, and Verifiable Quote.
74
+ 5. **Metadata Scrubbing**: Run `scrub_opc_zip` to remove generator tags (`python-pptx`, `pptxgenjs`) from presentation core properties and slides.
75
+ 6. **Mandatory Kage Review Gate**: Always use Kage review in every generated PPTX presentation.
54
76
 
55
77
  ## SOP 6: Enterprise Financial & Data Spreadsheet (XLSX) Modeling
56
- 1. **Strict Light Mode Invariant**: Pure white sheet background (`#FFFFFF`). Never apply dark header bars or dark fills.
57
- 2. **3-Color Gradient Top Accent Ribbon**: Decorative row (row 3, height 4) featuring a 3-color minimum gradient above the table header.
58
- 3. **Table Headers & Cell Styling**: Light executive fill (`#F1F5F9` or `#ECFDF5`) with bold dark text (`#0F172A`), thin cell borders (`#CBD5E1`), alternating pearl row fills (`#F8FAFC`).
59
- 4. **Model Rigor**: Zero bare decimals; format currency (`$#,##0`), percentages (`0.0%`), and counts (`#,##0`). UPPERCASE formulas (`SUM`, `AVERAGE`, `COUNTIF`, `XLOOKUP`). Lowercase formulas are strictly rejected.
60
- 5. **View Setup**: Freeze panes on header row (`ws.freeze_panes = 'A5'`), explicitly show gridlines (`showGridLines = True`), and auto-fit column widths (+4 padding).
61
- 6. **Strict Zero Watermark Invariant**: Workbooks and sheets must NEVER contain watermarks, sheet header watermarks, or background stamps.
78
+ 1. **Strict Light Mode & Zero Black/Dark Invariant**: Pure white sheet background (`#FFFFFF`). Never use black, dark gray, or dark blue anywhere. Text strictly in medium slate `#64748B`.
79
+ 2. **4-Base-Color Theme Top Accent Ribbon**: Decorative ribbon (row 3, height 4) featuring colors from the chosen theme (T01–T20) above the table header.
80
+ 3. **Typography Contract**: Excel strictly uses **Calibri (headings and body)**.
81
+ 4. **Table Headers & Cell Styling**: Light executive fill (`#F1F5F9` or `#ECFDF5`) with medium slate text (`#64748B`), thin cell borders (`#E2E8F0`), alternating pearl row fills (`#F8FAFC`).
82
+ 5. **Model Rigor**: Zero bare decimals; format currency (`$#,##0`), percentages (`0.0%`), and counts (`#,##0`). UPPERCASE formulas (`SUM`, `AVERAGE`, `COUNTIF`, `XLOOKUP`). Lowercase formulas are strictly rejected.
83
+ 6. **View Setup**: Freeze panes on header row (`ws.freeze_panes = 'A5'`), explicitly show gridlines (`showGridLines = True`), and auto-fit column widths (+4 padding).
84
+ 7. **Mandatory Kage Review Gate**: Always use Kage review in every generated XLSX spreadsheet.
62
85
 
63
86
  ## SOP 7: Publication-Grade PDF Generation
64
- 1. **Strict Light Mode Invariant**: Pure white page backgrounds (`#FFFFFF`). Dark theme covers, pages, or fills are strictly prohibited.
65
- 2. **CSS Paged Media Isolation**: `@page { size: A4 portrait; margin: 16mm 18mm 16mm 18mm; @top-right { ... } @bottom-right { content: "Halaman " counter(page) " dari " counter(pages); } }`. Wrap every page section in `<div class="page">` with `page-break-after: always; box-sizing: border-box;`.
66
- 3. **Executive Callout Boxes**: Light tinted background (`#F8FAFC` or `#F0F9FF`) with a 3-color gradient left border accent.
67
- 4. **Metadata Scrubbing & Sanitization**: Purge automated PDF library tags (`ReportLab`, `WeasyPrint`) using `sanitize_pdf` with `pydyf.Dictionary()` (Title, Author, Creator `Adobe InDesign 19.0`, Producer `Acrobat Distiller 24.0`).
68
- 5. **Strict Zero Watermark Invariant**: PDFs must NEVER contain watermarks, diagonal background stamps ("DRAFT", "CONFIDENTIAL", "SAMPLE"), or translucent overlays.
87
+ 1. **Strict Light Mode & Zero Black/Dark Invariant**: Pure white page backgrounds (`#FFFFFF`). Never use black, dark gray, or dark blue anywhere. Text strictly in medium slate `#64748B`.
88
+ 2. **4-Base-Color Gradient Theme**: Apply the selected canonical theme (T01–T20) across cover, header, and footer lines consistently.
89
+ 3. **Typography Contract**: PDF/digital strictly uses **Inter (headings and body)**.
90
+ 4. **CSS Paged Media Isolation**: `@page { size: A4 portrait; margin: 16mm 18mm 16mm 18mm; @top-right { ... } @bottom-right { content: "Halaman " counter(page) " dari " counter(pages); } }`. Wrap every page section in `<div class="page">` with `page-break-after: always; box-sizing: border-box;`.
91
+ 5. **Executive Callout Boxes**: Light tinted background (`#F8FAFC` or `#F0F9FF`) with a 4-color gradient left border accent.
92
+ 6. **Metadata Scrubbing & Sanitization**: Purge automated PDF library tags (`ReportLab`, `WeasyPrint`) using `sanitize_pdf` with `pydyf.Dictionary()` (Title, Author, Creator `Adobe InDesign 19.0`, Producer `Acrobat Distiller 24.0`).
93
+ 7. **Mandatory Kage Review Gate**: Always use Kage review in every generated PDF document.
69
94
 
70
95
  ## SOP 8: Zero-AI Human Voice & Authenticity Standard
71
96
  1. **Mathematical Burstiness Target ($\sigma/\mu \ge 0.85$)**: Enforce extreme sentence length variance within every single paragraph to defeat sliding-window AI classifiers (preventing the 21.9% detection failure).