foil-ai 0.6.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.
Files changed (112) hide show
  1. foil_ai-0.6.1/.github/workflows/ci.yml +68 -0
  2. foil_ai-0.6.1/.github/workflows/release.yml +66 -0
  3. foil_ai-0.6.1/.gitignore +8 -0
  4. foil_ai-0.6.1/LICENSE +202 -0
  5. foil_ai-0.6.1/PKG-INFO +283 -0
  6. foil_ai-0.6.1/README.md +251 -0
  7. foil_ai-0.6.1/README.zh-CN.md +251 -0
  8. foil_ai-0.6.1/docs/README.md +31 -0
  9. foil_ai-0.6.1/docs/architecture.md +241 -0
  10. foil_ai-0.6.1/docs/demo.md +228 -0
  11. foil_ai-0.6.1/docs/demo.zh-CN.md +201 -0
  12. foil_ai-0.6.1/docs/issue-18-project-vs-global.md +108 -0
  13. foil_ai-0.6.1/docs/issue-42-viewer.md +548 -0
  14. foil_ai-0.6.1/docs/issue-66-global-settings.md +381 -0
  15. foil_ai-0.6.1/docs/plan-v0.2.0.md +441 -0
  16. foil_ai-0.6.1/docs/plan-v0.2.1.md +759 -0
  17. foil_ai-0.6.1/docs/plan-v0.2.2.md +218 -0
  18. foil_ai-0.6.1/docs/plan-v0.3.0.md +74 -0
  19. foil_ai-0.6.1/docs/plan-v0.3.1.md +220 -0
  20. foil_ai-0.6.1/docs/requirements.md +512 -0
  21. foil_ai-0.6.1/pyproject.toml +104 -0
  22. foil_ai-0.6.1/skills/lead.md +1 -0
  23. foil_ai-0.6.1/skills/operator.md +1 -0
  24. foil_ai-0.6.1/skills/worker.md +1 -0
  25. foil_ai-0.6.1/src/foil/__init__.py +3 -0
  26. foil_ai-0.6.1/src/foil/__main__.py +5 -0
  27. foil_ai-0.6.1/src/foil/board.py +321 -0
  28. foil_ai-0.6.1/src/foil/board_ops.py +119 -0
  29. foil_ai-0.6.1/src/foil/cli.py +392 -0
  30. foil_ai-0.6.1/src/foil/defaults/harnesses.toml +77 -0
  31. foil_ai-0.6.1/src/foil/defaults/personas/documentation-writer.md +10 -0
  32. foil_ai-0.6.1/src/foil/defaults/personas/domain-designer.md +10 -0
  33. foil_ai-0.6.1/src/foil/defaults/personas/implementer.md +10 -0
  34. foil_ai-0.6.1/src/foil/defaults/personas/lead.md +9 -0
  35. foil_ai-0.6.1/src/foil/defaults/personas/memory-curator.md +9 -0
  36. foil_ai-0.6.1/src/foil/defaults/personas/researcher.md +10 -0
  37. foil_ai-0.6.1/src/foil/defaults/personas/reviewer.md +11 -0
  38. foil_ai-0.6.1/src/foil/defaults/personas/verifier.md +10 -0
  39. foil_ai-0.6.1/src/foil/defaults/skills/lead.md +169 -0
  40. foil_ai-0.6.1/src/foil/defaults/skills/operator.md +232 -0
  41. foil_ai-0.6.1/src/foil/defaults/skills/worker.md +84 -0
  42. foil_ai-0.6.1/src/foil/errors.py +61 -0
  43. foil_ai-0.6.1/src/foil/lifecycle.py +1167 -0
  44. foil_ai-0.6.1/src/foil/mail_ops.py +83 -0
  45. foil_ai-0.6.1/src/foil/memory.py +114 -0
  46. foil_ai-0.6.1/src/foil/presets.py +892 -0
  47. foil_ai-0.6.1/src/foil/project.py +1051 -0
  48. foil_ai-0.6.1/src/foil/roster_ops.py +738 -0
  49. foil_ai-0.6.1/src/foil/runner.py +90 -0
  50. foil_ai-0.6.1/src/foil/store.py +298 -0
  51. foil_ai-0.6.1/src/foil/tmux.py +379 -0
  52. foil_ai-0.6.1/src/foil/view.py +1603 -0
  53. foil_ai-0.6.1/tests/__init__.py +0 -0
  54. foil_ai-0.6.1/tests/conftest.py +23 -0
  55. foil_ai-0.6.1/tests/e2e/__init__.py +1 -0
  56. foil_ai-0.6.1/tests/e2e/conftest.py +20 -0
  57. foil_ai-0.6.1/tests/e2e/test_archive.py +313 -0
  58. foil_ai-0.6.1/tests/e2e/test_live.py +198 -0
  59. foil_ai-0.6.1/tests/e2e/test_roster.py +250 -0
  60. foil_ai-0.6.1/tests/e2e/test_scenarios.py +1106 -0
  61. foil_ai-0.6.1/tests/e2e/test_spawn_dialog.py +81 -0
  62. foil_ai-0.6.1/tests/e2e/test_view.py +170 -0
  63. foil_ai-0.6.1/tests/fixtures/scenario-1/TASK.md +27 -0
  64. foil_ai-0.6.1/tests/fixtures/scenario-1/calc.py +2 -0
  65. foil_ai-0.6.1/tests/fixtures/scenario-1/check_calc.py +5 -0
  66. foil_ai-0.6.1/tests/fixtures/scenario-1/fix.sh +8 -0
  67. foil_ai-0.6.1/tests/fixtures/scenario-1/review.sh +17 -0
  68. foil_ai-0.6.1/tests/fixtures/scenario-1/scripts/implementer.json +10 -0
  69. foil_ai-0.6.1/tests/fixtures/scenario-1/scripts/lead.json +23 -0
  70. foil_ai-0.6.1/tests/fixtures/scenario-1/scripts/reviewer.json +10 -0
  71. foil_ai-0.6.1/tests/fixtures/scenario-2/README.md +3 -0
  72. foil_ai-0.6.1/tests/fixtures/scenario-4/TASK.md +9 -0
  73. foil_ai-0.6.1/tests/fixtures/scenario-4/scripts/lead.json +22 -0
  74. foil_ai-0.6.1/tests/fixtures/scenario-5/README.md +3 -0
  75. foil_ai-0.6.1/tests/fixtures/scenario-5/TASK.md +19 -0
  76. foil_ai-0.6.1/tests/fixtures/scenario-5/accept.sh +17 -0
  77. foil_ai-0.6.1/tests/fixtures/scenario-5/propose.sh +13 -0
  78. foil_ai-0.6.1/tests/fixtures/scenario-5/scripts/implementer.json +10 -0
  79. foil_ai-0.6.1/tests/fixtures/scenario-5/scripts/lead.json +16 -0
  80. foil_ai-0.6.1/tests/fixtures/scenario-6/README.md +3 -0
  81. foil_ai-0.6.1/tests/fixtures/scenario-7/README.md +5 -0
  82. foil_ai-0.6.1/tests/fixtures/scenario-7/scripts/lead.json +13 -0
  83. foil_ai-0.6.1/tests/harness/foil_fake.py +196 -0
  84. foil_ai-0.6.1/tests/integration/test_nudge_submit.py +127 -0
  85. foil_ai-0.6.1/tests/integration/test_window_identity_integration.py +103 -0
  86. foil_ai-0.6.1/tests/test_archive.py +782 -0
  87. foil_ai-0.6.1/tests/test_artifacts.py +217 -0
  88. foil_ai-0.6.1/tests/test_central_store.py +1520 -0
  89. foil_ai-0.6.1/tests/test_command_surface.py +337 -0
  90. foil_ai-0.6.1/tests/test_docs_hygiene.py +254 -0
  91. foil_ai-0.6.1/tests/test_global_overrides.py +125 -0
  92. foil_ai-0.6.1/tests/test_init.py +373 -0
  93. foil_ai-0.6.1/tests/test_mail_board_ops.py +646 -0
  94. foil_ai-0.6.1/tests/test_package_size.py +42 -0
  95. foil_ai-0.6.1/tests/test_presets.py +938 -0
  96. foil_ai-0.6.1/tests/test_remain_on_exit.py +134 -0
  97. foil_ai-0.6.1/tests/test_room_post.py +1206 -0
  98. foil_ai-0.6.1/tests/test_roster_ops.py +1662 -0
  99. foil_ai-0.6.1/tests/test_skills.py +913 -0
  100. foil_ai-0.6.1/tests/test_slice_b.py +262 -0
  101. foil_ai-0.6.1/tests/test_slice_e.py +488 -0
  102. foil_ai-0.6.1/tests/test_slice_f.py +135 -0
  103. foil_ai-0.6.1/tests/test_spawn.py +897 -0
  104. foil_ai-0.6.1/tests/test_star.py +205 -0
  105. foil_ai-0.6.1/tests/test_store.py +143 -0
  106. foil_ai-0.6.1/tests/test_upgrade_compat.py +89 -0
  107. foil_ai-0.6.1/tests/test_version.py +30 -0
  108. foil_ai-0.6.1/tests/test_view.py +1486 -0
  109. foil_ai-0.6.1/tests/test_view_browser.py +157 -0
  110. foil_ai-0.6.1/tests/unit/test_runner.py +85 -0
  111. foil_ai-0.6.1/tests/unit/test_tmux_window_identity.py +611 -0
  112. foil_ai-0.6.1/uv.lock +345 -0
