BotCurrent
← Back to examples

Build & debugFrom the makerReads only

Find hidden safeguards in old code

Old code often hides business rules nobody wrote down. Your AI traces them and shows you where they live.

What happened

Cognition's blog post says Devin used a system map to explain COBOL programs that process claims. It says Devin found logic that recovers from duplicate transactions. The post doesn't say how the findings were checked or approved.

Source: The Cognition Team · cognition.com · Tool: Devin

Copy this prompt

Paste it into ChatGPT, Claude or Gemini, fill in the [brackets] and add your files. It only drafts. You decide what to send or change.

Use it often? Save it as a skill

Add this job to Claude or Codex once, and your agent knows how to do it without you pasting the prompt each time. Text only, no code.

Download for Claude (.zip)View the skill file

How to add it
Claude app or claude.ai
Download the .zip. In Settings, find Skills, choose Upload skill and pick the file. Code execution has to be turned on.
Claude Code
Run this in your terminal:mkdir -p ~/.claude/skills/find-hidden-safeguards-in-old-code && curl -fsSL https://botcurrent.com/skills/find-hidden-safeguards-in-old-code/SKILL.md -o ~/.claude/skills/find-hidden-safeguards-in-old-code/SKILL.md
Codex
Run this in your terminal:mkdir -p ~/.agents/skills/find-hidden-safeguards-in-old-code && curl -fsSL https://botcurrent.com/skills/find-hidden-safeguards-in-old-code/SKILL.md -o ~/.agents/skills/find-hidden-safeguards-in-old-code/SKILL.md

More about skills, and open-source skills we checked

Security scanClear13 of 13 checks passed

We check every skill file before we offer it. This one is the prompt above in skill form.

  • Passed Skill file is well formed
  • Passed Runs its own code or programs
  • Passed Connects to the internet from code
  • Passed Touches passwords, keys or private files
  • Passed Deletes or overwrites things in bulk
  • Passed Hidden or scrambled code
  • Passed Tries to override your instructions
  • Passed Invisible characters in the text
  • Passed Sends your data somewhere else
  • Passed Can pay or buy without asking you
  • Passed Downloads or installs other software
  • Passed Has a password or key written into it
  • Passed Asks for admin (sudo) rights

Files scanned: SKILL.md. Links to: botcurrent.com, cognition.com. Fingerprint: 8f2a6dde4487. What we check

What you'll get

A plain explanation of each safeguard, with the file and line that does the work.

You'll need

  • The code files for the area you care about
  • The question you want answered
  • A known case where the safeguard should kick in

Before you switch it on

Reads only

If you give this job to an agent that works in your accounts:

Access it needs
Your legacy code repository
Keep on “ask me first”
Sending or posting anything, paying or buying, sharing your address or ID, deleting anything

Heads up: Comments in old code are often out of date. Check each finding against the code itself before you rely on it.

More details: full instructions, sources and safeguards

Before you begin

No production code execution or changes. Source access and scope require approval; explanations do not authorize consequential decisions or external sharing.

Use this in your own AI tool

  1. Copy the starter, then open your own AI tool.
  2. Paste it with only the permitted inputs. Check privacy settings and tool compatibility first.
  3. Review the draft and held questions. Any later action needs separate approval.

What you need

Authorized repository snapshot and permitted design notes.

Recovery question, code scope and accountable technical reviewer.

Owner-selected recovery scenarios, expected safeguards and unresolved failure examples for the explanation.

Start here

  1. Locate code paths related to the recovery question.
  2. Trace existing checks and distinguish comments from implemented behavior.
  3. Outline evidence-linked explanations and unknown production assumptions.
Advanced prompt availability

Advanced prompt

No accepted companion is available for this record. The original material below retains its original status.

Technical setup & run design — optional
Starter
Separate short starter version composed-v1. Untested.
Advanced prompt
No accepted advanced companion is available. Legacy material remains in the original notes with its status.
Compatibility
Unknown; check the actual tool, account and permissions.
Run design
No reviewed run design. No runtime or schedule is activated by BotCurrent.
Setup and access

Proposed inputs

  1. Name

    Scoped code and system map

    Owner

    Repository owner

    Minimum scope

    Relevant programs, call relationships and data layouts

    Quality check

    Use a known revision and identify generated or missing dependencies.

  2. Name

    Recovery question

    Owner

    Domain owner

    Minimum scope

    Suspected duplicate condition, transaction lifecycle and known incident context

    Quality check

    Separate expected business policy from what the code appears to implement.

Access and setup — proposed or unknown

Proposed minimum
  1. Read a repository snapshot and permitted design notes; produce explanations without executing production code.

Compatibility unknowns
  1. Unknown: COBOL dialect, external dependencies, runtime semantics and repository-tool access.

External actions requiring approval
  1. Changing code, accessing live claims data or running operational recovery procedures.

Source evidence, attribution & limitations

Full source evidence

Vendor report · Coding tasks

Original task title: Recover business safeguards from legacy code

Editorial candidate. This is source-backed reporting or a documented workflow. BotCurrent has not independently tested this task. A proposed Canadian adaptation is not evidence of a Canadian deployment or compliance certification.

Original source

https://cognition.com/blog/how-devin-is-modernizing-cobol-at-fortune-500-companies

Attributed to: The Cognition Team

