Back to the marketplace · Skill

Business rule extraction

Extracts business rules from legacy code into Given/When/Then rule cards with file:line sources, plus a data-object catalog and questions for domain experts; comment-only "rules" are dropped and credentials masked. Derived from Anthropic's Claude Code plugin code-modernization: the Workflow-and-script sharding is removed, and its granularity, citation checks, P0 double check and duplicate merging are written into the skill; large scopes are sized first.

Copy this sentence and send it to any employee in Teloa:
In Teloa, open Marketplace, search for "Business rule extraction" and add it (Skill anthropic.modernize-extract-rules).

Source
Teloa official · Derived from Anthropic (anthropics/claude-plugins-official)

Change list (12)

Removed (5)
  • The original Claude Code slash-command file is not shipped; its text is rewritten as SKILL.md at the resource root (each change is listed in the other entries).

    Why: Teloa loads skills from SKILL.md and does not support the Claude Code command format (`argument-hint`, `arguments`, `$system`/`$module_pattern`).

    commands/modernize-extract-rules.md MER-M01 · View original

  • The Method A Workflow script is not shipped; SKILL.md drops the whole Method A section (shards, estimates, batches, resuming, rendering); the practices that work in a single session are covered by MER-M07, MER-M08 and MER-M09.

    Why: The script depends on the Claude Code Workflow tool runtime (agent(), parallel(), plugin-registered agentType, resumeFromRunId, journal.jsonl); the Teloa marketplace does not accept executable scripts and Teloa's orchestration tools have a different interface. The original already uses Method B when the Workflow tool is missing.

    workflows/extract-rules.js MER-M02 · View original

  • The Python script that builds the shard list (used only by Method A) is not shipped.

    Why: The Teloa marketplace does not accept executable scripts; the shards only serve the removed Workflow flow.

    scripts/make_shards.py MER-M03 · View original

  • The Python script that renders the Workflow result into BUSINESS_RULES.md (used only by Method A) is not shipped; the session writes rule cards directly in the format given in SKILL.md.

    Why: The Teloa marketplace does not accept executable scripts; the original Method B already writes the files directly.

    scripts/render_rules.py MER-M04 · View original

  • The Python script that builds REPORT.html is not shipped; the Finish section no longer calls it.

    Why: The Teloa marketplace does not accept executable scripts; the original already treats it as optional.

    scripts/build_report.py MER-M05 · View original

Adapted (4)
  • The frontmatter keeps only `name` and a single-line `description`; a change notice is added below the title (Apache-2.0 section 4(b), pointing to MODIFICATIONS.md); `$system`, `$module_pattern` and the `legacy/$system` convention become a code path, short system name and optional module or file pattern given by the user; stop if the path does not exist; citations are relative to the code folder; reports go to `analysis/<system>/` in the workspace. The pointer to `/code-modernization:modernize … --source` is removed.

    Why: Skills in the Teloa marketplace may only have single-line name and description frontmatter keys; Teloa skills have no argument substitution, and the `legacy/` link is created by another command of the original plugin that is not included.

    SKILL.md · frontmatter (L1-5); below the title; code location (L7-13) MER-M06 · View original

  • Method B's "three business-rules-extractor subagents in parallel" becomes three lenses that follow the shipped `agents/business-rules-extractor.md`: delegated to read-only subtasks when the host allows one-off delegation (such as subagent_task), otherwise run in turn. Method A steps 1-2 become "Size the job first": count the files and lines in scope; for large scopes (roughly more than 30 source files or 10,000 lines) report the counts and let the user choose all, a slice or cancel; a full run goes module by module and merges, de-duplicating by source file and rule name; non-module source (SQL, shared includes, config tables) is read only when referenced. Adds read-only rules: never build, run or modify the analyzed code; write only the two reports, through the host's confirmation.

    Why: Teloa has no Claude Code Task tool and no plugin-registered named subagents; whether an AI colleague can delegate depends on whether its role was granted the one-off delegation tool (subagent_task), so the text says to delegate when possible and otherwise work in turn, and drops model tiers in favour of the host's configured model. The original's estimate and "ask before launching more than 12 shards" exist only in Method A; the fallback had no size control and would read an entire large system in one go.

    SKILL.md · Size the job first (new); Working rules (new); Method B (L104-107) MER-M07 · View original

  • The rule-card format is kept; "later commands find rules by that pattern" and "The brief's behavior contract" are reworded without depending on other commands; BUSINESS_RULES.md ends, after the SME section, with the flagged instruction-shaped text (file:line only) and the parts not covered (which render_rules.py produced in the original); Finish drops build_report.py, Method A-only counts and "next /code-modernization:modernize-review, modernize-brief", and points out how many P0 rules await an expert's answer.

    Why: Those commands and scripts are not part of this resource and cannot be called in Teloa.

    SKILL.md · Write (L119-144); Finish (L146-151) MER-M10 · View original

  • Turns the Claude Code subagent definition into a role file shipped with the skill: the frontmatter (name, description, tools) becomes a title, the change notice, a "Role" line (the original description) and a "Tools" line (read, glob, grep; bash for read-only inspection only; no installing tools or dependencies); the rule-card format reference changes from the "`/code-modernization:modernize-extract-rules` command" to the SKILL.md of the `modernize-extract-rules` skill.

    Why: Teloa does not read Claude Code subagent frontmatter; the original command file is not shipped.

    agents/business-rules-extractor.md · frontmatter (L1-5); L54-55 MER-M11 · View original

