Skip to content

feat(goal): /goal に DynamicWorkflows + Verify 必須ゲート(CodeRabbit/Codex/security) を明記 - #300

Merged
Kensan196948G merged 3 commits into
mainfrom
feat/goal-dynamic-workflows
May 29, 2026
Merged

Kensan196948G merged 3 commits into
mainfrom
feat/goal-dynamic-workflows

Conversation

@Kensan196948G

@Kensan196948G Kensan196948G commented May 29, 2026 •

Copy link
Copy Markdown
Owner

📌 背景

Windows/Linux 両 CLI が v2.1.156 native で dynamic workflows が利用可能と実測確定。機能は「存在する」が、CTO が実際に活用するには /goal 標準指示への組み込みが効果的(ユーザー選択: 強め)。

🛠 変更

START_PROMPT.md の /goal 行に、AgentTeams と同格で DynamicWorkflows 活用指針を追記:

大規模監査・横断調査・多観点設計の場面では DynamicWorkflows機能(deep-research等)も token残量70%未満 かつ 残り60分以上 を条件に積極活用してください(ultracode既定化は禁止)。

  • mis-trigger 回避: DynamicWorkflows(1語・bare "workflow" を避ける) + slash なし deep-research(コマンド誤認防止)。/goal は UI コマンド引数なのでブート時 workflow 化はしない設計
  • ガードレール保持: token<70% / 残≥60min / ultracode 既定化禁止(core/04 と整合)
  • verify-goal-set.js: 必須キーワードに DynamicWorkflows 追加(8→9)、カウント表示を動的化

✅ 検証

node .claude/claudeos/scripts/hooks/verify-goal-set.js
→ ✅ 必須キーワード 9/9 整合 (DynamicWorkflows 含む /goal 抽出確認)

配布

START_PROMPT.md は launcher (Start-ClaudeCode.ps1 / Linux cron) が中央読込し全プロジェクトに渡すため、merge + Linux git pull で全プロジェクトに反映。per-project 配布不要。

影響範囲

  • /goal 行への 1 文追記 + キーワード 1 個追加のみ。既存 8 キーワード・他指示は不変。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • その他(Chores)
    • AI開発ワークフローの指示を更新し、トークン残量70%未満かつ残り時間60分以上のときに動的ワークフローを優先活用する条件を明確化しました。
    • 「ultracodeの既定化は禁止」を明示し、自動既定化の適用を防止します。
    • リリース安定判定前に必須となるレビュー/スキャン(CodeRabbit/Codexレビュー、gitleaks・シークレット検出・npm audit等のセキュリティスキャン)を明確化し、特定の自動レビューは自律ループで実行しない旨を追記しました。

Review Change Stack

Windows/Linux 両 CLI が v2.1.156 native で dynamic workflows 利用可と実測確定したため、
CTO が適切な場面で実際に活用するよう /goal 標準指示に組み込む (ユーザー選択: 強め)。

- START_PROMPT.md の /goal 行: 「大規模監査/横断調査/多観点設計で token<70% かつ
  残≥60min なら DynamicWorkflows(deep-research 等) を積極活用・ultracode 既定化禁止」を追記
- mis-trigger 回避: DynamicWorkflows(1語) + slash なし deep-research で記述
- verify-goal-set.js: 必須キーワードに DynamicWorkflows 追加 (8→9)、カウント表示を動的化

検証: verify-goal-set.js が「必須キーワード 9/9 整合」を確認。START_PROMPT は launcher 経由で
全プロジェクトに中央配布される (Linux git pull で反映)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 29, 2026 •

Copy link
Copy Markdown

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "ignore_dot_files"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 24efee8b-d534-43b4-a13f-a4bbfc8c90c9

📥 Commits

Reviewing files that changed from the base of the PR and between 6ccd79a and 7ed88ce.

⛔ Files ignored due to path filters (1)
  • .claude/claudeos/scripts/hooks/verify-goal-set.js is excluded by none and included by none
📒 Files selected for processing (1)
  • Claude/templates/claude/START_PROMPT.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • Claude/templates/claude/START_PROMPT.md

Walkthrough

Claude/templates/claude/START_PROMPT.md の先頭 /goal 指示文に、DynamicWorkflows 活用条件(token残量70%未満かつ残り60分以上)と「ultracode既定化は禁止」を追加し、98行目付近の Verify Mandatory を更新して必須レビュー/スキャン手段と ultrareview の自動実行不可を明記しました。

Changes

START_PROMPT 指示文更新

Layer / File(s) Summary
先頭 /goal 指示文への条件追加
Claude/templates/claude/START_PROMPT.md
/goal 指示文に、DynamicWorkflows(deep-research等)を token 残量70%未満かつ残り60分以上の条件下で積極活用する指示と「ultracode既定化は禁止」を追記しました。
Verify Mandatory 文言の拡張
Claude/templates/claude/START_PROMPT.md
Verify Mandatory 行を更新し、CodeRabbit review / Codex review(利用可能時)/ security scan(gitleaks・secret・npm audit)を必須実施として明記し、ultrareview(Gate-2b)は自律ループで自動実行しない旨を追記しました。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PRタイトルは、/goal指示にDynamicWorkflowsと必須検証ゲート(CodeRabbit/Codex/security scan)を追加する変更を正確に要約しており、主要な変更内容を明確に反映しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/goal-dynamic-workflows

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Claude/templates/claude/START_PROMPT.md (1)

