Renames the package, distribution, CLI alias, Makefile targets, and working directory from issue-facade to issue-core, signalling its role as the authoritative task lifecycle manager for the Coulomb org (peer to activity-core, rules-core, project-core). Adds POST /issues/ ingestion endpoint for activity-core's IssueSink, under a new optional [api] extra. The endpoint is served by `issue serve`, authenticates via the ISSUE_CORE_API_KEY env var (Bearer or X-API-Key header), and routes the TaskSpec payload to the configured default backend with full traceability metadata embedded in sync_metadata. - T01: Python package issue_tracker -> issue_core, dir rename - T02: registered in state hub under custodian domain - T03: INTENT.md (what it is, what it isn't, how it fits) - T04: SCOPE.md (in/out-of-scope, integration boundaries) - T05: POST /issues/ via FastAPI + Uvicorn, 9 unit tests - T06: docs/nats-task-ingestion.md design stub Closes ISSC-WP-0001. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
7.5 KiB
Issue Core Integration Checklist
For project maintainers integrating this capability into their codebase.
Pre-Integration
- Verify Python version: >= 3.8
- Check issue tracker platform: Gitea (✅), GitHub (🚧 v1.1), GitLab (🚧 v1.2)
- Obtain API token: Read-only for monitoring, write for implementation
- Document token storage: Environment variable or secure secret manager
Installation
-
Install capability:
pip install -e capabilities/issue-core/ -
Verify installation:
issue --version -
Configure backend (one-time):
export GITEA_API_TOKEN="your-token" issue backend add myproject gitea # Provide: URL, owner, repo when prompted issue backend set-default myproject -
Test connection:
issue backend test myproject issue list --limit=5
Project Integration
Option 1: Agent Context File (Recommended)
-
Copy agent context to project:
mkdir -p .claude/capabilities/ cp capabilities/issue-core/.capability/agent-context.md \ .claude/capabilities/issue-core.md -
Add to Claude Code context: Create
.claude/context/capabilities.md:# Available Capabilities This project uses specialized capabilities. Always check these before implementing similar functionality. ## Issue Tracking: issue-core **Location:** `capabilities/issue-core/` **Documentation:** `.claude/capabilities/issue-core.md` **CRITICAL:** Always use this capability for issue operations. Never use: - Direct API calls (requests to /api/v1/repos/...) - Platform CLIs (gh, glab) - Platform libraries (PyGithub, python-gitlab) See `.claude/capabilities/issue-core.md` for usage patterns.
Option 2: Slash Command
-
Create slash command: Create
.claude/commands/use-issues.md:You are working with issue tracking. Use the issue-core capability: **Python API:** ```python from issue_core.backends.gitea import GiteaBackend backend = GiteaBackend() backend.connect(config)CLI:
issue list --format=json issue create "Title" --label=bugFull docs: See
capabilities/issue-core/AGENT_INTEGRATION.mdDO NOT use direct API calls or platform CLIs!
-
Test slash command:
# In Claude Code /use-issues
Option 3: MCP Server (Future - v1.2)
- Configure MCP server (when available)
- Register tools in Claude Code
- Test tool discovery
Agent Configuration
-
Set agent identity: Add to
.issue-core/config.json:{ "agent": { "identity": "agent-coder", "type": "implementation" } } -
Or use environment variables:
export ISSUE_AGENT_ID="agent-coder" export ISSUE_AGENT_TYPE="coder"
Verification
-
Test basic operations:
from issue_core.backends.gitea import GiteaBackend from issue_core.core.interfaces import IssueFilter backend = GiteaBackend() backend.connect({'base_url': '...', 'token': '...', 'owner': '...', 'repo': '...'}) # Should return issues issues = backend.list_issues(IssueFilter(state='open', limit=5)) print(f"Found {len(issues)} issues") -
Test CLI:
issue list --state=open --format=json | jq 'length' -
Verify agents use capability:
- Create test issue via agent
- Check it appears in tracker
- Verify token from environment was used (not hardcoded)
Documentation Updates
-
Update project README:
## Issue Tracking This project uses the issue-core capability for unified issue tracking. **Setup:** ```bash pip install -e capabilities/issue-core/ export GITEA_API_TOKEN="your-token" issue backend add myproject giteaUsage: See
capabilities/issue-core/AGENT_INTEGRATION.md -
Add to CONTRIBUTING.md:
### Issue Tracking Always use the `issue` command or Python API from `issue_core` package. Never make direct API calls to Gitea/GitHub/GitLab. Examples: `capabilities/issue-core/examples/agents/`
Security Review
-
Verify tokens are not in code:
git grep GITEA_TOKEN(should be empty) -
Check .gitignore includes:
.issue-core/config.json .issue-core/issues.db .issue-core/credentials.json -
Audit token permissions: Read-only for bots, write for implementation
-
Document token rotation: How often, who has access
Testing
-
Run capability tests:
cd capabilities/issue-core/ make test -
Test agent workflows:
python examples/agents/simple_task_executor.py --once -
Verify multi-agent coordination:
python examples/agents/multi_agent_pipeline.py --mode=roundrobin --max-iterations=1
Maintenance
-
Schedule regular updates:
cd capabilities/issue-core/ git pull origin main pip install -e . --upgrade -
Monitor capability roadmap: Check
ROADMAP.mdfor new features -
Subscribe to updates: Watch the capability repository
Rollback Plan
If capability causes issues:
-
Document how to disable:
# Temporarily use direct API export ISSUE_FACADE_DISABLED=1 # Or issue backend remove myproject -
Keep backup config:
cp ~/.config/issue-core/backends.json ~/.config/issue-core/backends.json.backup -
Document rollback steps in project wiki/docs
Success Criteria
- Agents successfully create/update issues via capability
- No direct API calls in agent code (verified via code review)
- Token management centralized (one env var, not scattered)
- Multi-agent coordination works (no race conditions)
- Offline/online sync works (if using local backend)
Post-Integration
- Share integration experience: Document what worked, what didn't
- Contribute improvements: PRs to capability for common patterns
- Update capability docs: Add project-specific examples
- Monitor agent usage: Are they using capability correctly?
Troubleshooting
Agents bypass capability
Problem: Agent makes direct API call instead of using capability.
Solution:
- Check Claude Code context includes capability docs
- Add explicit reminder in
.claude/context/ - Use slash command
/use-issuesbefore agent work - Review agent logs for why it chose direct API
Configuration not found
Problem: issue backend list shows empty.
Solution:
issue backend add myproject gitea
issue backend set-default myproject
issue backend test myproject
Authentication failures
Problem: "401 Unauthorized" errors.
Solution:
- Verify token:
echo $GITEA_API_TOKEN - Test token:
curl -H "Authorization: token $GITEA_API_TOKEN" $GITEA_URL/api/v1/user - Check token hasn't expired
- Verify token has correct permissions
Questions?
- Technical: See
CLAUDE.md(development guide) - Agent patterns: See
AGENT_INTEGRATION.md(comprehensive guide) - Examples: See
examples/agents/(working code) - Issues: Create issue in capability repository