# Skill Contract

**Skill ID:** sum_2numbers
**Version:** v1
**Status:** APPROVED

---

## Intent
To calculate and display the sum of two numerical inputs provided by the user.

---

## Inputs
- `first_number`: number
- `second_number`: number

---

## Outputs
- `sum`: number

---

## Output Message
The sum of the two numbers is {sum}.

---

## Logic
1. Receive `first_number` and `second_number` as input.
2. If `first_number` is empty or null, treat it as 0.
3. If `second_number` is empty or null, treat it as 0.
4. Convert both `first_number` and `second_number` to numerical types if they aren't already.
5. Calculate the sum: `sum = first_number + second_number`.
6. Return the `sum`.

---

## Additional Logic
- Treat empty numerical inputs for 'first_number' or 'second_number' as 0.

---

## Side Effects
None. This skill performs a pure computation and does not alter any system state or external services.

---

## Capability Summary
Calculates the sum of two user-provided numbers, handling empty inputs by treating them as zero, and returns the result.

---

## Allowed Roles
- SUPERUSER

---

## Assumptions
- Input values, if provided, are numerical or can be safely cast to numbers.
- The underlying system can perform basic arithmetic operations.

---

## Non-Goals
- Handling non-numeric input that is not empty (e.g., strings like "abc"). This skill will not attempt to parse or convert such inputs beyond the 'empty to 0' rule.
- Performing mathematical operations other than addition.
- Persisting or storing the calculated sum in any database or external system.

---

## Failure Modes
- Type conversion error: If a provided input is not empty, but also not a valid number (e.g., "hello"), the skill may fail during the numerical conversion step.
- System error: Unexpected issues with the underlying execution environment.

---

## Data & System Access
- Internal memory for storing input variables (`first_number`, `second_number`) and the calculated result (`sum`). No access to external databases or services.

---

## Safety & Risk
Risk Level: LOW

---

## Approval

    Approved by: USER  
    Approved on: 2026-05-03T10:14:41.200727Z