How Skill Evolution Mode Detects CNIPA Policy Changes Without Automatic Workflow Modification

Skill evolution mode (mode C) monitors China National Intellectual Property Administration (CNIPA) updates through explicit user activation, web search pipelines, and human-in-the-loop approval, ensuring zero automatic workflow changes.

The handsomestWei/patent-disclosure-skill repository implements a sophisticated skill evolution mechanism that balances policy awareness with workflow integrity. This article explains how the system detects CNIPA regulatory shifts while guaranteeing that no automatic modifications ever alter the core patent disclosure workflow.

Explicit User Activation Prevents Background Automation

The evolution mode operates strictly on-demand. There is no daemon, cron job, or background watcher monitoring CNIPA servers continuously.

Users trigger the mode through:

  • Voice command: saying "技能进化" (skill evolution)
  • Slash command: invoking /patent-evolve

Upon activation, the skill follows a rigid sequence defined in prompts/evolution/intake.md:

  1. Load safety constraints from prompts/evolution/guardrails.md
  2. Execute the research pipeline via prompts/evolution/research.md
  3. Generate backlog entries through prompts/evolution/emit_backlog.md
  4. Pause for human confirmation before any permanent change

This explicit trigger architecture ensures that CNIPA monitoring only occurs when a human deliberately requests it.

Web Search Plus WebFetch Pipeline for Evidence Gathering

The prompts/evolution/research.md prompt orchestrates a two-stage information retrieval system that combines live web search with targeted content extraction.

Stage 1: Scoped WebSearch

The research prompt constructs CNIPA-focused queries using keywords such as:

  • "国家知识产权局 专利审查指南 修改 人工智能"
  • "CNIPA patent examination guidelines amendment"

Results are time-bounded to the most recent 12 months, preventing outdated policy versions from polluting the analysis.

Stage 2: URL Verification and WebFetch

For each search result, the skill:

  • Validates the source against an A/B whitelist
  • Fetches content using WebFetch or curl capability
  • Extracts title, publication date, and relevant policy paragraphs

The whitelist enforces strict provenance requirements:

Tier Domains Usage
A cnipa.gov.cn Primary evidence for policy changes
B gov.cn government gazettes Supporting regulatory context
C All other sources Rejected — never drives skill evolution

This tiered trust model ensures that only authoritative CNIPA communications influence the skill's knowledge base.

Backlog Generation Instead of Direct Modification

Raw findings are never written directly to version-controlled files. Instead, prompts/evolution/emit_backlog.md produces time-stamped markdown files following the schema defined in references/schemas/evolution_backlog.schema.yaml:


# Backlog emission workflow (from emit_backlog.md logic)

backlog_entry = {
    "source_url": validated_url,      # Must match A/B whitelist

    "publish_date": extracted_date,   # ISO-8601 format

    "tags": ["审查工具", "AI审查"],   # Categorized impact areas

    "evidence_tier": "A",             # A or B only

    "summary": extracted_paragraph    # Relevant policy excerpt

}
output_path = f"outputs/evolution/EVOL-{timestamp}.md"

The outputs/evolution/ directory is git-ignored (outputs/ appears in .gitignore), meaning:

  • No automatic commits occur
  • Repository state remains unmodified
  • Generated files exist only in runtime environment

Human Review Gate: The Sole Modification Point

After backlog generation, the skill enters a blocking wait state. The prompts/evolution/apply_after_confirm.md routine presents findings to a human reviewer through the chat interface or review queue.

Only upon explicit confirmation does the system:

  1. Copy approved backlog entries from outputs/evolution/
  2. Paste into version-controlled docs/evolution/ directory
  3. Stage changes for human-git-commit (still not automatic)

This design guarantees that every permanent modification to skill behavior passes through human judgment. The source code contains no path that automatically applies discovered policy changes to the workflow.

Optional Soft Nudge: Zero Workflow Impact

The prompts/evolution/soft_nudge.md component provides a minimal awareness mechanism with strict boundaries:

  • Inserts a single optional sentence in the final disclosure output
  • Reminds users of relevant policy context detected during evolution mode
  • Never written into archival disclosure documents
  • Does not trigger re-run of evolution mode or any automated follow-up

