@takagaki/cortex-decisions-viewer 0.4.39 → 0.4.41

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 (2) hide show
  1. package/dist/render.js +31 -17
  2. package/package.json +1 -1
package/dist/render.js CHANGED
@@ -574,23 +574,28 @@ a:hover { text-decoration: underline; }
574
574
  .detail-head > div:first-child { flex: 1 1 auto; min-width: 0; }
575
575
  .detail-title { font-size: 24px; font-weight: 700; margin: 0 0 10px; line-height: 1.4; }
576
576
  .detail-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 16px; }
577
+ /* GitHubで編集・つながり等の副次アクション。ヘッダーの .gh-btn と同じダーク(GitHubカラー)+リキッドグラスで揃える */
577
578
  .edit-btn {
578
- -webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%);
579
+ -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
579
580
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
580
- padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius);
581
- background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600;
582
- box-shadow: var(--shadow); white-space: nowrap;
581
+ padding: 8px 16px; border-radius: 999px;
582
+ border: 1px solid rgba(255,255,255,0.35); background: rgba(28,32,40,0.82); color: #fff;
583
+ font-size: 13px; font-weight: 600; white-space: nowrap;
584
+ box-shadow: 0 2px 10px rgba(20,30,60,0.25), inset 0 1px 0 rgba(255,255,255,0.25);
583
585
  }
584
- .edit-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
586
+ .edit-btn:hover { background: rgba(0,0,0,0.88); text-decoration: none; }
587
+ .edit-btn svg { width: 15px; height: 15px; }
585
588
  /* ---- AI導線ボタン(AIで編集・+AIで登録。claude.ai/code へのディープリンク・AIアクションはオレンジ系で統一) ---- */
589
+ /* AIアクション(AIで編集・+AIで登録・AIに聞く)はヘッダーの .ask-ai-btn と同じ塗りで統一する */
586
590
  .ai-edit-btn {
587
- -webkit-backdrop-filter: blur(10px) saturate(150%); backdrop-filter: blur(10px) saturate(150%);
591
+ -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
588
592
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
589
- padding: 8px 14px; border: 1px solid rgba(217,119,87,0.55); border-radius: var(--radius);
590
- background: rgba(217,119,87,0.1); color: #b45309; font-size: 13.5px; font-weight: 600;
591
- box-shadow: var(--shadow); white-space: nowrap;
593
+ padding: 8px 16px; border-radius: 999px;
594
+ border: 1px solid rgba(255,255,255,0.55); background: rgba(217,119,87,0.82); color: #fff;
595
+ font-size: 13px; font-weight: 600; white-space: nowrap;
596
+ box-shadow: 0 2px 10px rgba(190,90,60,0.3), inset 0 1px 0 rgba(255,255,255,0.45);
592
597
  }
593
- .ai-edit-btn:hover { background: rgba(217,119,87,0.18); border-color: rgba(217,119,87,0.85); text-decoration: none; }
598
+ .ai-edit-btn:hover { background: rgba(194,94,63,0.92); text-decoration: none; }
594
599
  .ai-add-bar { margin-bottom: 16px; }
