floop 1.2.0__tar.gz → 2.0.1__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.
- floop-2.0.1/.github/workflows/cicd.yml +34 -0
- floop-2.0.1/LICENSE +21 -0
- floop-2.0.1/PKG-INFO +170 -0
- floop-2.0.1/README.md +155 -0
- {floop-1.2.0 → floop-2.0.1}/pyproject.toml +1 -1
- floop-2.0.1/src/floop/__init__.py +14 -0
- {floop-1.2.0 → floop-2.0.1}/src/floop/adapters.py +27 -6
- floop-2.0.1/src/floop/cli.py +625 -0
- floop-2.0.1/src/floop/preview.py +95 -0
- floop-2.0.1/src/floop/project.py +444 -0
- {floop-1.2.0 → floop-2.0.1}/src/floop/review.py +34 -102
- floop-2.0.1/src/floop/skills.py +159 -0
- floop-2.0.1/src/floop.egg-info/PKG-INFO +170 -0
- floop-2.0.1/src/floop.egg-info/SOURCES.txt +27 -0
- floop-2.0.1/src/floop.egg-info/scm_file_list.json +23 -0
- floop-2.0.1/src/floop.egg-info/scm_version.json +8 -0
- floop-2.0.1/tests/test_adapters.py +117 -0
- floop-2.0.1/tests/test_cli.py +555 -0
- floop-2.0.1/tests/test_preview.py +47 -0
- floop-2.0.1/tests/test_project.py +196 -0
- floop-2.0.1/tests/test_review.py +302 -0
- floop-1.2.0/.github/workflows/docs.yml +0 -66
- floop-1.2.0/PKG-INFO +0 -225
- floop-1.2.0/README.md +0 -212
- floop-1.2.0/docs/architecture.md +0 -150
- floop-1.2.0/docs/assets/javascripts/mermaid.min.js +0 -2811
- floop-1.2.0/docs/commands.md +0 -86
- floop-1.2.0/docs/contributing.md +0 -20
- floop-1.2.0/docs/demos/context-network.md +0 -276
- floop-1.2.0/docs/demos/cross-session.md +0 -114
- floop-1.2.0/docs/demos/domain-learning.md +0 -136
- floop-1.2.0/docs/demos/requirements-driven.md +0 -140
- floop-1.2.0/docs/demos/team-onboarding.md +0 -135
- floop-1.2.0/docs/features.md +0 -41
- floop-1.2.0/docs/getting-started.md +0 -34
- floop-1.2.0/docs/index.md +0 -84
- floop-1.2.0/docs/use-cases/enterprises.md +0 -112
- floop-1.2.0/docs/use-cases/individuals.md +0 -109
- floop-1.2.0/docs/use-cases.md +0 -18
- floop-1.2.0/mkdocs.yml +0 -77
- floop-1.2.0/src/floop/__init__.py +0 -8
- floop-1.2.0/src/floop/cli.py +0 -1469
- floop-1.2.0/src/floop/preview.py +0 -1032
- floop-1.2.0/src/floop/prototype.py +0 -793
- floop-1.2.0/src/floop/skills.py +0 -812
- floop-1.2.0/src/floop/tokens.py +0 -1336
- floop-1.2.0/src/floop.egg-info/PKG-INFO +0 -225
- floop-1.2.0/src/floop.egg-info/SOURCES.txt +0 -42
- floop-1.2.0/tests/test_adapters.py +0 -411
- floop-1.2.0/tests/test_cli.py +0 -1488
- floop-1.2.0/tests/test_preview.py +0 -792
- floop-1.2.0/tests/test_prototype.py +0 -1766
- floop-1.2.0/tests/test_review.py +0 -828
- floop-1.2.0/tests/test_tokens.py +0 -1122
- {floop-1.2.0 → floop-2.0.1}/.github/workflows/release.yml +0 -0
- {floop-1.2.0 → floop-2.0.1}/.gitignore +0 -0
- {floop-1.2.0 → floop-2.0.1}/setup.cfg +0 -0
- {floop-1.2.0 → floop-2.0.1}/src/floop.egg-info/dependency_links.txt +0 -0
- {floop-1.2.0 → floop-2.0.1}/src/floop.egg-info/entry_points.txt +0 -0
- {floop-1.2.0 → floop-2.0.1}/src/floop.egg-info/requires.txt +0 -0
- {floop-1.2.0 → floop-2.0.1}/src/floop.egg-info/top_level.txt +0 -0
- {floop-1.2.0 → floop-2.0.1}/tests/__init__.py +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
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.10', '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
|
floop-2.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 floop
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
floop-2.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: floop
|
|
3
|
+
Version: 2.0.1
|
|
4
|
+
Summary: Project/version review loop CLI and agent skill for AI artifacts
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: click>=8.1
|
|
10
|
+
Requires-Dist: pyyaml>=6.0
|
|
11
|
+
Provides-Extra: test
|
|
12
|
+
Requires-Dist: pytest>=8.0; extra == "test"
|
|
13
|
+
Requires-Dist: pytest-cov>=5.0; extra == "test"
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# floop-client
|
|
17
|
+
|
|
18
|
+
**floop-client is the CLI for project/version uploads and server comments.**
|
|
19
|
+
|
|
20
|
+
[](https://pypi.org/project/floop/)
|
|
21
|
+
[](https://pypi.org/project/floop/)
|
|
22
|
+
[](LICENSE)
|
|
23
|
+
[](#)
|
|
24
|
+
|
|
25
|
+
floop-client is intentionally small. It helps agents and users choose the right
|
|
26
|
+
local project/version, upload the right files to floop-server, read server
|
|
27
|
+
comments, and resolve comments after a newer version addresses them.
|
|
28
|
+
|
|
29
|
+
It does not build artifacts, validate design tokens, generate UI, or decide
|
|
30
|
+
which files belong to another tool. The tool or user that owns the files places
|
|
31
|
+
them in a floop version directory; floop handles the upload and comment loop.
|
|
32
|
+
|
|
33
|
+
## Core Flow
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
Create/select project -> Create/select version -> Add files -> Upload -> Read comments -> Resolve comments
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install floop
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Verify:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
floop --version
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Quick Start
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# 1. Initialize workspace
|
|
55
|
+
cd your-project
|
|
56
|
+
floop init
|
|
57
|
+
|
|
58
|
+
# 2. Install the floop skill into your AI agent
|
|
59
|
+
floop enable copilot # or: cursor, claude, trae, qwen-code, opencode, openclaw
|
|
60
|
+
|
|
61
|
+
# 3. Create and select a local project
|
|
62
|
+
floop projects create my-review
|
|
63
|
+
floop projects use my-review
|
|
64
|
+
|
|
65
|
+
# 4. Create and select a version
|
|
66
|
+
floop versions create v1 --project my-review --artifact-type custom --entrypoint index.html
|
|
67
|
+
floop versions use v1 --project my-review
|
|
68
|
+
|
|
69
|
+
# 5. Put uploadable files in .floop/my-review/v1/
|
|
70
|
+
|
|
71
|
+
# 6. Configure server access and upload
|
|
72
|
+
floop review set --project my-review
|
|
73
|
+
floop review upload --project my-review --version v1 --json-output
|
|
74
|
+
|
|
75
|
+
# 7. Read server comments and cache them locally
|
|
76
|
+
floop comments --project my-review --version v1 --version-id <server-version-id> --json-output
|
|
77
|
+
|
|
78
|
+
# 8. Resolve addressed comments after a newer version has been uploaded
|
|
79
|
+
floop resolve <comment-id> --project my-review --version-id <server-version-id> --status resolved
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Workspace
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
.floop/
|
|
86
|
+
├─ floop.env # Server URL + API key only
|
|
87
|
+
├─ projects.csv # Local projects, server bindings, selected project/version
|
|
88
|
+
└─ <projectid>/
|
|
89
|
+
└─ <version>/
|
|
90
|
+
├─ floop.version.json
|
|
91
|
+
├─ floop.upload.json
|
|
92
|
+
├─ floop.comments.json
|
|
93
|
+
└─ ...uploadable files...
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`.floop/floop.env` contains secrets. floop-client warns through docs and command
|
|
97
|
+
copy, but it does not create or edit `.floop/.gitignore`; ignore policy belongs
|
|
98
|
+
to the host repository.
|
|
99
|
+
|
|
100
|
+
Legacy workspaces under `.floop/projects/<project>/versions/<version>/` are
|
|
101
|
+
readable for compatibility. floop-client does not move or delete legacy files
|
|
102
|
+
automatically.
|
|
103
|
+
|
|
104
|
+
## Commands
|
|
105
|
+
|
|
106
|
+
### Workspace
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
floop init
|
|
110
|
+
floop preview
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Projects
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
floop projects
|
|
117
|
+
floop projects create <project>
|
|
118
|
+
floop projects use <project>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Versions
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
floop versions --project <project>
|
|
125
|
+
floop versions create <version> --project <project> --artifact-type <type> --entrypoint index.html
|
|
126
|
+
floop versions use <version> --project <project>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
When a project and version are selected, commands that support defaults can use
|
|
130
|
+
the selected values.
|
|
131
|
+
|
|
132
|
+
### Server
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
floop review set --project <project>
|
|
136
|
+
floop review upload --project <project> --version <version> --json-output
|
|
137
|
+
floop comments --project <project> --version <local-version> --version-id <server-version-id> --json-output
|
|
138
|
+
floop resolve <comment-id> --project <project> --version-id <server-version-id> --status resolved
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Responsibility Boundary
|
|
142
|
+
|
|
143
|
+
| floop-client owns | Other tools or users own |
|
|
144
|
+
|---|---|
|
|
145
|
+
| `.floop/` workspace | Source files |
|
|
146
|
+
| `projects.csv` project/version selection | File generation |
|
|
147
|
+
| Server project binding | File validation |
|
|
148
|
+
| Version upload | Build systems |
|
|
149
|
+
| Server comments cache | Artifact internals |
|
|
150
|
+
| Comment status updates | Content changes |
|
|
151
|
+
|
|
152
|
+
## Supported Agents
|
|
153
|
+
|
|
154
|
+
| Agent | Command |
|
|
155
|
+
|-------|---------|
|
|
156
|
+
| GitHub Copilot | `floop enable copilot` |
|
|
157
|
+
| Cursor | `floop enable cursor` |
|
|
158
|
+
| Claude Code | `floop enable claude` |
|
|
159
|
+
| Trae IDE | `floop enable trae` |
|
|
160
|
+
| Qwen Code | `floop enable qwen-code` |
|
|
161
|
+
| OpenCode | `floop enable opencode` |
|
|
162
|
+
| OpenClaw | `floop enable openclaw` |
|
|
163
|
+
|
|
164
|
+
## For Contributors
|
|
165
|
+
|
|
166
|
+
Run the full test gate:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
PYTHONPATH=src python3 -m pytest --cov=floop --cov-report=term-missing --cov-fail-under=100
|
|
170
|
+
```
|
floop-2.0.1/README.md
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# floop-client
|
|
2
|
+
|
|
3
|
+
**floop-client is the CLI for project/version uploads and server comments.**
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/floop/)
|
|
6
|
+
[](https://pypi.org/project/floop/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](#)
|
|
9
|
+
|
|
10
|
+
floop-client is intentionally small. It helps agents and users choose the right
|
|
11
|
+
local project/version, upload the right files to floop-server, read server
|
|
12
|
+
comments, and resolve comments after a newer version addresses them.
|
|
13
|
+
|
|
14
|
+
It does not build artifacts, validate design tokens, generate UI, or decide
|
|
15
|
+
which files belong to another tool. The tool or user that owns the files places
|
|
16
|
+
them in a floop version directory; floop handles the upload and comment loop.
|
|
17
|
+
|
|
18
|
+
## Core Flow
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
Create/select project -> Create/select version -> Add files -> Upload -> Read comments -> Resolve comments
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install floop
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Verify:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
floop --version
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# 1. Initialize workspace
|
|
40
|
+
cd your-project
|
|
41
|
+
floop init
|
|
42
|
+
|
|
43
|
+
# 2. Install the floop skill into your AI agent
|
|
44
|
+
floop enable copilot # or: cursor, claude, trae, qwen-code, opencode, openclaw
|
|
45
|
+
|
|
46
|
+
# 3. Create and select a local project
|
|
47
|
+
floop projects create my-review
|
|
48
|
+
floop projects use my-review
|
|
49
|
+
|
|
50
|
+
# 4. Create and select a version
|
|
51
|
+
floop versions create v1 --project my-review --artifact-type custom --entrypoint index.html
|
|
52
|
+
floop versions use v1 --project my-review
|
|
53
|
+
|
|
54
|
+
# 5. Put uploadable files in .floop/my-review/v1/
|
|
55
|
+
|
|
56
|
+
# 6. Configure server access and upload
|
|
57
|
+
floop review set --project my-review
|
|
58
|
+
floop review upload --project my-review --version v1 --json-output
|
|
59
|
+
|
|
60
|
+
# 7. Read server comments and cache them locally
|
|
61
|
+
floop comments --project my-review --version v1 --version-id <server-version-id> --json-output
|
|
62
|
+
|
|
63
|
+
# 8. Resolve addressed comments after a newer version has been uploaded
|
|
64
|
+
floop resolve <comment-id> --project my-review --version-id <server-version-id> --status resolved
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Workspace
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
.floop/
|
|
71
|
+
├─ floop.env # Server URL + API key only
|
|
72
|
+
├─ projects.csv # Local projects, server bindings, selected project/version
|
|
73
|
+
└─ <projectid>/
|
|
74
|
+
└─ <version>/
|
|
75
|
+
├─ floop.version.json
|
|
76
|
+
├─ floop.upload.json
|
|
77
|
+
├─ floop.comments.json
|
|
78
|
+
└─ ...uploadable files...
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`.floop/floop.env` contains secrets. floop-client warns through docs and command
|
|
82
|
+
copy, but it does not create or edit `.floop/.gitignore`; ignore policy belongs
|
|
83
|
+
to the host repository.
|
|
84
|
+
|
|
85
|
+
Legacy workspaces under `.floop/projects/<project>/versions/<version>/` are
|
|
86
|
+
readable for compatibility. floop-client does not move or delete legacy files
|
|
87
|
+
automatically.
|
|
88
|
+
|
|
89
|
+
## Commands
|
|
90
|
+
|
|
91
|
+
### Workspace
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
floop init
|
|
95
|
+
floop preview
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Projects
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
floop projects
|
|
102
|
+
floop projects create <project>
|
|
103
|
+
floop projects use <project>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Versions
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
floop versions --project <project>
|
|
110
|
+
floop versions create <version> --project <project> --artifact-type <type> --entrypoint index.html
|
|
111
|
+
floop versions use <version> --project <project>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
When a project and version are selected, commands that support defaults can use
|
|
115
|
+
the selected values.
|
|
116
|
+
|
|
117
|
+
### Server
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
floop review set --project <project>
|
|
121
|
+
floop review upload --project <project> --version <version> --json-output
|
|
122
|
+
floop comments --project <project> --version <local-version> --version-id <server-version-id> --json-output
|
|
123
|
+
floop resolve <comment-id> --project <project> --version-id <server-version-id> --status resolved
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Responsibility Boundary
|
|
127
|
+
|
|
128
|
+
| floop-client owns | Other tools or users own |
|
|
129
|
+
|---|---|
|
|
130
|
+
| `.floop/` workspace | Source files |
|
|
131
|
+
| `projects.csv` project/version selection | File generation |
|
|
132
|
+
| Server project binding | File validation |
|
|
133
|
+
| Version upload | Build systems |
|
|
134
|
+
| Server comments cache | Artifact internals |
|
|
135
|
+
| Comment status updates | Content changes |
|
|
136
|
+
|
|
137
|
+
## Supported Agents
|
|
138
|
+
|
|
139
|
+
| Agent | Command |
|
|
140
|
+
|-------|---------|
|
|
141
|
+
| GitHub Copilot | `floop enable copilot` |
|
|
142
|
+
| Cursor | `floop enable cursor` |
|
|
143
|
+
| Claude Code | `floop enable claude` |
|
|
144
|
+
| Trae IDE | `floop enable trae` |
|
|
145
|
+
| Qwen Code | `floop enable qwen-code` |
|
|
146
|
+
| OpenCode | `floop enable opencode` |
|
|
147
|
+
| OpenClaw | `floop enable openclaw` |
|
|
148
|
+
|
|
149
|
+
## For Contributors
|
|
150
|
+
|
|
151
|
+
Run the full test gate:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
PYTHONPATH=src python3 -m pytest --cov=floop --cov-report=term-missing --cov-fail-under=100
|
|
155
|
+
```
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "floop"
|
|
7
7
|
dynamic = ["version"]
|
|
8
|
-
description = "
|
|
8
|
+
description = "Project/version review loop CLI and agent skill for AI artifacts"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
requires-python = ">=3.10"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""floop-client package metadata."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
try:
|
|
7
|
+
__version__ = version("floop")
|
|
8
|
+
except PackageNotFoundError: # pragma: no cover - source tree fallback depends on install mode.
|
|
9
|
+
try:
|
|
10
|
+
from setuptools_scm import get_version
|
|
11
|
+
|
|
12
|
+
__version__ = get_version(root=Path(__file__).resolve().parents[2])
|
|
13
|
+
except Exception:
|
|
14
|
+
__version__ = "0+unknown"
|
|
@@ -7,6 +7,7 @@ configuration format and directory structure.
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
9
|
import os
|
|
10
|
+
import shutil
|
|
10
11
|
from pathlib import Path
|
|
11
12
|
from typing import Protocol
|
|
12
13
|
|
|
@@ -15,6 +16,9 @@ import click
|
|
|
15
16
|
from floop.skills import INSTRUCTION, SKILLS
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
LEGACY_SKILL_NAMES = ("floop-feedback", "floop-prototype", "floop-review")
|
|
20
|
+
|
|
21
|
+
|
|
18
22
|
class AgentAdapter(Protocol):
|
|
19
23
|
"""Interface for agent platform adapters."""
|
|
20
24
|
|
|
@@ -42,8 +46,7 @@ class CopilotAdapter:
|
|
|
42
46
|
instr_path = instr_dir / "floop.instructions.md"
|
|
43
47
|
instr_path.write_text(
|
|
44
48
|
"---\n"
|
|
45
|
-
"description: 'This project uses floop for
|
|
46
|
-
"Follow the floop workflow for design tokens, sitemap, components, and page generation.'\n"
|
|
49
|
+
"description: 'This project uses floop for projects, versions, uploads, and server comments.'\n"
|
|
47
50
|
"applyTo: '**'\n"
|
|
48
51
|
"---\n\n"
|
|
49
52
|
+ INSTRUCTION,
|
|
@@ -53,6 +56,7 @@ class CopilotAdapter:
|
|
|
53
56
|
|
|
54
57
|
# Write skill files
|
|
55
58
|
skills_dir = project_dir / ".github" / "skills"
|
|
59
|
+
_remove_legacy_skill_dirs(skills_dir)
|
|
56
60
|
|
|
57
61
|
for skill in SKILLS.values():
|
|
58
62
|
skill_dir = skills_dir / skill["name"]
|
|
@@ -86,12 +90,13 @@ class CursorAdapter:
|
|
|
86
90
|
created: list[Path] = []
|
|
87
91
|
rules_dir = project_dir / ".cursor" / "rules"
|
|
88
92
|
rules_dir.mkdir(parents=True, exist_ok=True)
|
|
93
|
+
_remove_legacy_skill_files(rules_dir, ".mdc")
|
|
89
94
|
|
|
90
95
|
# Write always-on instruction rule
|
|
91
96
|
instr_path = rules_dir / "floop.mdc"
|
|
92
97
|
instr_path.write_text(
|
|
93
98
|
'---\n'
|
|
94
|
-
'description: "floop
|
|
99
|
+
'description: "floop project/version upload workflow — always-on context"\n'
|
|
95
100
|
'globs: \n'
|
|
96
101
|
'alwaysApply: true\n'
|
|
97
102
|
'---\n\n'
|
|
@@ -135,6 +140,7 @@ class ClaudeAdapter:
|
|
|
135
140
|
|
|
136
141
|
# Write individual skill files
|
|
137
142
|
skills_dir = project_dir / ".claude" / "skills"
|
|
143
|
+
_remove_legacy_skill_dirs(skills_dir)
|
|
138
144
|
for skill in SKILLS.values():
|
|
139
145
|
skill_dir = skills_dir / skill["name"]
|
|
140
146
|
skill_dir.mkdir(parents=True, exist_ok=True)
|
|
@@ -180,7 +186,7 @@ class ClaudeAdapter:
|
|
|
180
186
|
|
|
181
187
|
@staticmethod
|
|
182
188
|
def _render_claude_md() -> str:
|
|
183
|
-
lines = ["<!-- floop:skills -->", "## floop
|
|
189
|
+
lines = ["<!-- floop:skills -->", "## floop Skill\n"]
|
|
184
190
|
for skill in SKILLS.values():
|
|
185
191
|
lines.append(f'- **{skill["name"]}**: {skill["description"]}')
|
|
186
192
|
lines.append(
|
|
@@ -207,7 +213,7 @@ class TraeAdapter:
|
|
|
207
213
|
|
|
208
214
|
@staticmethod
|
|
209
215
|
def _render() -> str:
|
|
210
|
-
lines = ["# floop Workflow Rules\n", INSTRUCTION, "\n## floop
|
|
216
|
+
lines = ["# floop Workflow Rules\n", INSTRUCTION, "\n## floop Skill\n"]
|
|
211
217
|
for skill in SKILLS.values():
|
|
212
218
|
lines.append(f'### {skill["name"]}\n')
|
|
213
219
|
lines.append(skill["content"])
|
|
@@ -231,6 +237,7 @@ class _AgentsMdAdapter:
|
|
|
231
237
|
|
|
232
238
|
if self._skills_subdir:
|
|
233
239
|
skills_dir = project_dir / f".{self._skills_subdir}" / "skills"
|
|
240
|
+
_remove_legacy_skill_dirs(skills_dir)
|
|
234
241
|
for skill in SKILLS.values():
|
|
235
242
|
skill_dir = skills_dir / skill["name"]
|
|
236
243
|
skill_dir.mkdir(parents=True, exist_ok=True)
|
|
@@ -279,7 +286,7 @@ class _AgentsMdAdapter:
|
|
|
279
286
|
lines.append(f'- **{skill["name"]}**: {skill["description"]}')
|
|
280
287
|
lines.append(
|
|
281
288
|
f' - See `.{self._skills_subdir}/skills/'
|
|
282
|
-
f'{skill["name"]}/SKILL.md` for full
|
|
289
|
+
f'{skill["name"]}/SKILL.md` for full rules'
|
|
283
290
|
)
|
|
284
291
|
lines.append("\n<!-- /floop:skills -->")
|
|
285
292
|
return "\n".join(lines) + "\n"
|
|
@@ -318,3 +325,17 @@ ADAPTERS: dict[str, type[AgentAdapter]] = {
|
|
|
318
325
|
}
|
|
319
326
|
|
|
320
327
|
SUPPORTED_AGENTS = list(ADAPTERS.keys())
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
def _remove_legacy_skill_dirs(skills_dir: Path) -> None:
|
|
331
|
+
for name in LEGACY_SKILL_NAMES:
|
|
332
|
+
path = skills_dir / name
|
|
333
|
+
if path.exists():
|
|
334
|
+
shutil.rmtree(path)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
def _remove_legacy_skill_files(rules_dir: Path, suffix: str) -> None:
|
|
338
|
+
for name in LEGACY_SKILL_NAMES:
|
|
339
|
+
path = rules_dir / f"{name}{suffix}"
|
|
340
|
+
if path.exists():
|
|
341
|
+
path.unlink()
|