The soft nudge frequency is capped to prevent notification fatigue, and its content is purely informational with no procedural consequences.

Complete Activation Example


# User invokes evolution mode

/patent-evolve

# Internal skill execution flow (modeled from SKILL.md and prompt sequence)

def skill_evolution_mode():
    # Phase 1: Safety initialization

    guardrails = load_prompt("prompts/evolution/guardrails.md")
    assert "禁止自动修改工作流" in guardrails  # Automatic modification prohibited

    
    # Phase 2: User intent confirmation (intake.md)

    intake_plan = load_prompt("prompts/evolution/intake.md")
    
    # Phase 3: Live CNIPA research (research.md)

    search_results = web_search(
        query="国家知识产权局 专利审查指南 修改 site:cnipa.gov.cn",
        time_range="past_12_months"
    )
    verified_sources = [fetch_and_validate(url) for url in search_results 
                       if is_whitelisted(url, tier=['A', 'B'])]
    
    # Phase 4: Non-committal backlog generation (emit_backlog.md)

    backlog_file = f"outputs/evolution/EVOL-{datetime.now():%Y%m%d-%H%M}.md"
    write_yaml_schema_backlog(backlog_file, verified_sources)
    
    # Phase 5: BLOCKING human review (apply_after_confirm.md entry point)

    approved = await_human_review(backlog_file)
    
    if approved:
        # Phase 6: Conditional, human-approved migration

        migrate_to_docs_evolution(backlog_file, approved_items)
    else:
        log("Evolution items rejected or deferred pending review")

Key Files in the Evolution Architecture

File Path Purpose
SKILL.md Documents mode C behavior and workflow constraints
prompts/evolution/intake.md Entry point and orchestration logic
prompts/evolution/research.md Web search specification and whitelist enforcement
prompts/evolution/emit_backlog.md Runtime backlog file generation
prompts/evolution/apply_after_confirm.md Human-gated promotion to version control
prompts/evolution/soft_nudge.md Optional, non-binding disclosure hints
prompts/evolution/guardrails.md Safety policies prohibiting automatic edits
references/schemas/evolution_backlog.schema.yaml Structured data validation for findings
outputs/evolution/ Git-ignored runtime directory (no automatic commits)
docs/evolution/ Version-controlled archive of approved changes

Summary

  • Explicit activation: Evolution mode runs only on user command, never automatically
  • Authoritative sourcing: A/B whitelist restricts evidence to cnipa.gov.cn and government gazettes
  • Non-committal staging: All findings written to git-ignored outputs/evolution/ first
  • Human gatekeeping: apply_after_confirm.md requires reviewer approval before any permanent change
  • Workflow integrity: No code path exists for automatic modification of patent disclosure logic

Frequently Asked Questions

What prevents the skill from automatically applying CNIPA updates overnight?

The architecture contains no background scheduler or trigger mechanism. The evolution mode subroutine only executes when user_intent == "技能进化" or /patent-evolve is received. The prompts/evolution/guardrails.md explicitly encodes the prohibition against automatic workflow modification, and the apply_after_confirm.md routine cannot execute without human confirmation.

Why are C-tier sources rejected even if they appear relevant?

The whitelist design in prompts/evolution/research.md prioritizes evidential rigor over coverage. Only cnipa.gov.cn (tier A) and official government publications (tier B) provide legally authoritative policy statements. Accepting tier C sources would risk the skill evolving based on misinterpretations, unofficial translations, or speculative commentary, compromising disclosure quality.

What happens if a user never reviews the generated backlog?

The backlog files in outputs/evolution/ accumulate temporarily in the runtime environment. Since the directory is git-ignored, they do not affect repository state. The skill does not escalate, nag, or automatically promote stale backlogs. Unreviewed entries simply expire with the runtime session, maintaining the principle that no change occurs without explicit human intent.

No. The prompts/evolution/soft_nudge.md output is explicitly excluded from archival disclosure documents and appears only in transient presentation layers. The hint text is informational ("国知局近期发布..."), never prescriptive ("您必须修改..."), and its frequency is rate-limited to prevent any appearance of ongoing monitoring or obligation.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →