Skip to content

Commit 427f34f

Browse files
committed
feat: add pre-processing agent system
1 parent 41e2e15 commit 427f34f

16 files changed

Lines changed: 2529 additions & 34 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,4 @@ __marimo__/
208208

209209
# DevsContext specific
210210
.devscontext.yaml
211+
.devscontext/

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ dependencies = [
2929
"pyyaml>=6.0",
3030
"click>=8.0",
3131
"pydantic>=2.0",
32+
"aiosqlite>=0.20",
3233
]
3334

3435
[project.optional-dependencies]
@@ -109,6 +110,7 @@ show_column_numbers = true
109110
module = [
110111
"mcp.*",
111112
"yaml",
113+
"aiosqlite",
112114
]
113115
ignore_missing_imports = true
114116

src/devscontext/adapters/jira.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import asyncio
1818
import time
1919
from datetime import UTC, datetime
20-
from typing import TYPE_CHECKING, Any, ClassVar
20+
from typing import Any, ClassVar
2121

2222
import httpx
2323

@@ -40,9 +40,6 @@
4040
)
4141
from devscontext.plugins.base import Adapter, SearchResult, SourceContext
4242

43-
if TYPE_CHECKING:
44-
pass
45-
4643
logger = get_logger(__name__)
4744

4845

src/devscontext/agents/__init__.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""Background agents for DevsContext.
2+
3+
This package contains the background pre-processing agent that watches Jira
4+
for tickets moving to "Ready for Development" and pre-builds rich context
5+
before anyone picks them up.
6+
7+
Components:
8+
JiraWatcher: Polls Jira for tickets in target status
9+
PreprocessingPipeline: Builds rich context with multi-pass synthesis
10+
11+
Example:
12+
from devscontext.agents import JiraWatcher, PreprocessingPipeline
13+
from devscontext.storage import PrebuiltContextStorage
14+
15+
storage = PrebuiltContextStorage(".devscontext/cache.db")
16+
await storage.initialize()
17+
18+
pipeline = PreprocessingPipeline(config, storage)
19+
watcher = JiraWatcher(config, pipeline)
20+
21+
# Run the polling loop
22+
await watcher.run()
23+
"""
24+
25+
from devscontext.agents.preprocessor import PreprocessingPipeline
26+
from devscontext.agents.watcher import JiraWatcher
27+
28+
__all__ = ["JiraWatcher", "PreprocessingPipeline"]

0 commit comments

Comments
 (0)