Added (3)
  • Adds granularity guidance (from the GRANULARITY prompt the original Workflow script gives its extractors): one rule per business decision or calculation, not per branch, field or line; cases of one decision go under edge cases; skip plumbing such as argument parsing and display formatting; roughly one rule per 40-80 lines of real logic; P0 only for the few rules that would defeat the system's purpose if wrong, re-rating when more than one in four are P0.

    Why: The original Method B has no granularity guidance; the script's comments note that without it a small program yields hundreds of "rules" and extraction never converges.

    SKILL.md · Extract, "How fine to cut rules" (new) MER-M08 · View original

  • Expands Method B's "verify before you write" with the original Workflow's checks: each candidate gets a confirmed / wrong citation / refuted verdict, with rules found only in comments, strings or docs refuted and the number dropped reported with 2-3 examples; each P0 rule is checked twice more, for compliance and fidelity, dropping to P1 or to Medium confidence with an SME question when in doubt, and a P0 that could not be checked stays P0 and goes to an SME; rules describing the same behavior are merged keeping the higher priority, the lower confidence and every suspected defect and SME question, while rules that only share a topic or differ in a number, condition or side effect stay separate.

    Why: The original ensures quality in the Workflow with referee agents, a two-judge P0 panel and a consolidation agent, while its fallback has only "read each cited line and confirm"; in Teloa the same checks have to be written into the skill for the session to carry out.

    SKILL.md · Verify before you write (L116-118) MER-M09 · View original

  • Adds two rules: read every source file in scope in full before extracting from it (a search hit only points to a place to read, and a rule that cannot be tied to lines that were read does not go into the catalog); and never write a credential value anywhere (rule cards, data objects, replies, reports), only file:line with at most a 2-4 character preview.

    Why: The original Method B leaves reading to the extractor subagents without saying the files must be read in full, and credential masking appears only in the Parameters field and the subagent file. In local-model runs a small model wrote rules from grep output alone, described rules the code does not contain and repeated the sample credential in its reply.

    SKILL.md · Working rules (new) MER-M12 · View original

The other file matches the original (verified)

GitHub
Resource file: catalog/skills/anthropic.modernize-extract-rules.json
Files kept by the marketplace: artifacts/skills/anthropic.modernize-extract-rules/1.0.0/
Original source (locked version): GitHub anthropics/claude-plugins-official@fa59bc9
License
Apache-2.0
License files: LICENSE
Review
Reviewed by Teloa on 2026-09-28
Compatibility
Needs configuration · Teloa >=0.2.0-alpha.7 · DSH 0.1.7-rc.1
  • Needs the read, glob and grep tools and permission to write reports under analysis/ (writes go through the host's confirmation); bash is used only for read-only counting (find, wc, grep), never to build or run the analyzed code.
  • For large scopes (roughly more than 30 source files or 10,000 lines) it first reports the file and line counts and lets you choose all, a slice or cancel; a full run goes module by module and merges afterwards.
  • Rule cards are drafts for domain experts: rules below High confidence and doubtful P0 rules are listed under "Rules requiring SME confirmation" and should not be used as acceptance criteria before they are confirmed.
  • Needs a capable model: a reference run of the skill on a small sample system produced correct citations throughout, while two runs with a local qwen3:14b were unreliable (one wrote rules from search results and repeated the credential, one rated every rule P0), and neither wrote the report files. Check rule cards by hand. Not validated end to end in a Teloa host.
Permissions and requirements
Tools: read, glob, grep, bash, write
Uses the network: no
Data flow
The files come with Teloa; nothing is downloaded when you add it. You can browse without signing in. Page views are counted with Cloudflare Web Analytics, which uses no cookies and does not record who you are. Data used for sign-in and reviews: privacy and community rules

Skill anthropic.modernize-extract-rules · version 1.0.0

Report a problem