@@ -0,0 +1,68 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ test:
13
+ name: Python ${{ matrix.python-version }} ${{ matrix.suite }}
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ["3.11", "3.12"]
19
+ # The two tiers run as separate jobs at the same time.
20
+ suite: [unit, e2e]
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - uses: astral-sh/setup-uv@v5
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+ - name: Install tmux
27
+ run: sudo apt-get update && sudo apt-get install -y tmux
28
+ - if: matrix.suite == 'unit'
29
+ uses: actions/cache@v4
30
+ with:
31
+ path: ~/.cache/ms-playwright
32
+ key: playwright-${{ runner.os }}-${{ hashFiles('uv.lock') }}
33
+ - name: Install Chromium for the viewer's browser tests
34
+ if: matrix.suite == 'unit'
35
+ run: uv run --no-config --frozen --isolated --extra dev playwright install --with-deps --only-shell chromium
36
+ - name: Test
37
+ if: matrix.suite == 'unit'
38
+ run: uv run --no-config --frozen --isolated --extra dev pytest --ignore=tests/e2e
39
+ - name: End-to-end user journeys
40
+ if: matrix.suite == 'e2e'
41
+ run: uv run --no-config --frozen --isolated --extra dev pytest tests/e2e -m "not e2e_live"
42
+ - name: Lint
43
+ if: matrix.suite == 'e2e'
44
+ run: uv run --no-config --frozen --isolated --extra dev ruff check .
45
+ - name: Build
46
+ if: matrix.suite == 'e2e'
47
+ run: uv build --no-config
48
+ - name: Smoke-test installed wheel
49
+ if: matrix.suite == 'e2e'
50
+ run: |
51
+ wheel_env="$RUNNER_TEMP/foil-wheel-smoke"
52
+ uv venv --no-config "$wheel_env"
53
+ uv pip install --no-config --python "$wheel_env/bin/python" dist/foil_ai-*.whl
54
+ version="$(uv run --no-config --frozen --isolated python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
55
+ test "$("$wheel_env/bin/foil" --version)" = "foil $version"
56
+
57
+ # The required checks are named "Python 3.11" and "Python 3.12". Each passes only when
58
+ # every test job above passed, so neither tier can fail without blocking a merge.
59
+ gate:
60
+ name: Python ${{ matrix.python-version }}
61
+ needs: test
62
+ if: always()
63
+ runs-on: ubuntu-latest
64
+ strategy:
65
+ matrix:
66
+ python-version: ["3.11", "3.12"]
67
+ steps:
68
+ - run: test "${{ needs.test.result }}" = success
@@ -0,0 +1,66 @@
1
+ name: Release
2
+
3
+ # Publishes foil-ai to PyPI when a vX.Y.Z tag is pushed. Run it by hand
4
+ # with a tag to retry a publish that failed.
5
+ on:
6
+ push:
7
+ tags: ["v*"]
8
+ workflow_dispatch:
9
+ inputs:
10
+ tag:
11
+ description: "Existing tag to publish, for example v0.6.1"
12
+ required: true
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ build:
19
+ name: Build
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ with:
24
+ ref: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
25
+ persist-credentials: false
26
+ - uses: astral-sh/setup-uv@v5
27
+ with:
28
+ python-version: "3.12"
29
+ - name: Check the tag matches the package version
30
+ env:
31
+ TAG: ${{ inputs.tag || github.ref_name }}
32
+ run: |
33
+ version="$(uv run --no-config --frozen --isolated python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
34
+ test "$TAG" = "v$version" || { echo "tag $TAG does not match version $version"; exit 1; }
35
+ - name: Build
36
+ run: uv build --no-config
37
+ - name: Smoke-test installed wheel
38
+ env:
39
+ TAG: ${{ inputs.tag || github.ref_name }}
40
+ run: |
41
+ wheel_env="$RUNNER_TEMP/foil-wheel-smoke"
42
+ uv venv --no-config "$wheel_env"
43
+ uv pip install --no-config --python "$wheel_env/bin/python" dist/foil_ai-*.whl
44
+ test "$("$wheel_env/bin/foil" --version)" = "foil ${TAG#v}"
45
+ - uses: actions/upload-artifact@v4
46
+ with:
47
+ name: dist
48
+ path: dist/
49
+
50
+ publish:
51
+ name: Publish to PyPI
52
+ needs: build
53
+ runs-on: ubuntu-latest
54
+ # Trusted publishing: PyPI accepts this job's OIDC token, so no API token
55
+ # is stored in the repository.
56
+ environment:
57
+ name: pypi
58
+ url: https://pypi.org/project/foil-ai/
59
+ permissions:
60
+ id-token: write
61
+ steps:
62
+ - uses: actions/download-artifact@v4
63
+ with:
64
+ name: dist
65
+ path: dist/
66
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,8 @@
1
+ .venv/
2
+ .pytest_cache/
3
+ .hypothesis/
4
+ .ruff_cache/
5
+ dist/
6
+ __pycache__/
7
+ *.py[cod]
8
+ .DS_Store
foil_ai-0.6.1/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
foil_ai-0.6.1/PKG-INFO ADDED
@@ -0,0 +1,283 @@
1
+ Metadata-Version: 2.5
2
+ Name: foil-ai
3
+ Version: 0.6.1
4
+ Summary: Your agents' loyal opposition: Claude Code, Codex, Gemini, OpenCode, and Grok as a small team that plans, implements, reviews, and merges in tmux, with a read-only local viewer
5
+ Project-URL: Homepage, https://github.com/TiantianFlow/foil
6
+ Project-URL: Repository, https://github.com/TiantianFlow/foil
7
+ Project-URL: Issues, https://github.com/TiantianFlow/foil/issues
8
+ Project-URL: Documentation, https://github.com/TiantianFlow/foil#readme
9
+ Author-email: TiantianFlow <177855728+TiantianFlow@users.noreply.github.com>
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ Keywords: agents,ai-agents,claude-code,cli,code-review,codex,coding-agents,gemini,git-worktree,multi-agent,opencode,orchestration,tmux
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Operating System :: MacOS
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Software Development
23
+ Classifier: Topic :: Software Development :: Quality Assurance
24
+ Requires-Python: >=3.11
25
+ Provides-Extra: dev
26
+ Requires-Dist: hypothesis; extra == 'dev'
27
+ Requires-Dist: playwright; extra == 'dev'
28
+ Requires-Dist: pytest; extra == 'dev'
29
+ Requires-Dist: pytest-xdist; extra == 'dev'
30
+ Requires-Dist: ruff; extra == 'dev'
31
+ Description-Content-Type: text/markdown
32
+
33
+ # Foil · 运筹
34
+
35
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/TiantianFlow/foil/blob/main/LICENSE)
36
+ [![Version](https://img.shields.io/badge/version-0.6.1-informational)](https://github.com/TiantianFlow/foil)
37
+ [![CI](https://github.com/TiantianFlow/foil/actions/workflows/ci.yml/badge.svg)](https://github.com/TiantianFlow/foil/actions/workflows/ci.yml)
38
+ [![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://github.com/TiantianFlow/foil/blob/main/pyproject.toml)
39
+ [![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20macOS-lightgrey)](https://github.com/TiantianFlow/foil/blob/main/pyproject.toml)
40
+ [![Runtime dependencies](https://img.shields.io/badge/runtime%20dependencies-none-brightgreen)](https://github.com/TiantianFlow/foil/blob/main/pyproject.toml)
41
+
42
+ [中文](https://github.com/TiantianFlow/foil/blob/main/README.zh-CN.md)
43
+
44
+ **Your agents' loyal opposition.**
45
+
46
+ Foil turns the coding agents you already use (Claude Code, Codex, Gemini, OpenCode, Grok) into a small team. You talk to one agent. It hands your goal to a lead. The lead plans the work, gives each task to a worker with its own Git branch, has another agent check the result, and merges it. Every agent runs in tmux, and every message is a file you can read.
47
+
48
+ ## Why Foil
49
+
50
+ ### Stop managing your agents by hand
51
+
52
+ The pattern that works is a split: one agent plans, another implements, a third reviews. Claude Code even ships an `opusplan` setting that plans with Opus and builds with Sonnet. Across tools, though, the split usually means you do the plumbing: copy the plan into another terminal, relay the result back, remind each agent what was decided.
53
+
54
+ Foil makes the split a structure. The lead plans, spawns workers by role, and merges their branches. The task file `board/tasks/<id>.md` is the brief, and the mail is the pointer to it. `foil seat spawn --task` writes that mail and does not write the task file. You talk to one operator agent, and the lead does the managing.
55
+
56
+ ### A clean-context check that doesn't take "done" for an answer
57
+
58
+ An agent that has worked for an hour grades its own work with everything it believed along the way. It skips the step it forgot, trusts the test it wrote, and says "I'm done" when it isn't. Long sessions make it worse: the context fills up, quality drops, and compaction loses details.
59
+
60
+ In Foil, every seat starts clean and sees only its role and its task. The reviewer never saw the implementer's reasoning, only the result, so it checks the work instead of the story, and the lead asks for that check before it reports the goal done. Small, clean contexts also let the work run longer and stay correct: each seat does one job, and the plan, mail, and status live on disk, not in anyone's memory. That is the loyal opposition, and where Foil gets its name: a foil is the character whose contrast shows what the other one missed.
61
+
62
+ ### Use the best model for each job, from any provider
63
+
64
+ Models differ. Some reason better, some write code faster, some cost less, and some still have usage left this week. In Foil, each role is a template with an ordered list of harness entries. Each entry is an id and an optional model, and a spawn takes the entry at the count of seat records already stored for that role. The lead can plan on a strong reasoning model, implementers can run on a fast one, and the reviewer can come from a different vendor, which adds a second kind of independence: different training, different blind spots. Each seat uses its own CLI's login, so the work spreads across subscriptions you already pay for. Foil never stores your keys or logins.
65
+
66
+ ## How it works
67
+
68
+ ```mermaid
69
+ flowchart TB
70
+ you(["You"])
71
+ operator["<b>Operator agent</b><br/>the harness you chat with<br/>e.g. Claude Code or Codex"]
72
+ foil[["<b>foil</b><br/>command-line tool"]]
73
+
74
+ subgraph fleet["tmux session · headless agents, each on the harness and model you pick"]
75
+ lead["<b>Lead</b><br/>plans · delegates · merges"]
76
+ impl["<b>Implementer</b><br/>writes the code"]
77
+ rev["<b>Reviewer</b><br/>checks the work"]
78
+ end
79
+
80
+ subgraph disk["On disk"]
81
+ board[("<b>project folder/board</b><br/>mail · room · status.md")]
82
+ tree[("<b>Git worktree</b><br/>branch foil/implementer-1")]
83
+ end
84
+
85
+ you <-->|chat| operator
86
+ operator -->|"foil init · seat spawn lead<br/>send · seat peek"| foil
87
+ lead -->|"seat spawn · seat kill · send"| foil
88
+ foil -->|"launch seats · send mail to one seat<br/>or post a room file that nudges every other alive seat"| fleet
89
+ fleet <-->|read and write| disk
90
+ impl -->|commit| tree
91
+ lead -->|merge| tree
92
+ operator -.->|reads status.md| board
93
+
94
+ classDef human fill:#fde68a,stroke:#b45309,color:#1f2937
95
+ classDef yours fill:#bfdbfe,stroke:#1d4ed8,color:#1f2937
96
+ classDef tool fill:#e5e7eb,stroke:#374151,color:#1f2937
97
+ classDef seat fill:#bbf7d0,stroke:#15803d,color:#1f2937
98
+ classDef data fill:#fbcfe8,stroke:#be185d,color:#1f2937
99
+ class you human
100
+ class operator yours
101
+ class foil tool
102
+ class lead,impl,rev seat
103
+ class board,tree data
104
+ ```
105
+
106
+ - **You** talk only to the operator agent.
107
+ - **Operator agent**: any harness you like, with its normal interface. It follows the operator skill and never does the project work itself.
108
+ - **foil**: this command-line tool. It launches seats in tmux. `foil send` writes one mail file and nudges that recipient. `foil post` writes one room file and nudges every other alive seat. The body is not typed. Both wait 200ms, then send Enter once. It runs no daemon of its own and never interprets what is on a seat's screen. `foil view` is an optional read-only page in your browser.
109
+ - **Lead, implementer, reviewer**: agent CLIs running headless in tmux windows, each started with its role's instructions. By default only the implementer gets its own Git worktree and branch.
110
+ - **Board**: mail, room threads, notes, and `status.md`, as plain files in the project folder `foil init` prints. That folder is outside the repository. Seats read mail with `foil mail` and other board files, including room threads, with `foil board`.
111
+
112
+ ## Built to stay out of the way
113
+
114
+ - **Your own agent runs the fleet.** You don't drive a dashboard or wire agents together by hand. You tell the agent you already use what you want, in whatever interface you like it in, as long as it can run shell commands in your repository. Following one skill file, it starts the lead, checks in, and relays questions.
115
+ - **Each CLI works as it is.** Foil starts every agent with that CLI's own documented flags and talks to it the way you would: one short line typed into its window, and the message itself in a file. It never reads the screen to guess what an agent is doing, so a CLI update rarely breaks it, and adding a CLI takes a small preset file, not code.
116
+ - **Runs wherever tmux runs.** A command-line tool with no daemon of its own, plus an optional read-only page, on Linux or macOS, on your laptop or over SSH on a remote machine. Close your terminal and the fleet keeps working; reattach with tmux.
117
+ - **Nothing hidden.** Mail, tasks, status, and lessons are plain files, and the work lands on ordinary Git branches. You can read, grep, or edit any of it. They survive a dead tmux session or a reboot, and `foil seat resume` brings the seats back.
118
+
119
+ ## Demo
120
+
121
+ [docs/demo.md](https://github.com/TiantianFlow/foil/blob/main/docs/demo.md) walks through a real run: a failing test, a lead, an implementer, and a reviewer, from `foil init` to the merged fix.
122
+
123
+ If Foil saves you time, a [star on GitHub](https://github.com/TiantianFlow/foil) helps others find it. That is all it asks for. Your agent may mention it after a finished goal a few times, then rarely, and stops when you say no.
124
+
125
+ ## Get started
126
+
127
+ You need Python 3.11+, Git, tmux 3.2+, and at least one supported agent CLI (Claude Code, Codex, Gemini, OpenCode, or Grok), already logged in on this machine. Foil never handles that login. Trust is per harness per path. A seat worktree lives in the project folder, outside the repository, so it does not inherit the repository's trust. Each seat label needs folder trust once per harness. A seat waiting on one of those prompts looks, from outside, like a seat that is working. The operator answers an approval dialog: a folder-trust prompt, a login prompt, or a prompt that blocks the seat until you or the operator approve it. It reports an update dialog, a first-run dialog, and an opt-in, and leaves those for you. A global preset counts before `init`. Another CLI joins with a small preset file at `<root>/harnesses.toml` or `<root>/harnesses/<id>.toml`.
128
+
129
+ The human's part is one sentence, typed into the coding agent they already use, in the repository:
130
+
131
+ ```text
132
+ Install Foil from https://github.com/TiantianFlow/foil, onboard this repository with it, and start a fleet. My goal: <goal>.
133
+ ```
134
+
135
+ To update between goals, kill first, then upgrade, then `foil init`. From 0.4 to 0.5.4, do not resume a seat started on 0.4. `foil init` moves a project-root `board/` and `run/` under `fleets/main/` when that fleet's copies are absent or empty, and it does not read `templates/<role>.toml`. `init` writes each missing default role in `<root>/roles.toml` and one mapping row per missing role in `<root>/mapping.toml`. It writes no project `roles.toml`, `mapping.toml`, or `harnesses.toml`, and it deletes those paths. A new list uses `permission = "auto"` and omits `model`. Lessons in `memory/` and seat worktrees stay. `FOIL_FLEET` defaults to `main`. Run `foil seat kill --all` once the goal is done, run the install line again, run `foil init` in each project, then spawn the lead. A project that still has an in-repo `.foil/` from 0.3.x is killed with that old `foil` before the install line runs. A stale seat whose tmux window is already gone also counts. If that old `foil` is no longer on `PATH`, install 0.3.4 beside the current one, which does not replace it: `UV_TOOL_DIR=DIR UV_TOOL_BIN_DIR=DIR/bin uv tool install "git+https://github.com/TiantianFlow/foil.git@v0.3.4"`, then run `DIR/bin/foil seat kill --all`. With pipx: `PIPX_HOME=DIR PIPX_BIN_DIR=DIR/bin pipx install "git+https://github.com/TiantianFlow/foil.git@v0.3.4"`, then run `DIR/bin/foil seat kill --all`. Do not run `foil init` while those seats remain, and do not move that directory aside. The previous goal's `board/status.md`, in the project folder the report prints, already says `state: done`, so note its `updated` line before you spawn and wait for it to change. After `foil seat kill --all`, either case can occur, so check: run `tmux ls`. If it lists any session, a named preset `env` variable comes from that server and is set with `tmux set-environment -g NAME VALUE` before spawn. If it says no server is running, the next spawn starts a server from your shell.
136
+
137
+ - The agent installs Foil and runs `foil init`. If that command prints `foil: no harness installed`, it wrote nothing. Install one of the CLIs above and run `foil init` again.
138
+ - It reads the report, runs `foil roster list`, and asks you to run each harness id once in this repository and accept its folder-trust, update, first-run, and opt-in prompts, or to confirm that is done. It sets each template's harness list and `permission` with `foil roster`. The shared lists are `<root>/harnesses.toml`, `<root>/roles.toml`, and `<root>/mapping.toml`. `init` writes no project `roles.toml`, `mapping.toml`, or `harnesses.toml`, and it deletes those paths. `init` writes one mapping entry per role and `permission = "auto"`. Every fleet shares those lists. `FOIL_FLEET` selects a fleet and defaults to `main`. `roster update ROLE harness=ID/MODEL,ID/MODEL` sets a role's whole list, and `model` edits a one-entry list. From inside the fleet, both write that fleet's `overrides.toml` instead, and the next spawn applies it. A spawn takes the entry at the count of seats already stored for that role. `auto` on the lead alone does not let the workers run unattended. Limits says what `auto` still does: the seat can stop on an approval prompt.
139
+ - It runs the first-run check and sends the goal.
140
+ - It never does the project work itself.
141
+
142
+ An agent that was started without that sentence uses the pointer `init` prints. When `<root>/skills/operator.md` exists, that line is:
143
+
144
+ ```text
145
+ Read <root>/skills/operator.md and follow it. My goal: <goal>.
146
+ ```
147
+
148
+ Otherwise the pointer is the packaged `operator.md`.
149
+
150
+ A persistent install of the operator skill is optional. Copy it where that harness discovers skills, at user level, so it stays out of `git status`. No path below was checked against that harness's current docs.
151
+
152
+ | Harness | Install path | Verified |
153
+ |---|---|---|
154
+ | any | the pointer line above | required; not a per-harness install |
155
+ | Claude Code | `~/.claude/skills/foil-operator/SKILL.md` | no |
156
+ | grok, codex, opencode, gemini | none published | no |
157
+
158
+ ### By hand
159
+
160
+ The same steps, typed yourself. Install Foil, then in the repository:
161
+
162
+ ```sh
163
+ uv tool install --upgrade foil-ai
164
+ cd your-repo
165
+ foil init
166
+ ```
167
+
168
+ If the install says `Executable already exists: foil`, an install from before the package was renamed to `foil-ai` is in the way. Run `uv tool uninstall foil-orchestrator`, then the install line again.
169
+
170
+ Read the report and set the three templates with `foil roster`. If `board/status.md` is already in the project folder, note its `updated` value. Then spawn the lead once:
171
+
172
+ ```sh
173
+ foil seat spawn lead --task "Write board/status.md with state: done"
174
+ ```
175
+
176
+ When `board/status.md` in the project folder shows `state: done`, send the goal to that lead. If that file was already there, this passes only after `updated` changes. Do not spawn the lead again. The lead's first prompt already carries its instructions, so a message holds only the goal or an answer.
177
+
178
+ ```sh
179
+ foil send lead "the goal"
180
+ foil seat list
181
+ foil seat peek lead
182
+ ```
183
+
184
+ `board/status.md` in the project folder is the lead's own report, including any questions for you; answer them with `foil send lead "..."`. It carries a checklist of what is done and what is left, and the operator reports it at each check-in and whenever the human asks. When you are done, `foil seat kill --all` stops every seat and leaves branches and worktrees in place. A killed seat's name stays reserved until `foil seat archive NAME`, which frees the name and does not delete the worktree, the branch, the mailbox, or uncommitted work. `foil seat list --archived` shows the stored worktree. A leftover seat worktree is `<project folder>/worktrees/<label>`. Remove one that is clean with `git worktree remove <path>`. A dirty tree needs `--force`, and that discards uncommitted work.
185
+
186
+ ### If nothing happens
187
+
188
+ Run `foil seat peek lead`, and do the same for a seat that was just spawned or resumed. A seat that makes no progress is usually stopped on a dialog. The operator answers an approval dialog: a folder-trust prompt, a login prompt, or a prompt that blocks the seat until someone approves it. It reports an update dialog, a first-run dialog, and an opt-in, and leaves those for you. Answer those in the window (`tmux ls` lists Foil's session and `tmux attach` opens it). A login the CLI will not finish in the pane is done once by hand, then `foil seat kill lead` and spawn the lead again. If `foil seat list` shows that lead as `dead`, `foil seat kill lead` clears it. Spawn the check again only after it is gone.
189
+
190
+ ## See it in a browser
191
+
192
+ `foil view`, run from any directory, serves one read-only page for every Foil project on this machine and prints its address. The page lists the projects. Each project lists its fleets and lessons, and its Settings shows the three shared lists. Each fleet shows its seats grouped by state (dead first, killed folded away), its `status.md`, its posts and board files with their modified times, its overrides, and its attach command. A board file opens on its own page, and each seat shows its raw pane. It types nothing into a pane and decides nothing about progress; that is still `board/status.md`. Stopping it leaves every seat as it was.
193
+
194
+ ```sh
195
+ foil view
196
+ foil view --port 8790
197
+ ```
198
+
199
+ Without `--port` it takes the first free port from 7460 to 7509. It listens on `127.0.0.1` only. To reach it from another machine, forward the port over SSH, for example `ssh -L 8790:127.0.0.1:8790 host`.
200
+
201
+ To open it from your other devices on Tailscale, put `tailscale serve` in front of it, for example `tailscale serve --bg 8790`, and open the `https://` address that command prints. Nothing listens on your LAN or tailnet address; Tailscale forwards each request to `127.0.0.1`. `foil view` checks Tailscale when it starts, so start or restart it after Tailscale is up, and after this machine signs in to another account or is tagged. Under the tailnet name, it serves only requests that Tailscale marks as coming from the login that owns this machine. Funnel traffic, tagged devices, and devices of other users get an empty 403. Use the HTTPS form above, or `--http`. `tailscale serve --tcp`, `--tls-terminated-tcp`, and `tailscale funnel --tcp` forward raw bytes without the headers this check reads, so anyone they let in can read the page. `tailscale serve reset` stops sharing it.
202
+
203
+ ### Keep the viewer running
204
+
205
+ Foil has no daemon mode. launchd on macOS and `systemd --user` on Linux run `foil view` as it is, start it at login, and restart it when it fails. Your operator agent can fill these in for you. One service covers every project on the machine. Give it a port outside 7460-7509, so an ad hoc `foil view` never takes it. A service keeps the page readable by every account on the machine for as long as you are logged in (see Limits), so set one up only on a machine you do not share. Replace each capitalized placeholder:
206
+
207
+ - `FOIL`: the absolute path that `command -v foil` prints.
208
+ - `PORT`: the port.
209
+ - `YOUR_PATH`: what `echo $PATH` prints in your own terminal. A service starts with a minimal `PATH`, and without yours it cannot find tmux or your agent CLIs.
210
+ - `HOME_DIR`: your home directory's absolute path.
211
+
212
+ If you set `FOIL_HOME`, `XDG_DATA_HOME`, or `TMUX_TMPDIR`, add the same value next to `PATH`; without the same `TMUX_TMPDIR`, the viewer cannot find your seats' windows and shows every seat dead. Restart the service after you upgrade Foil.
213
+
214
+ macOS, `~/Library/LaunchAgents/dev.foil.view.plist`:
215
+
216
+ ```xml
217
+ <?xml version="1.0" encoding="UTF-8"?>
218
+ <plist version="1.0"><dict>
219
+ <key>Label</key><string>dev.foil.view</string>
220
+ <key>ProgramArguments</key><array>
221
+ <string>FOIL</string><string>view</string><string>--port</string><string>PORT</string>
222
+ </array>
223
+ <key>WorkingDirectory</key><string>HOME_DIR</string>
224
+ <key>EnvironmentVariables</key><dict><key>PATH</key><string>YOUR_PATH</string></dict>
225
+ <key>RunAtLoad</key><true/>
226
+ <key>KeepAlive</key><dict><key>SuccessfulExit</key><false/></dict>
227
+ <key>ThrottleInterval</key><integer>30</integer>
228
+ <key>StandardOutPath</key><string>HOME_DIR/Library/Logs/foil-view.log</string>
229
+ <key>StandardErrorPath</key><string>HOME_DIR/Library/Logs/foil-view.log</string>
230
+ </dict></plist>
231
+ ```
232
+
233
+ ```sh
234
+ launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/dev.foil.view.plist
235
+ launchctl bootout gui/$(id -u)/dev.foil.view
236
+ ```
237
+
238
+ The first line starts it and the second stops it. After you edit the file, stop it before you start it again. It restarts after a failure, at most once every 30 seconds, and not after a clean stop.
239
+
240
+ Linux, `~/.config/systemd/user/foil-view.service`. Write each `%` in `YOUR_PATH` as `%%`:
241
+
242
+ ```ini
243
+ [Unit]
244
+ Description=Foil viewer
245
+
246
+ [Service]
247
+ ExecStart="FOIL" view --port PORT
248
+ WorkingDirectory=HOME_DIR
249
+ Environment="PATH=YOUR_PATH"
250
+ Restart=on-failure
251
+ RestartSec=30
252
+
253
+ [Install]
254
+ WantedBy=default.target
255
+ ```
256
+
257
+ ```sh
258
+ systemctl --user enable --now foil-view
259
+ systemctl --user disable --now foil-view
260
+ journalctl --user -u foil-view
261
+ ```
262
+
263
+ It runs while you are logged in.
264
+
265
+ ## Limits
266
+
267
+ Foil is cooperative protection for seats that follow instructions. It is not isolation from a hostile process. A seat's identity is the `FOIL_SEAT_ID` environment variable Foil sets when it launches that seat. There is no flag a seat can pass to claim another seat. Anything you can do on this machine, a process running as you can do too.
268
+
269
+ Templates default to `permission = "auto"`. An omitted permission runs the seat unattended. Setting `permission = "ask"` is how a template opts back into prompts: that seat stops at its first approval prompt. Setting `permission = "auto"` inserts that preset's auto flags. For Claude, those flags are `--permission-mode` and `auto`. Claude Code's auto mode can still ask before some commands, so an `auto` seat may stop on an approval prompt. Peek new seats. That seat is still you.
270
+
271
+ Foil never interprets what is on a seat's screen. `foil seat peek` prints the raw tmux capture, and `foil seat list` reports `alive`, `dead`, or `killed` from whether the seat's window still exists, not from what is on its screen. Agents say whether they are blocked or done in board files. Foil does not scrape a pane, does not decide that a dialog is present, and does not send the keys.
272
+
273
+ `foil view` has no login. Your project folders are private to you, but a port on `127.0.0.1` is open to every account on the machine, so while the viewer runs anyone logged in can read it, including every project's pane text and board files. It hides launch-command tokens that look like credentials, as a best effort. On a machine other people log in to, stop it when you are done. The tailnet check guards only the tailnet name: an account on this machine can still read the page on `127.0.0.1`.
274
+
275
+ A nudge is typed even when the window is not at a prompt. `foil send` writes the mail file first, then types one line into the recipient's window: the sender, a space, and the mail file's absolute path. `foil post` writes one room file and types that same line into every other alive seat. Either command waits 200ms, then sends Enter once, so a harness that treats Enter inside a fast burst as an unsent paste submits the line instead of leaving it in the input. The message body is never typed. `foil post --re PATH --decline` writes a room file and types nothing. If the agent is not waiting for input, those keystrokes still go into the window. Foil does not look at the screen to decide, and it does not send Enter again.
276
+
277
+ ## Learn more
278
+
279
+ - [docs/demo.md](https://github.com/TiantianFlow/foil/blob/main/docs/demo.md) — a real run, from `foil init` to the merged fix
280
+ - [docs/architecture.md](https://github.com/TiantianFlow/foil/blob/main/docs/architecture.md) — components, data flow, and module boundaries
281
+ - [skills/operator.md](https://github.com/TiantianFlow/foil/blob/main/skills/operator.md), [skills/lead.md](https://github.com/TiantianFlow/foil/blob/main/skills/lead.md), and [skills/worker.md](https://github.com/TiantianFlow/foil/blob/main/skills/worker.md) — what each role runs
282
+ - [CONTRIBUTING.md](https://github.com/TiantianFlow/foil/blob/main/CONTRIBUTING.md) — setup and checks
283
+ - [CHANGELOG.md](https://github.com/TiantianFlow/foil/blob/main/CHANGELOG.md) — release history