595
600
  .ai-add-btn {
596
601
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px;
@@ -947,6 +952,14 @@ const CLIENT_JS = `
947
952
  // 公開範囲の規律(内部限定情報を書かない等)は各区画の README.md に書いてあるので、プロンプトには重ねない。
948
953
  // 顧客も押すボタンなので、内側の運用事情を文面に出さない。
949
954
  var AI_COMMON = "";
955
+ // Home(案件の入口)のAI編集。Gold層の4区画と違い規約READMEが無いので、Home自身を読ませて直させる。
956
+ // 「この案件が目指すもの」はAIが判断の方向を決める材料なので、未記入なら埋めることを促す。
957
+ var HOME_EDIT_PROMPT = [
958
+ "Cortex/Home.md を読んでから、この案件の入口ページを修正してください。",
959
+ "何を直すかは、まずわたしに質問してください。「この案件が目指すもの」が未記入なら、そこを埋めるところから始めてください(解きたいこと=誰の何の課題をどう解くか/達成した状態=どうなったら成功か)。",
960
+ "frontmatter(識別カード・engine 設定)は触らないでください。日付・進捗・実績値は書かないでください(変わるものの正本は課題管理ツール等の外部にあります)。",
961
+ "書き込む前に、変更内容を提示して承認を得てください。",
962
+ ].join("\\n");
950
963
  var GOLD_SKILL = {
951
964
  "Decisions": {
952
965
  skill: "update-decision",
@@ -1247,8 +1260,9 @@ const CLIENT_JS = `
1247
1260
  var ai = h.fm ? adoptionInfo(h.fm.adoption) : null;
1248
1261
  if (ai) titleWrap.appendChild(el("span", { class: "chip adoption-" + String(h.fm.adoption), text: ai.label }));
1249
1262
  head.appendChild(titleWrap);
1263
+ head.appendChild(el("a", { class: "ai-edit-btn", href: codeUrl(HOME_EDIT_PROMPT), target: "_blank", rel: "noopener", text: "AIで編集" }));
1250
1264
  if (h.editUrl) {
1251
- head.appendChild(el("a", { class: "edit-btn", href: h.editUrl, target: "_blank", rel: "noopener", text: "✏️ GitHubで編集" }));
1265
+ head.appendChild(el("a", { class: "edit-btn", href: h.editUrl, target: "_blank", rel: "noopener", html: '${GITHUB_ICON}<span>GitHubで編集</span>' }));
1252
1266
  }
1253
1267
  app.appendChild(head);
1254
1268
  var homeBody = el("div", { class: "body" });
@@ -1822,11 +1836,11 @@ const CLIENT_JS = `
1822
1836
  var traceBtn2 = el("a", { class: "edit-btn", href: "?tab=graph", text: "🕸 つながり" });
1823
1837
  traceBtn2.addEventListener("click", function (ev) { ev.preventDefault(); openExplorerFor(r); });
1824
1838
  head.appendChild(traceBtn2);
1825
- if (r.editUrl) {
1826
- head.appendChild(el("a", { class: "edit-btn", href: r.editUrl, target: "_blank", rel: "noopener", text: "✏️ GitHubで編集" }));
1827
- }
1828
1839
  var aiEditR = aiEditBtn(r, r._section, r.title);
1829
1840
  if (aiEditR) head.appendChild(aiEditR);
1841
+ if (r.editUrl) {
1842
+ head.appendChild(el("a", { class: "edit-btn", href: r.editUrl, target: "_blank", rel: "noopener", html: '${GITHUB_ICON}<span>GitHubで編集</span>' }));
1843
+ }
1830
1844
  app.appendChild(head);
1831
1845
 
1832
1846
  app.appendChild(el("div", { class: "detail-meta" }, [
@@ -2475,11 +2489,11 @@ const CLIENT_JS = `
2475
2489
  var traceBtn = el("a", { class: "edit-btn", href: "?tab=graph", text: "🕸 つながり" });
2476
2490
  traceBtn.addEventListener("click", function (ev) { ev.preventDefault(); openExplorerFor(d); });
2477
2491
  head.appendChild(traceBtn);
2478
- if (d.editUrl) {
2479
- head.appendChild(el("a", { class: "edit-btn", href: d.editUrl, target: "_blank", rel: "noopener", text: "✏️ GitHubで編集" }));
2480
- }
2481
2492
  var aiEditD = aiEditBtn(d, "Decisions", d.title);
2482
2493
  if (aiEditD) head.appendChild(aiEditD);
2494
+ if (d.editUrl) {
2495
+ head.appendChild(el("a", { class: "edit-btn", href: d.editUrl, target: "_blank", rel: "noopener", html: '${GITHUB_ICON}<span>GitHubで編集</span>' }));
2496
+ }
2483
2497
  app.appendChild(head);
2484
2498
 
2485
2499
  var meta = el("div", { class: "detail-meta" }, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takagaki/cortex-decisions-viewer",
3
- "version": "0.4.39",
3
+ "version": "0.4.41",
4
4
  "description": "Cortexの意思決定記録(Decisions/*.md)を静的サイトにビルドして閲覧する。各レコードに「Edit on GitHub」リンクを付与する。",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,