10-11: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

必須キーワード数の説明が古いです。

Line 11 の「8 個整合」は、今回の 8→9 変更と不整合です。固定値を避けて「必須キーワード整合をチェック」のような動的表現に更新してください。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Claude/templates/claude/START_PROMPT.md` around lines 10 - 11, Update the
hardcoded "8 個整合" wording in the SessionStart description to a dynamic phrasing
(e.g., "必須キーワード整合をチェック") so it no longer references a specific count; edit the
START_PROMPT.md text that describes the SessionStart hook (verify-goal-set.js)
and replace the exact token "8 個整合" with a neutral/dynamic expression that
conveys checking required keyword alignment.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Claude/templates/claude/START_PROMPT.md`:
- Line 1: The prompt text currently says "token残量70%未満" but the runtime gate
checks tokenUsedPct < 70 (usage percentage), so update the START_PROMPT.md
phrase to match the implementation by changing "token残量70%未満" to
"token使用率70%未満"; verify consistency with the check in session-start.js (the
tokenUsedPct < 70 condition) so wording and logic align.

---

Outside diff comments:
In `@Claude/templates/claude/START_PROMPT.md`:
- Around line 10-11: Update the hardcoded "8 個整合" wording in the SessionStart
description to a dynamic phrasing (e.g., "必須キーワード整合をチェック") so it no longer
references a specific count; edit the START_PROMPT.md text that describes the
SessionStart hook (verify-goal-set.js) and replace the exact token "8 個整合" with
a neutral/dynamic expression that conveys checking required keyword alignment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 46df6200-37f1-4f55-ac54-b51c57419cfc

📥 Commits

Reviewing files that changed from the base of the PR and between 2393f50 and b97dd12.

⛔ Files ignored due to path filters (1)
  • .claude/claudeos/scripts/hooks/verify-goal-set.js is excluded by none and included by none
📒 Files selected for processing (1)
  • Claude/templates/claude/START_PROMPT.md

Comment thread Claude/templates/claude/START_PROMPT.md Outdated
Kensan (Enterprise IT Team) and others added 2 commits May 29, 2026 10:20
CodeRabbit 指摘 (Major): /goal の「token残量70%未満」が session-start.js の
tokenUsedPct < 70 (使用率70%未満) と逆向きだった。実装・core/04「token消費<70%」に
合わせて「token使用率70%未満」に統一。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…上位原則に明記

ユーザー要望: Codex review / CodeRabbit review / security scan を START_PROMPT に格上げ。
core §8/§8.5/§11 + STABLE §9 で既に指示済みだが、ブート指示に明記して強制力を上げる。

- /goal 行: Verify で CodeRabbit review・Codex review(利用可能時)・security scan
  (gitleaks/secret/npm audit) を必ず実施し STABLE 判定の前提とする旨を追記
- 最上位原則: Verify Mandatory を具体化 (3 ゲート + 参照 + ultrareview は自律実行しない注記)
- Codex は §0 に従い「利用可能時」(任意)。ultrareview(Gate-2b) は課金・人手起動のため除外
- verify-goal-set.js: 必須キーワードに CodeRabbit / security 追加 (9→11)

検証: verify-goal-set.js が「必須キーワード 11/11 整合」を確認。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Kensan196948G Kensan196948G changed the title feat(goal): /goal に DynamicWorkflows 活用指針を追記 (AgentTeams と同格) feat(goal): /goal に DynamicWorkflows + Verify 必須ゲート(CodeRabbit/Codex/security) を明記 May 29, 2026
@Kensan196948G

Copy link
Copy Markdown
Owner Author

追加コミット 7ed88ce — Verify 必須ゲートを /goal + 最上位原則に明記

ユーザー要望により Codex review / CodeRabbit review / security scan を START_PROMPT に格上げ(core §8/§8.5/§11 で既に指示済みだが、ブート指示に明記して強制力を上げる)。

  • /goal 行: 「Verify では CodeRabbit review・Codex review(利用可能時)・security scan(gitleaks/secret/npm audit)を必ず実施し STABLE 判定の前提とする」を追記
  • 最上位原則: Verify Mandatory を具体化(3 ゲート + 参照先 + ultrareview 自律実行しない注記)
  • Codex は「利用可能時」(§0 準拠で任意)/ ultrareview(Gate-2b) は除外(課金・人手起動)
  • verify-goal-set.js: 必須キーワードに CodeRabbit / security 追加(9→11)

検証: verify-goal-set.js が「必須キーワード 11/11 整合」を確認。token 文言修正(CodeRabbit 指摘)も 6ccd79a で反映済み。

@Kensan196948G
Kensan196948G merged commit 5dc5c10 into main May 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant