fcontext 1.0.2__tar.gz → 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fcontext-1.0.4/.github/workflows/docs.yml +66 -0
- fcontext-1.0.4/.github/workflows/release.yml +49 -0
- fcontext-1.0.4/.gitignore +33 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/PKG-INFO +4 -3
- {fcontext-1.0.2 → fcontext-1.0.4}/README.md +3 -2
- fcontext-1.0.4/docs/architecture.md +137 -0
- fcontext-1.0.4/docs/assets/javascripts/mermaid.min.js +2811 -0
- fcontext-1.0.4/docs/commands.md +199 -0
- fcontext-1.0.4/docs/contributing.md +56 -0
- fcontext-1.0.4/docs/demos/context-network.md +276 -0
- fcontext-1.0.4/docs/demos/cross-session.md +114 -0
- fcontext-1.0.4/docs/demos/domain-learning.md +136 -0
- fcontext-1.0.4/docs/demos/requirements-driven.md +140 -0
- fcontext-1.0.4/docs/demos/team-onboarding.md +135 -0
- fcontext-1.0.4/docs/features.md +170 -0
- fcontext-1.0.4/docs/getting-started.md +97 -0
- fcontext-1.0.4/docs/index.md +165 -0
- fcontext-1.0.4/docs/use-cases/enterprises.md +112 -0
- fcontext-1.0.4/docs/use-cases/individuals.md +109 -0
- fcontext-1.0.4/fcontext/__init__.py +5 -0
- fcontext-1.0.4/fcontext/_version.py +24 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext/init.py +6 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext/requirements.py +12 -1
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext.egg-info/PKG-INFO +4 -3
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext.egg-info/SOURCES.txt +19 -0
- fcontext-1.0.4/mkdocs.yml +84 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/pyproject.toml +5 -2
- {fcontext-1.0.2 → fcontext-1.0.4}/tests/test_enable.py +14 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/tests/test_req.py +53 -0
- fcontext-1.0.2/fcontext/__init__.py +0 -2
- {fcontext-1.0.2 → fcontext-1.0.4}/LICENSE +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext/cli.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext/experience.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext/indexer.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext/topics.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext/workspace_map.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext.egg-info/dependency_links.txt +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext.egg-info/entry_points.txt +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext.egg-info/requires.txt +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/fcontext.egg-info/top_level.txt +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/setup.cfg +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/tests/conftest.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/tests/test_cli.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/tests/test_experience.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/tests/test_index.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/tests/test_init.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/tests/test_reset.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/tests/test_topic.py +0 -0
- {fcontext-1.0.2 → fcontext-1.0.4}/tests/test_workspace_map.py +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Test & Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: "pages"
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
strategy:
|
|
21
|
+
matrix:
|
|
22
|
+
python-version: ['3.9', '3.12', '3.13']
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: pip install -e ".[test]"
|
|
32
|
+
|
|
33
|
+
- name: Run tests
|
|
34
|
+
run: python -m pytest tests/ -v
|
|
35
|
+
|
|
36
|
+
build:
|
|
37
|
+
needs: test
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
|
|
42
|
+
- uses: actions/setup-python@v5
|
|
43
|
+
with:
|
|
44
|
+
python-version: '3.12'
|
|
45
|
+
|
|
46
|
+
- name: Install MkDocs
|
|
47
|
+
run: pip install mkdocs-material mkdocs-mermaid-zoom
|
|
48
|
+
|
|
49
|
+
- name: Build site
|
|
50
|
+
run: mkdocs build --strict
|
|
51
|
+
|
|
52
|
+
- name: Upload artifact
|
|
53
|
+
uses: actions/upload-pages-artifact@v3
|
|
54
|
+
with:
|
|
55
|
+
path: site
|
|
56
|
+
|
|
57
|
+
deploy:
|
|
58
|
+
needs: build
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
environment:
|
|
61
|
+
name: github-pages
|
|
62
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
63
|
+
steps:
|
|
64
|
+
- name: Deploy to GitHub Pages
|
|
65
|
+
id: deployment
|
|
66
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Release to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ['v*', '[0-9]*']
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: ['3.9', '3.12', '3.13']
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 0
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python-version }}
|
|
21
|
+
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: pip install -e ".[test]"
|
|
24
|
+
|
|
25
|
+
- name: Run tests
|
|
26
|
+
run: python -m pytest tests/ -v
|
|
27
|
+
|
|
28
|
+
publish:
|
|
29
|
+
needs: test
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
permissions:
|
|
32
|
+
id-token: write
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
fetch-depth: 0
|
|
37
|
+
|
|
38
|
+
- uses: actions/setup-python@v5
|
|
39
|
+
with:
|
|
40
|
+
python-version: '3.12'
|
|
41
|
+
|
|
42
|
+
- name: Install build tools
|
|
43
|
+
run: pip install build
|
|
44
|
+
|
|
45
|
+
- name: Build package
|
|
46
|
+
run: python -m build
|
|
47
|
+
|
|
48
|
+
- name: Publish to PyPI
|
|
49
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# setuptools-scm generated version file
|
|
2
|
+
fcontext/_version.py
|
|
3
|
+
|
|
4
|
+
# Byte-compiled / optimized / DLL files
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
build/
|
|
11
|
+
dist/
|
|
12
|
+
*.egg-info/
|
|
13
|
+
*.egg
|
|
14
|
+
|
|
15
|
+
# Virtual environments
|
|
16
|
+
.venv/
|
|
17
|
+
venv/
|
|
18
|
+
|
|
19
|
+
# Testing / coverage
|
|
20
|
+
.pytest_cache/
|
|
21
|
+
.coverage
|
|
22
|
+
htmlcov/
|
|
23
|
+
|
|
24
|
+
# IDE
|
|
25
|
+
.vscode/
|
|
26
|
+
.idea/
|
|
27
|
+
|
|
28
|
+
# OS
|
|
29
|
+
.DS_Store
|
|
30
|
+
Thumbs.db
|
|
31
|
+
|
|
32
|
+
# MkDocs
|
|
33
|
+
site/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fcontext
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: Context continuity across AI agents & sessions. Team knowledge collaboration. Industrial-grade AI delivery.
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.9
|
|
@@ -18,7 +18,7 @@ Dynamic: license-file
|
|
|
18
18
|
[](https://pypi.org/project/fcontext/)
|
|
19
19
|
[](https://pypi.org/project/fcontext/)
|
|
20
20
|
[](LICENSE)
|
|
21
|
-
[](#supported-agents)
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -97,6 +97,7 @@ In production environments, context is fragmented: requirements live in document
|
|
|
97
97
|
| Cursor | `fcontext enable cursor` | `.cursor/rules/*.md` |
|
|
98
98
|
| Trae | `fcontext enable trae` | `.trae/rules/*.md` |
|
|
99
99
|
| Qwen-Code | `fcontext enable qwen` | `.qwen/rules/*.md` |
|
|
100
|
+
| Kiro | `fcontext enable kiro` | `.kiro/steering/*.md` + `.kiro/skills/` |
|
|
100
101
|
| OpenCode | `fcontext enable opencode` | Uses Claude format |
|
|
101
102
|
| OpenClaw | `fcontext enable openclaw` | `skills/` only |
|
|
102
103
|
|
|
@@ -132,7 +133,7 @@ cd your-project
|
|
|
132
133
|
fcontext init
|
|
133
134
|
|
|
134
135
|
# 2. Activate your AI agent
|
|
135
|
-
fcontext enable copilot # or: claude, cursor, trae, qwen, opencode, openclaw
|
|
136
|
+
fcontext enable copilot # or: claude, cursor, trae, qwen, kiro, opencode, openclaw
|
|
136
137
|
|
|
137
138
|
# 3. Index your documents
|
|
138
139
|
fcontext index docs/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://pypi.org/project/fcontext/)
|
|
6
6
|
[](https://pypi.org/project/fcontext/)
|
|
7
7
|
[](LICENSE)
|
|
8
|
-
[](#supported-agents)
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -84,6 +84,7 @@ In production environments, context is fragmented: requirements live in document
|
|
|
84
84
|
| Cursor | `fcontext enable cursor` | `.cursor/rules/*.md` |
|
|
85
85
|
| Trae | `fcontext enable trae` | `.trae/rules/*.md` |
|
|
86
86
|
| Qwen-Code | `fcontext enable qwen` | `.qwen/rules/*.md` |
|
|
87
|
+
| Kiro | `fcontext enable kiro` | `.kiro/steering/*.md` + `.kiro/skills/` |
|
|
87
88
|
| OpenCode | `fcontext enable opencode` | Uses Claude format |
|
|
88
89
|
| OpenClaw | `fcontext enable openclaw` | `skills/` only |
|
|
89
90
|
|
|
@@ -119,7 +120,7 @@ cd your-project
|
|
|
119
120
|
fcontext init
|
|
120
121
|
|
|
121
122
|
# 2. Activate your AI agent
|
|
122
|
-
fcontext enable copilot # or: claude, cursor, trae, qwen, opencode, openclaw
|
|
123
|
+
fcontext enable copilot # or: claude, cursor, trae, qwen, kiro, opencode, openclaw
|
|
123
124
|
|
|
124
125
|
# 3. Index your documents
|
|
125
126
|
fcontext index docs/
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
## How fcontext Works
|
|
4
|
+
|
|
5
|
+
fcontext operates on one principle: **structured local files that AI agents already know how to read**.
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
graph LR
|
|
9
|
+
subgraph "Your Project"
|
|
10
|
+
SRC["Source Code"]
|
|
11
|
+
DOCS["Documents<br/>PDF / DOCX / XLSX"]
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
subgraph ".fcontext/"
|
|
15
|
+
README["_README.md<br/>Project Summary"]
|
|
16
|
+
MAP["_workspace.map<br/>Structure"]
|
|
17
|
+
CACHE["_cache/<br/>Converted Docs"]
|
|
18
|
+
TOPICS["_topics/<br/>Session Knowledge"]
|
|
19
|
+
REQ["_requirements/<br/>Stories & Tasks"]
|
|
20
|
+
EXP["_experiences/<br/>Imported Packs"]
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
subgraph "Agent Configs"
|
|
24
|
+
GH[".github/instructions/"]
|
|
25
|
+
CL[".claude/rules/"]
|
|
26
|
+
CU[".cursor/rules/"]
|
|
27
|
+
TR[".trae/rules/"]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
SRC --> |fcontext init| README
|
|
31
|
+
SRC --> |fcontext init| MAP
|
|
32
|
+
DOCS --> |fcontext index| CACHE
|
|
33
|
+
|
|
34
|
+
README --> |fcontext enable| GH
|
|
35
|
+
README --> |fcontext enable| CL
|
|
36
|
+
README --> |fcontext enable| CU
|
|
37
|
+
README --> |fcontext enable| TR
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Directory Structure
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
.fcontext/
|
|
46
|
+
├── _README.md # Living project summary (AI-maintained)
|
|
47
|
+
├── _workspace.map # Auto-generated project structure
|
|
48
|
+
├── _cache/ # Binary → Markdown conversions
|
|
49
|
+
│ ├── specs/
|
|
50
|
+
│ │ └── requirements.pdf.md
|
|
51
|
+
│ └── docs/
|
|
52
|
+
│ └── architecture.docx.md
|
|
53
|
+
├── _topics/ # Session-accumulated knowledge
|
|
54
|
+
│ ├── auth-analysis.md
|
|
55
|
+
│ └── deploy-notes.md
|
|
56
|
+
├── _requirements/ # Structured requirement tracking
|
|
57
|
+
│ ├── STORY-001.yaml
|
|
58
|
+
│ └── TASK-001.yaml
|
|
59
|
+
└── _experiences/ # Imported knowledge packs (read-only)
|
|
60
|
+
└── domain-knowledge/
|
|
61
|
+
├── _README.md
|
|
62
|
+
├── _cache/
|
|
63
|
+
└── _topics/
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Data Flow
|
|
69
|
+
|
|
70
|
+
### Session Lifecycle
|
|
71
|
+
|
|
72
|
+
```mermaid
|
|
73
|
+
sequenceDiagram
|
|
74
|
+
participant Dev as Developer
|
|
75
|
+
participant Agent as AI Agent
|
|
76
|
+
participant FC as .fcontext/
|
|
77
|
+
|
|
78
|
+
Dev->>Agent: Start session
|
|
79
|
+
Agent->>FC: Read _README.md
|
|
80
|
+
Agent->>FC: Read _workspace.map
|
|
81
|
+
Agent->>FC: Read _topics/
|
|
82
|
+
Agent->>FC: Read _requirements/
|
|
83
|
+
Agent->>FC: Read _experiences/
|
|
84
|
+
|
|
85
|
+
Note over Agent: Full context loaded
|
|
86
|
+
|
|
87
|
+
Dev->>Agent: Ask question / Give task
|
|
88
|
+
Agent->>Agent: Work with full context
|
|
89
|
+
Agent->>FC: Write _topics/new-insight.md
|
|
90
|
+
Agent->>FC: Update _README.md
|
|
91
|
+
|
|
92
|
+
Note over FC: Knowledge persisted
|
|
93
|
+
|
|
94
|
+
Dev->>Agent: Next session (same or different agent)
|
|
95
|
+
Agent->>FC: Read updated context
|
|
96
|
+
Note over Agent: Continuity achieved
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Multi-Agent Configuration
|
|
100
|
+
|
|
101
|
+
When you run `fcontext enable <agent>`, the tool generates agent-specific instruction files that point back to `.fcontext/`:
|
|
102
|
+
|
|
103
|
+
```mermaid
|
|
104
|
+
graph TD
|
|
105
|
+
FC[".fcontext/<br/>Single Source of Truth"]
|
|
106
|
+
|
|
107
|
+
FC -->|enable copilot| GH[".github/instructions/<br/>fcontext.instructions.md"]
|
|
108
|
+
FC -->|enable claude| CL[".claude/rules/<br/>fcontext.md"]
|
|
109
|
+
FC -->|enable cursor| CU[".cursor/rules/<br/>fcontext.md"]
|
|
110
|
+
FC -->|enable trae| TR[".trae/rules/<br/>fcontext.md"]
|
|
111
|
+
|
|
112
|
+
GH --> A1["GitHub Copilot"]
|
|
113
|
+
CL --> A2["Claude Code"]
|
|
114
|
+
CU --> A3["Cursor"]
|
|
115
|
+
TR --> A4["Trae"]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Each instruction file contains:
|
|
119
|
+
|
|
120
|
+
1. **Workflow rules** — when to read/write `.fcontext/` data
|
|
121
|
+
2. **Anti-pattern rules** — what NOT to do (e.g., never modify `_experiences/`)
|
|
122
|
+
3. **Command reference** — available `fcontext` CLI commands
|
|
123
|
+
|
|
124
|
+
The instructions are **generated, not copied**. Each agent gets rules formatted for its own instruction system.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Design Principles
|
|
129
|
+
|
|
130
|
+
| Principle | Implementation |
|
|
131
|
+
|-----------|----------------|
|
|
132
|
+
| **Files over APIs** | All context is plain Markdown/YAML files |
|
|
133
|
+
| **Convention over configuration** | Fixed directory structure, no config needed |
|
|
134
|
+
| **Agent-agnostic** | Shared data, agent-specific instruction generation |
|
|
135
|
+
| **Additive knowledge** | Topics accumulate, nothing is auto-deleted |
|
|
136
|
+
| **Read-only imports** | Experience packs are immutable once imported |
|
|
137
|
+
| **Local-first** | No network required for core functionality |
|