Skip to content

feat: add UK Companies House handler skill (#172)#218

Merged
rosspeili merged 3 commits into
ARPAHLS:mainfrom
Areen-09:feat/issue-172-uk-companies-house-handler-skill
Jul 8, 2026
Merged

feat: add UK Companies House handler skill (#172)#218
rosspeili merged 3 commits into
ARPAHLS:mainfrom
Areen-09:feat/issue-172-uk-companies-house-handler-skill

Conversation

@Areen-09

@Areen-09 Areen-09 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces the finance/uk_companies_house_handler skill (v1 scope). It provides deterministic operations to interface with the UK Companies House REST API.

Logic & Cognition Changes:

  • Introduces deterministic parsers/mappers to turn agent intent (e.g. looking for a CEO) into structured API operations (search_companies, get_company_profile, list_officers).
  • Implements an orchestration helper pattern where ambiguous queries return a needs_input status with candidate matches, forcing the agent to disambiguate before fetching detailed data (like officers or filings).
  • All natural language understanding is handled by the host agent via instructions.md; the skill logic in skill.py is entirely deterministic Python and requests.

Documentation & Tests:

  • Adds the full skill bundle (manifest.yaml, skill.py, instructions.md, card.json, test_skill.py).
  • Adds catalog page docs/skills/uk_companies_house_handler.md (with usage examples for all 5 providers).
  • Updates docs/skills/README.md and CHANGELOG.md.
  • Bundle tests are implemented with fully mocked HTTP requests to ensure no live API calls run in CI.

Type of Change (Matches Issue Templates)

  • Skill Proposal: New Skill (Contains manifest.yaml, skill.py, and instructions.md)
  • Bug Report Fix: Non-breaking change which fixes an execution error or framework bug
  • Doc Fix: Documentation Update
  • Framework Feature / RFC Updates: Core Framework Update (Changes to base_skill.py, loader.py, etc.)

Checklist (all PRs)

  • My code follows the Agent Code of Conduct.
  • I have run python -m flake8 ., pytest skills/ (or skillware test), and pytest tests/ locally (or the subset relevant to this change).
  • CHANGELOG.md updated under [Unreleased] if this PR changes user-visible behavior.
  • examples/README.md is updated if this PR adds, renames, or removes a runnable script under examples/.

New or updated skill (complete only if this PR adds or changes a skill under skills/)

Skip this section for framework-only, documentation-only, or other PRs that do not touch the skill registry.

Bundle & metadata

  • Skill lives at skills/<category>/<skill_name>/ (copied from templates/python_skill/ or equivalent).
  • manifest.yaml has name, version, description, valid parameters, and constitution.
  • manifest.yaml includes issuer with real name and email (not template placeholders).
  • Optional: short_description in manifest (~80 chars) for skillware list.
  • Optional: issuer.github and issuer.org set when applicable.
  • requirements and env_vars are documented when the skill needs them.

Logic, cognition, and UI

  • skill.py is deterministic Python (no arbitrary LLM-generated code paths).
  • instructions.md explains when and how to use the skill.
  • card.json is present and its issuer matches manifest.yaml (name and email at minimum).

Tests & loader

  • test_skill.py covers execution and schema expectations.
  • SkillLoader.load_skill("<category>/<skill_name>") succeeds (or missing deps are documented).

Documentation & catalog

  • docs/skills/<skill_name>.md exists or is updated (ID, Issuer, usage).
  • docs/skills/README.md lists the skill with ID and Issuer.

Constitution & Safety (if adding or modifying a skill)

  • Read-Only: Uses only public Companies House data. No operations for filing or modifying company records are included.
  • Privacy: Requires API key (COMPANIES_HOUSE_API_KEY) via environment variable. No caching of personal or company data beyond the lifecycle of the immediate request.
  • Provenance: Always cites the company number and data timestamp in the returned payload.
  • Disclaimer: Strictly acts as an information retrieval tool and is not a substitute for legal, accounting, or professional financial advice.

Related Issues

Implements v1 of #172

@rosspeili

rosspeili commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Thanks @Areen-09, this is a very strong v1 impl for #172.

Reviewed the bundle, docs, examples, and ran live Companies House calls (resolve_company, get_officers for BP P.L.C., map_intent), all worked with COMPANIES_HOUSE_API_KEY. CI scope passes locally (218 tests).

While this is merge-ready, I would include these minor hotfix in follow-ups pr:

  • Consider enriching get_officers with company_name via profile when the officers endpoint omits it
  • Maybe one-line mention of COMPANIES_HOUSE_API_KEY in docs/usage/api_keys.md, but not a blocker since it is already in .env.example

Nice work on the envelope, terminology map, and mocked test coverage, this follow the issue instructions cleanly <3 Merging.

@rosspeili rosspeili merged commit 8251e89 into ARPAHLS:main Jul 8, 2026
5 checks passed
@Areen-09 Areen-09 deleted the feat/issue-172-uk-companies-house-handler-skill branch July 8, 2026 23:13
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.

2 participants