Vendor report
Original action type
coding_action
What the source reports
Used a system map to explain claims-processing programs and uncover duplicate-transaction recovery logic.
Source outcome limits
Actions and outcomes are attributed vendor claims, not an independent reproduction or an execution guarantee.
Evidence attribution caveat
Actions and outcomes are attributed vendor claims, not an independent reproduction or an execution guarantee.
Source approval description
Not specified.
Named tools
Devin; DeepWiki; COBOL
Model or version
Unknown
Publication date
2026-04-08
Source last checked
2026-10-14
Demonstrated in Canada
Unknown
Canadian availability
Unknown
Proposed Canadian adaptation
Proposed: validate recovered rules with Canadian domain experts using de-identified fixtures.
Recommended approval boundaries
Approve source access and data scope first; require human review before production changes, external sharing or consequential decisions.
Technical specification & detailed checks
Detailed steps and output format

At a glance

Suggested result
An explanation of existing business safeguards in the code.Suggested; untested.
Tool
DevinSource-named; check current access.
Suggested inputs
Scoped code and system map; Recovery questionProposed; access notes below.
Human review
Approve source access and data scope first; require human review before production changes, external sharing or consequential decisions.Suggested boundaries; source approvals below.
Setup notes
Read a repository snapshot and permitted design notes; produce explanations without executing production code.Guide notes; proposed setup untested.
Cost
Workflow cost not established. Check current tool pricing, setup and human review costs before trying it.No measured cost or time added.
Content depth
Source-linked example · suggestions untestedDepth does not establish successful execution.
Check source evidence and limits ↓

Function and scope

Software engineering · Single task

Editorial classification; no execution or compatibility test is implied.

No tool mapping reviewed for this task.

Source-backed example. Practical decision guidance is proposed and untested; this is not a full implementation guide.

The problem

Critical recovery safeguards can be buried in legacy programs and missing from the team's current understanding.

Suggested task

Use a system map to inspect legacy claims-processing code and explain duplicate-transaction recovery logic.

What you could produce

An explanation of existing business safeguards in the code.

Where these suggestions come from
  • Core problem: Our interpretation of the task
  • Agent job: Our interpretation of the task
  • Expected output: Our interpretation of the task
  • Relevant job roles: Our interpretation of the task
  • Benefit type: Our interpretation of the task
Suggestions and their limits

Describes the task’s purpose and intended output; measured benefit, safe unsupervised operation and successful delivery are not established by this framing.

Editorial synthesis based on the linked source. This framing does not add evidence of successful delivery or results.

Before you try it · suggestions untested

Case-specific decision guidance and first checks are original proposals. The linked source supports the attributed task; this added guidance has not been executed.

Read the attributed source evidence and original caveats below ↓

Why use this

  1. Legacy safeguards often sit in recovery paths outside the normal transaction flow. Reading only the main path can miss how the system detects duplicates, restores state or prevents a retry from processing something twice.

  2. This job could explain candidate safeguards with references to programs, fields and branches. Maintainers could then review assumptions and design tests rather than treating a high-level explanation as proof of behaviour.

Why an agent / simpler alternative

Useful judgment

Trace control and data flow across older code and explain relationships in operational language.

Simpler alternative

Ask the maintainer to annotate a small known routine when the safeguard is already localized.

Unsuitable when

The analysis would authorize production changes or claim runtime behaviour without supporting tests.

Expected deliverable and review checks

Proposed artifact

Safeguard explanation with code pointers, state transitions, assumptions and unresolved verification questions.

Critical checks
  1. Every claimed check maps to a reachable branch or is labelled uncertain.

  2. Detection, prevention and recovery are distinguished rather than collapsed into one guarantee.

Missing output evidence

No new workflow run or output inspection is performed for this editorial layer. The linked implementation evidence retains the original source-specific outcome and artifact limits.

First check — proposed, unexecuted

Status

proposed_unexecuted

Synthetic fixture

Synthetic pseudocode contains a duplicate guard bypassed by a retry path and a status value reused for two meanings.

Acceptance checks
  1. The safeguard is described as conditional.

  2. Both the bypass and state ambiguity become verification questions.

Stop conditions
  1. Live data, production execution or code modification becomes necessary.

Tasks: Build & debugHealth & wellbeing

Useful for: Software developerOperations manager

Editorial relevance from the title and source-supported actions; not evidence of the operator’s occupation.
DevinIndependent testing: No
Failure handling, costs and limits

Failure signals and proposed responses

  1. Signal

    A duplicate-check routine exists but is not called on the relevant path.

    Why it matters

    The explanation may overstate protection in the actual workflow.

    Proposed response

    Trace callers and entry conditions, then flag reachability as unresolved where evidence is missing.

  2. Signal

    A reused status field is assumed to mean the same thing in every program.

    Why it matters

    The inferred recovery sequence can be wrong.

    Proposed response

    Compare assignments and tests across modules and ask the domain owner about ambiguous states.

Effort and cost — unknown

Setup work
  1. Define the transaction boundary and map relevant programs and records.

Ongoing review
  1. Review explanations with maintainers and design separate authorized tests.

Unknowns
  1. Unknown: code completeness, dialect support and domain-review effort.

Limits

  1. Source-level reasoning can reveal candidate safeguards; it cannot establish complete protection against duplicate processing.

Original task overview & interpretation

Vendor report

Recover business safeguards from legacy code

Critical recovery safeguards can be buried in legacy programs and missing from the team's current understanding.

Suggested result

An explanation of existing business safeguards in the code.

What you need: Source-named agent: Devin. Suggested inputs: Scoped code and system map; Recovery question. Read a repository snapshot and permitted design notes; produce explanations without executing production code. Workflow costs and current compatibility remain unverified.

Approve source access and data scope first; require human review before production changes, external sharing or consequential decisions.

Vendor report. BotCurrent has not independently tested this workflow.