Run the classifier locally.
Bring a standards file and a Jira export. The agent applies the policy, classifies each issue, and writes both structured results and an explanation report.
This repository is a simplified proof of concept. Production use should be adapted to the organization’s policies, review controls, and data environment.
A client tested the approach in an Apptio Targetprocess production environment and deployed the implementation with Kiro.
Requirements
The current prototype runs against a local Ollama model. You’ll need:
- Python 3.10 or newer
- Ollama running locally
- The
qwen2.5:32bmodel - Python packages
ollamaandpandas
Qwen 2.5 32B is a large local model. Make sure the machine has enough memory for your Ollama configuration.
Install the local dependencies
Pull the model, then install the two Python packages used by the script.
$ ollama pull qwen2.5:32b
$ pip install ollama pandas
Describe your classification standards
Edit work-categories.csv. Each row gives the agent a category, its expected classification, applicable issue types, and the language that signals a match.
| Column | What it tells the agent |
|---|---|
| Category | The exact policy category name returned in results. |
| Classification | Whether the category maps to CapEx or OpEx. |
| Jira Issue Types | The comma-separated issue types eligible for the category. |
| Description | Plain-language scope and intent of the category. |
| Logic/Rule | Keywords or signals used to match Jira work. |
Add a Jira export
Place the items to classify in jira-items.csv. Issue Key and Summary are required; more context improves the quality of the reasoning.
| Column | Status | Example |
|---|---|---|
| Issue Key | Required | PROJ-101 |
| Summary | Required | Build new export API |
| Issue Type | Recommended | Story |
| Description | Recommended | Business and technical context |
Run one classification pass
$ python capex-opex.py
The agent loads the standards, classifies Jira items in batches of five, merges the results, and generates a separate reasoning report.
- 1Context loading
Formats and passes the company standards to the local model.
- 2Classification
Returns CapEx or OpEx, confidence, reasoning, matched category, and matched rule.
- 3Reasoning report
Rewrites each decision into a plain-language format for review.
Review both outputs
Files are timestamped and written to output/.
Classified items
<timestamp>_classified_items.csv
The original Jira data plus classification, confidence, short reasoning, matched category, and matched rule.
Reasoning report
<timestamp>_classification_reasoning.txt
A human-readable explanation and audit notes for every issue the model classified.
The script flags confidence below 70% in its terminal summary. Review those items first, then sample the high-confidence decisions for policy fit.
Configuration
Edit the CONFIG dictionary near the top of capex-opex.py to change the model, file paths, output directory, batch size, temperature, or context window.
CONFIG = {
"model": "qwen2.5:32b",
"standards_file": "work-categories.csv",
"input_file": "jira-items.csv",
"output_dir": "output",
"batch_size": 5,
}
Know the boundaries of the POC
The output is a recommendation for human review, not an accounting conclusion.
Quality depends on the standards, Jira descriptions, and model behavior.
Uncertain classifications default to OpEx, and parse failures produce a 50% confidence fallback.
There is no Jira integration, web interface, approval flow, or persistent database in this prototype.