fix(kyberforge): remove dead plugin-scope branch from validate.sh
check_file()'s is_plugin_scope param and its plugin-silently-ignored field check were unreachable dead code left over from the issue #89 restructure: plugin/APM scope now exits via check_apm_agent_file() before check_file() is ever called, so is_plugin was always False. Remove the param, its branch, the unused plugin_ignored_fields parse, the now-stale field-inventory.md section, and the SKILL.md mention. Found via post-implementation review of issue #89.
This commit is contained in:
@@ -78,7 +78,6 @@ def parse_section_tokens(content, section_name):
|
||||
|
||||
cc_only_fields = parse_section_tokens(inv_content, 'claude-code-only-fields')
|
||||
copilot_only_fields = parse_section_tokens(inv_content, 'copilot-only-fields')
|
||||
plugin_ignored_fields = parse_section_tokens(inv_content, 'plugin-silently-ignored-fields')
|
||||
apm_agent_allowlist = parse_section_tokens(inv_content, 'apm-agent-allowlist')
|
||||
|
||||
# Tools the runtime withholds from subagents regardless of the tools field
|
||||
@@ -239,7 +238,7 @@ else: # user
|
||||
counterpart = os.path.join(home, '.claude', 'agents', name_stem + '.md')
|
||||
counterpart_provider = 'claude-code'
|
||||
|
||||
def check_file(fpath, file_provider, is_plugin_scope):
|
||||
def check_file(fpath, file_provider):
|
||||
local_fname = os.path.basename(fpath)
|
||||
with open(fpath) as f:
|
||||
content = f.read()
|
||||
@@ -299,13 +298,6 @@ def check_file(fpath, file_provider, is_plugin_scope):
|
||||
if key in copilot_only_fields:
|
||||
fail(f"Copilot-only field '{key}' present in CC file — {local_fname}")
|
||||
|
||||
# Silently-ignored fields in plugin-scope CC file
|
||||
if file_provider == 'claude-code' and is_plugin_scope:
|
||||
fm_keys = get_frontmatter_keys(fm)
|
||||
for key in sorted(fm_keys):
|
||||
if key in plugin_ignored_fields:
|
||||
fail(f"plugin-silently-ignored field '{key}' present in plugin-scope CC file — {local_fname}")
|
||||
|
||||
# Subagent-unavailable tools listed in tools field
|
||||
tools = extract_tools_list(fm)
|
||||
unavailable = tools & SUBAGENT_UNAVAILABLE_TOOLS
|
||||
@@ -318,9 +310,8 @@ if not os.path.isfile(counterpart):
|
||||
sys.exit(1)
|
||||
|
||||
# --- Check both files ---
|
||||
is_plugin = (scope == 'plugin')
|
||||
check_file(agent_file, provider, is_plugin)
|
||||
check_file(counterpart, counterpart_provider, is_plugin)
|
||||
check_file(agent_file, provider)
|
||||
check_file(counterpart, counterpart_provider)
|
||||
|
||||
for s in suggestions:
|
||||
print(f"SUGGESTION {s}")
|
||||
|
||||
Reference in New Issue
Block a user