@teamclaws/teamclaw 2026.8.1 → 2026.11.0

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 (125) hide show
  1. package/cli.mjs +46 -15
  2. package/dist/src/config.js +33 -2
  3. package/dist/src/controller/clarification-routes.js +315 -0
  4. package/dist/src/controller/controller-intake.js +895 -0
  5. package/dist/src/controller/controller-planning.js +813 -0
  6. package/dist/src/controller/controller-runs.js +175 -0
  7. package/dist/src/controller/controller-service.js +271 -40
  8. package/dist/src/controller/controller-tools.js +11 -6
  9. package/dist/src/controller/http-server.js +256 -6004
  10. package/dist/src/controller/kickoff-orchestrator.js +32 -6
  11. package/dist/src/controller/message-delivery.js +28 -0
  12. package/dist/src/controller/message-routes.js +114 -0
  13. package/dist/src/controller/orchestration-manifest.js +6 -28
  14. package/dist/src/controller/preview-proxy.js +98 -0
  15. package/dist/src/controller/profile-switch.js +289 -0
  16. package/dist/src/controller/project-registry.js +294 -0
  17. package/dist/src/controller/prompt-injector.js +19 -9
  18. package/dist/src/controller/repo-routes.js +63 -0
  19. package/dist/src/controller/role-inference.js +231 -20
  20. package/dist/src/controller/route-table.js +1353 -0
  21. package/dist/src/controller/task-assignment.js +508 -0
  22. package/dist/src/controller/task-cleanup.js +258 -0
  23. package/dist/src/controller/task-execution.js +240 -0
  24. package/dist/src/controller/task-results.js +461 -0
  25. package/dist/src/controller/task-router.js +74 -4
  26. package/dist/src/controller/task-routes.js +703 -0
  27. package/dist/src/controller/teamauto-routes.js +124 -0
  28. package/dist/src/controller/ui-assets.js +68 -0
  29. package/dist/src/controller/worker-provisioning.js +30 -4
  30. package/dist/src/controller/worker-routes.js +188 -0
  31. package/dist/src/identity.js +3 -2
  32. package/dist/src/interaction-contracts.js +7 -7
  33. package/dist/src/openclaw-workspace.js +40 -18
  34. package/dist/src/profile-loader.js +486 -0
  35. package/dist/src/profiles/banking.json +178 -0
  36. package/dist/src/profiles/crossborder-ecom.json +253 -0
  37. package/dist/src/profiles/insurance.json +157 -0
  38. package/dist/src/profiles/knowledge/hs-structure.md +97 -0
  39. package/dist/src/profiles/knowledge/incoterms-2020.md +188 -0
  40. package/dist/src/profiles/knowledge/vat-principles.md +85 -0
  41. package/dist/src/profiles/schema.json +201 -0
  42. package/dist/src/profiles/securities.json +137 -0
  43. package/dist/src/profiles/software-rd.json +264 -0
  44. package/dist/src/profiles/trading-co.json +200 -0
  45. package/dist/src/prompt-policy.js +26 -13
  46. package/dist/src/role-ids.js +29 -0
  47. package/dist/src/roles.js +54 -13
  48. package/dist/src/session-roles.js +14 -0
  49. package/dist/src/state.js +188 -10
  50. package/dist/src/task-executor.js +7 -17
  51. package/dist/src/teamauto/github-client.js +18 -0
  52. package/dist/src/teamauto/repo-sync.js +228 -6
  53. package/dist/src/teamauto/scanner.js +40 -12
  54. package/dist/src/teamauto/scheduler.js +231 -12
  55. package/dist/src/types.js +62 -15
  56. package/dist/src/ui/app.js +592 -24
  57. package/dist/src/ui/index.html +44 -11
  58. package/dist/src/ui/style.css +194 -0
  59. package/dist/src/worker/prompt-injector.js +44 -8
  60. package/dist/src/worker/skill-installer.js +3 -1
  61. package/dist/src/worker/worker-service.js +76 -3
  62. package/openclaw.plugin.json +28 -1
  63. package/package.json +3 -2
  64. package/src/config.ts +33 -2
  65. package/src/controller/clarification-routes.ts +404 -0
  66. package/src/controller/controller-intake.ts +1113 -0
  67. package/src/controller/controller-planning.ts +1029 -0
  68. package/src/controller/controller-runs.ts +239 -0
  69. package/src/controller/controller-service.ts +295 -41
  70. package/src/controller/controller-tools.ts +11 -7
  71. package/src/controller/http-server.ts +294 -6971
  72. package/src/controller/kickoff-orchestrator.ts +70 -7
  73. package/src/controller/message-delivery.ts +49 -0
  74. package/src/controller/message-routes.ts +137 -0
  75. package/src/controller/orchestration-manifest.ts +6 -29
  76. package/src/controller/preview-proxy.ts +127 -0
  77. package/src/controller/profile-switch.ts +366 -0
  78. package/src/controller/project-registry.ts +361 -0
  79. package/src/controller/prompt-injector.ts +23 -8
  80. package/src/controller/repo-routes.ts +91 -0
  81. package/src/controller/role-inference.ts +260 -22
  82. package/src/controller/route-table.ts +1616 -0
  83. package/src/controller/task-assignment.ts +618 -0
  84. package/src/controller/task-cleanup.ts +344 -0
  85. package/src/controller/task-execution.ts +356 -0
  86. package/src/controller/task-results.ts +544 -0
  87. package/src/controller/task-router.ts +98 -6
  88. package/src/controller/task-routes.ts +812 -0
  89. package/src/controller/teamauto-routes.ts +121 -0
  90. package/src/controller/ui-assets.ts +70 -0
  91. package/src/controller/websocket.ts +13 -1
  92. package/src/controller/worker-provisioning.ts +32 -4
  93. package/src/controller/worker-routes.ts +241 -0
  94. package/src/identity.ts +3 -2
  95. package/src/interaction-contracts.ts +7 -7
  96. package/src/openclaw-workspace.ts +44 -18
  97. package/src/profile-loader.ts +650 -0
  98. package/src/profiles/banking.json +178 -0
  99. package/src/profiles/crossborder-ecom.json +253 -0
  100. package/src/profiles/insurance.json +157 -0
  101. package/src/profiles/knowledge/hs-structure.md +97 -0
  102. package/src/profiles/knowledge/incoterms-2020.md +188 -0
  103. package/src/profiles/knowledge/vat-principles.md +85 -0
  104. package/src/profiles/schema.json +201 -0
  105. package/src/profiles/securities.json +137 -0
  106. package/src/profiles/software-rd.json +264 -0
  107. package/src/profiles/trading-co.json +200 -0
  108. package/src/prompt-policy.ts +27 -13
  109. package/src/role-ids.ts +31 -0
  110. package/src/roles.ts +60 -14
  111. package/src/session-roles.ts +14 -0
  112. package/src/state.ts +236 -9
  113. package/src/task-executor.ts +7 -18
  114. package/src/teamauto/github-client.ts +21 -0
  115. package/src/teamauto/repo-sync.ts +246 -6
  116. package/src/teamauto/scanner.ts +47 -13
  117. package/src/teamauto/scheduler.ts +259 -16
  118. package/src/teamauto/store.ts +12 -0
  119. package/src/types.ts +133 -16
  120. package/src/ui/app.js +592 -24
  121. package/src/ui/index.html +44 -11
  122. package/src/ui/style.css +194 -0
  123. package/src/worker/prompt-injector.ts +48 -8
  124. package/src/worker/skill-installer.ts +3 -1
  125. package/src/worker/worker-service.ts +83 -3
@@ -0,0 +1,97 @@
1
+ # HS Classification Reference Pack
2
+
3
+ > As of: 2026-11-08. This pack carries the stable structure of the
4
+ > Harmonized System and the classification-proposal discipline only. It
5
+ > deliberately contains NO duty or rebate rate figures. Verify against
6
+ > authoritative sources before relying on any detail (the WCO HS nomenclature,
7
+ > the destination country's current tariff schedule, and customs publications);
8
+ > tariff schedules and national subdivisions are amended frequently.
9
+
10
+ ## What the Harmonized System is
11
+
12
+ - The Harmonized Commodity Description and Coding System ("HS") is the
13
+ international commodity nomenclature maintained by the World Customs
14
+ Organization (WCO) and used by customs administrations worldwide as the
15
+ basis for customs tariffs, export/import statistics, and trade controls.
16
+ - The WCO reviews the nomenclature on a multi-year cycle (recent editions:
17
+ HS 2017, HS 2022; a further review cycle is in preparation). A code
18
+ memorized under an older edition may have been renumbered, split, or
19
+ deleted - which is why codes are always proposed, never asserted.
20
+
21
+ ## Structure: why "the first six digits" is the common language
22
+
23
+ - Section level (roman numerals) -> chapter (2 digits) -> heading
24
+ (4 digits) -> subheading (6 digits). Example shape: 2-digit chapter,
25
+ 4-digit heading, 6-digit subheading - each level narrows the goods
26
+ description.
27
+ - The first SIX digits are internationally harmonized: the same 6-digit
28
+ code denotes the same goods category in every HS contracting party.
29
+ - Everything beyond digit six is NATIONAL: each administration extends the
30
+ nomenclature for its own tariff and statistics, so the same goods carry
31
+ different 8+ digit codes in different countries. Common extension shapes:
32
+ 8-digit domestic tariff lines with 10-digit inspection/CIQ suffixes
33
+ (China), 8-digit Combined Nomenclature feeding 10-digit TARIC (EU),
34
+ 10-digit HTSUS statistical suffixes (US). Treat only the first six digits
35
+ as comparable across borders.
36
+ - Chapters 98 and 99 and similar special chapters are reserved for national
37
+ special-purpose classifications and are not part of the harmonized core.
38
+
39
+ ## Classification logic (the General Rules for Interpretation, "GRI")
40
+
41
+ - GRI 1: classification is determined first by the words of the headings and
42
+ section/chapter notes - notes override plausible readings.
43
+ - GRI 2: incomplete or unfinished articles with the essential character of
44
+ the complete article, and goods presented unassembled/disassembled, are
45
+ classified as the complete article; mixtures and composites are handled
46
+ per GRI 2(b)/3.
47
+ - GRI 3: when two or more headings seem to apply - (a) the most specific
48
+ description wins over more general ones; (b) otherwise classify by the
49
+ material or component giving the goods their ESSENTIAL CHARACTER; (c)
50
+ otherwise the heading occurring LAST in numerical order.
51
+ - GRI 4: goods not covered by any heading are classified under the heading
52
+ of the goods to which they are MOST AKIN.
53
+ - GRI 5: cases and packing materials are classified with the goods,
54
+ subject to stated exceptions (containers clearly suitable for repeated
55
+ use, or packaging that gives the whole its essential character).
56
+ - GRI 6: subheading comparison works like heading comparison, but only
57
+ between subheadings AT THE SAME LEVEL, applying section/chapter notes
58
+ mutatis mutandis.
59
+
60
+ ## Proposal discipline (how this team uses HS codes)
61
+
62
+ - Every code this team produces is a PROPOSAL with stated reasoning:
63
+ product function, material/composition, and the GRI rule applied at each
64
+ step where alternatives existed.
65
+ - The binding classification rests with customs authorities and the licensed
66
+ broker - never present a code as definitive, and never present a national
67
+ 8+ digit extension as if it were internationally comparable.
68
+ - Where commercial stakes justify it, recommend the jurisdiction's advance
69
+ ruling / pre-classification mechanism (for example the EU Binding Tariff
70
+ Information, US customs ruling practice, or China customs
71
+ pre-classification/pre-ruling channels) - the mechanism names are stable,
72
+ their procedures and validity periods are not; check the current rules.
73
+ - A proposal memo names: candidate 6-digit subheading(s) with reasoning,
74
+ the open national-extension question for the destination country, the
75
+ documents that will settle it (composition sheets, lab reports, technical
76
+ drawings), and who holds the binding decision.
77
+
78
+ ## Export rebate (VAT rebate) discipline - no figures by design
79
+
80
+ - Export VAT/consumption-tax rebate treatment is keyed to commodity codes
81
+ and is set and adjusted by the competent finance and taxation authorities
82
+ in published batches that change over time.
83
+ - This pack therefore carries ZERO rate figures: rebate rates, catalog
84
+ membership, and documentation windows are looked up in the CURRENT
85
+ authoritative publication at the time of use (tax and customs portals the
86
+ user supplies or confirms) and are marked TBD until then.
87
+ - Never quote a rebate rate from memory, never estimate one from a
88
+ "similar" product, and never let a customer decision rest on an unsourced
89
+ rate: deliver the document-set checklist and the lookup path instead.
90
+
91
+ ## Standing discipline for this pack
92
+
93
+ - Prefer these structural definitions over recollection when explaining
94
+ HS logic, and keep proposals in the proposal voice (candidate + reasoning
95
+ + who decides).
96
+ - Anything rate-, duty-, or deadline-shaped is time-sensitive: direct the
97
+ user to current authoritative sources and mark TBD.
@@ -0,0 +1,188 @@
1
+ # Incoterms 2020 Reference Pack
2
+
3
+ > As of: 2026-11-08. This pack carries stable reference concepts of the ICC
4
+ > Incoterms 2020 rules only. Verify against authoritative sources (the ICC
5
+ > Incoterms 2020 publication and current counterparty practice) before relying
6
+ > on any detail in a live transaction; freight rates, surcharges, and local
7
+ > port practice are NOT covered here and must come from real quotes.
8
+
9
+ ## How to read this pack
10
+
11
+ - Eleven terms, each defined by: delivery point, risk transfer, cost split,
12
+ customs (export/import clearance) responsibility, and typical use.
13
+ - Two transport families: any-mode terms (EXW, FCA, CPT, CIP, DAP, DPU, DDP)
14
+ and sea/inland-waterway-only terms (FAS, FOB, CFR, CIF).
15
+ - Groups: E (departure, EXW), F (main carriage unpaid, FCA/FAS/FOB),
16
+ C (main carriage paid, risk passes at origin, CPT/CIP/CFR/CIF),
17
+ D (arrival, DAP/DPU/DDP).
18
+ - A quotation or booking that names an Incoterms 2020 term must name the
19
+ place too (e.g. "FOB Shanghai (Incoterms 2020)"), and risk/cost statements
20
+ must stay consistent with the named term.
21
+
22
+ ## EXW - Ex Works (any mode)
23
+
24
+ - Delivery point: goods placed at the buyer's disposal at the seller's
25
+ premises (or another named place), not loaded onto any collecting vehicle.
26
+ - Risk transfer: when the goods are placed at the buyer's disposal.
27
+ - Cost split: buyer bears loading and all onward transport costs.
28
+ - Customs responsibility: export clearance is the BUYER's task (buyer's risk
29
+ and cost) - in practice often impractical for a foreign buyer - and import
30
+ clearance also sits with the buyer.
31
+ - Typical use: the buyer controls the entire chain and can clear export in
32
+ the seller's country; minimum seller obligation.
33
+
34
+ ## FCA - Free Carrier (any mode)
35
+
36
+ - Delivery point: handover to a carrier or another person nominated by the
37
+ buyer, either at the seller's premises (loaded onto the buyer's collecting
38
+ vehicle) or at another named place (ready, not unloaded).
39
+ - Risk transfer: on delivery to the nominated carrier/person.
40
+ - Cost split: seller bears costs up to that handover, including export
41
+ clearance; main carriage is the buyer's.
42
+ - Customs responsibility: export - seller; import - buyer.
43
+ - Typical use: containerized cargo where the buyer books the main carriage.
44
+ This is the correct container-era replacement for FOB; Incoterms 2020 also
45
+ lets the parties agree that the buyer's carrier issues an on-board bill of
46
+ lading to the seller after loading (useful under letters of credit).
47
+
48
+ ## CPT - Carriage Paid To (any mode)
49
+
50
+ - Delivery point / risk transfer: goods handed over to the FIRST carrier;
51
+ risk transfers at that origin-side point, even though the seller pays
52
+ carriage to the named destination. This "two critical points" gap (risk at
53
+ origin, cost to destination) is the term's defining caveat.
54
+ - Cost split: seller contracts and pays transport to the named destination;
55
+ destination unloading is the seller's only if it is in the contract of
56
+ carriage.
57
+ - Customs responsibility: export - seller; import - buyer.
58
+ - Typical use: multimodal / container / rail / air sales where the seller
59
+ arranges main carriage; the buyer should insure from the first-carrier
60
+ handover.
61
+
62
+ ## CIP - Carriage and Insurance Paid To (any mode)
63
+
64
+ - Delivery point / risk transfer: identical to CPT (first-carrier handover).
65
+ - Cost split: CPT plus a seller obligation to procure cargo insurance for
66
+ the buyer; the Incoterms 2020 default cover is Institute Cargo Clauses (A)
67
+ or similar (all-risks basis) unless the parties agree otherwise.
68
+ - Customs responsibility: export - seller; import - buyer.
69
+ - Typical use: CPT situations where the buyer also wants seller-managed
70
+ insurance cover, common in container and multimodal sales.
71
+
72
+ ## DAP - Delivered at Place (any mode)
73
+
74
+ - Delivery point: goods placed at the buyer's disposal on the arriving means
75
+ of transport, ready for unloading, at the named destination.
76
+ - Risk transfer: at that point (before unloading).
77
+ - Cost split: seller bears all transport to the destination; the buyer bears
78
+ unloading (unless included in the contract of carriage), import clearance,
79
+ duties, and taxes.
80
+ - Customs responsibility: export - seller; import - BUYER.
81
+ - Typical use: the workhorse arrival term - seller delivers to a named
82
+ warehouse or address but does not clear the goods into the buyer's country.
83
+
84
+ ## DPU - Delivered at Place Unloaded (any mode)
85
+
86
+ - Delivery point: goods UNLOADED from the arriving means of transport and
87
+ placed at the buyer's disposal at the named place of destination. This is
88
+ the ONLY Incoterms 2020 term where the seller must unload.
89
+ - Risk transfer: after unloading at the named place.
90
+ - Cost split: seller bears carriage plus unloading; import clearance,
91
+ duties, and taxes remain with the buyer.
92
+ - Customs responsibility: export - seller; import - buyer.
93
+ - Typical use: delivery to a final address where the seller (or its
94
+ destination partner) can physically unload. Incoterms 2020 replaced the
95
+ 2010 term DAT (Delivered at Terminal) with DPU, so the destination can be
96
+ any place, not only a terminal - the seller must be able to arrange
97
+ unloading there.
98
+
99
+ ## DDP - Delivered Duty Paid (any mode)
100
+
101
+ - Delivery point: goods placed at the buyer's disposal, ready for unloading,
102
+ at the named destination.
103
+ - Risk transfer: at that point.
104
+ - Cost split: the seller bears everything - transport, export AND import
105
+ clearance, duties, and taxes. Maximum seller obligation (the mirror of
106
+ EXW).
107
+ - Customs responsibility: export - seller; import - SELLER, including
108
+ duties and taxes; import VAT is commonly excluded by agreement when the
109
+ seller cannot recover it.
110
+ - Typical use: the seller has destination-country presence (own entity,
111
+ broker, or DDP service provider). Practical cautions: the seller is often
112
+ unable to act as importer of record (import licensing may restrict who may
113
+ import) - where the seller cannot obtain import clearance directly or
114
+ through a representative, DAP or DPU is the workable alternative.
115
+
116
+ ## FAS - Free Alongside Ship (sea / inland waterway only)
117
+
118
+ - Delivery point: goods placed alongside the vessel (for example on the
119
+ quay or a barge) nominated by the buyer at the named port of shipment.
120
+ - Risk transfer: when the goods are alongside the ship.
121
+ - Cost split: seller to alongside; loading, stowage, and main carriage are
122
+ the buyer's.
123
+ - Customs responsibility: export - seller; import - buyer.
124
+ - Typical use: non-containerized bulk and break-bulk cargo (grain, ores,
125
+ timber, project cargo).
126
+
127
+ ## FOB - Free on Board (sea / inland waterway only)
128
+
129
+ - Delivery point: goods placed on board the vessel nominated by the buyer
130
+ at the named port of shipment.
131
+ - Risk transfer: when the goods are on board (the 2010 rules dropped the
132
+ earlier "ship's rail" wording; 2020 keeps the on-board standard).
133
+ - Cost split: seller bears costs through loading on board plus export
134
+ clearance; main carriage onward is the buyer's.
135
+ - Customs responsibility: export - seller; import - buyer.
136
+ - Typical use: bulk and break-bulk ocean sales and the classic letter-of-
137
+ credit ocean term. NOT designed for containers: containers are normally
138
+ handed over at a container yard or terminal before the vessel arrives, so
139
+ FCA is the appropriate term for containerized cargo.
140
+
141
+ ## CFR - Cost and Freight (sea / inland waterway only)
142
+
143
+ - Delivery point / risk transfer: risk transfers ON BOARD at the named port
144
+ of SHIPMENT, while the seller contracts and pays freight to the named port
145
+ of destination - the same "two critical points" caveat as CPT.
146
+ - Cost split: freight to the destination port; destination unloading is the
147
+ seller's only if included in the contract of carriage; insurance is NOT an
148
+ obligation of either party under CFR.
149
+ - Customs responsibility: export - seller; import - buyer.
150
+ - Typical use: bulk ocean sales where the buyer arranges its own marine
151
+ insurance from the shipment port.
152
+
153
+ ## CIF - Cost, Insurance and Freight (sea / inland waterway only)
154
+
155
+ - Delivery point / risk transfer: identical to CFR - risk on board at the
156
+ port of shipment, not at destination.
157
+ - Cost split: CFR plus a seller obligation to procure insurance for the
158
+ buyer; the Incoterms 2020 default for CIF remains MINIMUM cover, Institute
159
+ Cargo Clauses (C), unless higher cover ((A)/(B)) is agreed - contrast with
160
+ CIP, whose 2020 default was raised to (A).
161
+ - Customs responsibility: export - seller; import - buyer.
162
+ - Typical use: the traditional letter-of-credit term for ocean sales of
163
+ manufactured goods where the credit calls for an insurance document.
164
+
165
+ ## Incoterms 2020 revision highlights (stable background)
166
+
167
+ - DAT was renamed and broadened into DPU (seller unloads at any named
168
+ place).
169
+ - CIP default insurance raised to Institute Cargo Clauses (A); CIF kept (C).
170
+ - FCA gained the optional on-board bill-of-lading arrangement described
171
+ above.
172
+ - Security-related requirements were allocated explicitly between seller
173
+ (A1-A9) and buyer (B1-B9) obligations, with the 2020 restructure collapsing
174
+ the 2010 ten-article format to nine articles and consolidating costs under
175
+ A9/B9.
176
+ - Arrangements where a party uses its own transport are recognized in FCA
177
+ and the D-terms.
178
+
179
+ ## Standing discipline for this pack
180
+
181
+ - Prefer these definitions over recollection when discussing terms, and name
182
+ the term plus place exactly in quotations, bookings, and cost splits.
183
+ - The C-term caveat matters commercially: under CPT/CIP/CFR/CIF the risk has
184
+ already passed to the buyer long before the destination the seller pays
185
+ freight to - say so when a customer assumes otherwise.
186
+ - Nothing in this pack licenses quoting freight rates, insurance premiums,
187
+ surcharges, or port costs from memory: those figures always come from real
188
+ quotes and are marked TBD when missing.
@@ -0,0 +1,85 @@
1
+ # VAT / Indirect Tax Principles Reference Pack
2
+
3
+ > As of: 2026-11-08. This pack carries stable concepts of value-added and
4
+ > marketplace-collected indirect tax only. Country-specific thresholds,
5
+ > rates, and deadlines CHANGE and are intentionally not tabulated here.
6
+ > Verify against authoritative sources (the destination country's tax
7
+ > authority and licensed advisers) before relying on any detail; the two
8
+ > example figures below are illustrative and will expire.
9
+
10
+ ## VAT fundamentals (stable mechanics)
11
+
12
+ - Value-added tax (VAT / GST family) is a multi-stage consumption tax:
13
+ each business charges output tax on its supplies and credits the input
14
+ tax it paid, remitting the difference - the final consumer bears the tax.
15
+ - Cross-border B2C supplies generally follow the destination principle
16
+ (tax where the customer consumes), while historic origin treatment and
17
+ low-value-import reliefs created the patchwork the modern schemes below
18
+ were designed to replace.
19
+ - Zero-rated is not exempt: zero-rated supplies are taxed at zero percent
20
+ WITH input-tax credit; exempt supplies carry NO credit, so input tax on
21
+ them becomes a cost. Confusing the two mis-prices landed cost.
22
+ - Imports are generally taxed at the border in the same way as domestic
23
+ supplies (import VAT/GST), with the importer of record accounting for it;
24
+ who acts as importer of record, and whether import VAT is recoverable,
25
+ depends on the destination regime and the Incoterms 2020 term used.
26
+
27
+ ## EU one-stop schemes: OSS and IOSS (mechanism concepts)
28
+
29
+ - OSS (One Stop Shop): a single VAT registration in one EU member state
30
+ plus one periodic return covering the seller's intra-EU B2C distance
31
+ sales (and electronically supplied services), instead of registering
32
+ separately in every destination member state. Above the union-wide
33
+ annual intra-EU threshold the seller taxes each sale in the destination
34
+ country and reports it via OSS; at or below it, the seller may tax in the
35
+ country of establishment. Example threshold (as of the 2021 EU
36
+ e-commerce package, still current as of this pack's date): EUR 10,000 of
37
+ annual cross-border intra-EU distance sales - this figure is an
38
+ illustrative example and will expire; confirm before use.
39
+ - IOSS (Import One Stop Shop): for B2C imports into the EU of consignments
40
+ whose intrinsic value does not exceed a low-value ceiling, VAT is
41
+ collected at checkout by the seller (or the marketplace) and remitted via
42
+ a monthly IOSS return, removing the border collection step. Example
43
+ ceiling (same 2021 package): EUR 150 intrinsic value per consignment -
44
+ also illustrative, also expirable. Above the ceiling, or where IOSS is
45
+ not used, standard import VAT applies at the border with the carrier or
46
+ recipient accounting for it.
47
+ - Marketplace "deemed supplier" (EU): for the low-value import segment and
48
+ for intra-EU distance sales of goods they intermediate, online platforms
49
+ are DEEMED the supplier for VAT - the platform charges, collects, and
50
+ remits the VAT, and the underlying seller's supply is treated as B2B to
51
+ the platform for VAT purposes. Sellers still owe accurate product data
52
+ and record-keeping to the platform.
53
+
54
+ ## Marketplace-facilitator model (non-EU, concept)
55
+
56
+ - The marketplace-facilitator pattern shifts tax collection for
57
+ third-party-seller transactions to the PLATFORM: the platform registers,
58
+ calculates, collects, and remits the tax, and the seller generally no
59
+ longer owes tax on those platform-facilitated sales (but still owes tax
60
+ on its other channels).
61
+ - United States: sales and use tax follows per-state economic-nexus rules
62
+ (established by the Wayfair decision, 2018) combined with
63
+ marketplace-facilitator statutes in the states; nexus thresholds and
64
+ product taxability differ per state and change - never quote a state
65
+ threshold from memory.
66
+ - Canada: GST/HST applies to supplies of goods located in Canada by
67
+ non-resident sellers and to marketplace-facilitated sales (the 2021
68
+ regime), making the platform the deemed reseller in defined cases.
69
+ - Australia and New Zealand: low-value imported goods are drawn into
70
+ GST at the border, with merchants and marketplaces over defined turnover
71
+ acting as collectors.
72
+ - The pattern is stable; every parameter (who is "over the threshold",
73
+ which supplies are covered) is jurisdiction- and time-specific.
74
+
75
+ ## Standing discipline for this pack
76
+
77
+ - Prefer these mechanism definitions over recollection when explaining OSS,
78
+ IOSS, deemed-supplier, and marketplace-facilitator concepts.
79
+ - Registration obligations, rates, thresholds, ceilings, and filing
80
+ deadlines are ALWAYS time-sensitive: direct the user to the destination
81
+ country's current published rules (or a licensed indirect-tax adviser)
82
+ and mark the figure TBD until an authoritative source is provided.
83
+ - The EUR 10,000 and EUR 150 figures above are dated examples used to
84
+ explain the mechanics; they are not working data and must be re-verified
85
+ per transaction.
@@ -0,0 +1,201 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://teamclaw.local/schemas/team-profile-v1.json",
4
+ "title": "TeamProfile",
5
+ "description": "TeamClaw team profile package (vertical-team-profiles-design.md section 2.1). v1 subset: the fields TeamClaw consumes today (id/name/nameZh/industry/icon/version/description/roles/capabilities/warmupRoles/defaultRole). The remaining design fields (labelZh, params, domainInstructions, outputConstraints, glossary, workflows, knowledgePacks, deliverableHints, reviewedBy) are reserved as optional so industry packs can carry them before their consumers land (Phase 2+). NOTE: src/src/profile-loader.ts validates against this file with a self-contained interpreter of the keyword subset used below (type/enum/required/properties/additionalProperties/items/minItems/uniqueItems/minLength/pattern; additionalProperties only as literal false) - no external JSON Schema dependency is added to the runtime; extending the schema means extending that interpreter in the same change.",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "id",
10
+ "name",
11
+ "nameZh",
12
+ "industry",
13
+ "icon",
14
+ "version",
15
+ "description",
16
+ "roles",
17
+ "capabilities",
18
+ "warmupRoles",
19
+ "defaultRole"
20
+ ],
21
+ "properties": {
22
+ "schemaVersion": {
23
+ "type": "integer",
24
+ "enum": [1],
25
+ "description": "Profile schema format version. Additive-only evolution (design section 2.2); a version this build does not support is a fatal load error, never a silent skip."
26
+ },
27
+ "id": {
28
+ "type": "string",
29
+ "pattern": "^[a-z][a-z0-9-]*$",
30
+ "minLength": 1,
31
+ "description": "Profile slug, e.g. software-rd, crossborder-ecom, banking."
32
+ },
33
+ "name": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "description": "Display name (English)."
37
+ },
38
+ "nameZh": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "description": "Display name (Chinese)."
42
+ },
43
+ "industry": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "description": "Industry identifier used for grouping."
47
+ },
48
+ "icon": {
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "description": "Profile emoji icon."
52
+ },
53
+ "version": {
54
+ "type": "string",
55
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
56
+ "description": "Profile version (semver)."
57
+ },
58
+ "reviewedBy": {
59
+ "type": "array",
60
+ "items": { "type": "string" },
61
+ "description": "Reserved (Phase 3): domain reviewer sign-off records; mandatory for the finance packs before release."
62
+ },
63
+ "description": {
64
+ "type": "string",
65
+ "minLength": 1,
66
+ "description": "One-line summary of the team the profile describes."
67
+ },
68
+ "params": {
69
+ "type": "object",
70
+ "description": "Reserved (Phase 3): industry parameters, e.g. ecom primaryPlatform. Free-form until consumers land."
71
+ },
72
+ "roles": {
73
+ "type": "array",
74
+ "minItems": 1,
75
+ "items": {
76
+ "type": "object",
77
+ "required": [
78
+ "id",
79
+ "label",
80
+ "icon",
81
+ "description",
82
+ "capabilities",
83
+ "recommendedSkills",
84
+ "systemPrompt",
85
+ "suggestedNextRoles"
86
+ ],
87
+ "properties": {
88
+ "id": {
89
+ "type": "string",
90
+ "pattern": "^[a-z][a-z0-9-]*$",
91
+ "minLength": 1,
92
+ "description": "Role id slug (TeamClaw RoleId)."
93
+ },
94
+ "label": {
95
+ "type": "string",
96
+ "minLength": 1,
97
+ "description": "Role display label (English)."
98
+ },
99
+ "labelZh": {
100
+ "type": "string",
101
+ "minLength": 1,
102
+ "description": "Chinese display label (Phase 2.6). Optional: when absent, UI consumers fall back to label via the loader's resolveRoleDisplayName rule; present-but-empty fails load validation so the fallback never has to compete with a blank string."
103
+ },
104
+ "icon": {
105
+ "type": "string",
106
+ "minLength": 1,
107
+ "description": "Role emoji icon."
108
+ },
109
+ "description": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "description": "One-line role summary."
113
+ },
114
+ "capabilities": {
115
+ "type": "array",
116
+ "items": { "type": "string" },
117
+ "uniqueItems": true,
118
+ "description": "Role skill tokens (also role-inference tokens)."
119
+ },
120
+ "recommendedSkills": {
121
+ "type": "array",
122
+ "items": { "type": "string" },
123
+ "uniqueItems": true,
124
+ "description": "ClawHub skills preinstalled for the role."
125
+ },
126
+ "systemPrompt": {
127
+ "type": "string",
128
+ "description": "Full role system prompt. software-rd keeps this byte-identical to the roles.ts registry (Phase 1.7 golden)."
129
+ },
130
+ "suggestedNextRoles": {
131
+ "type": "array",
132
+ "items": { "type": "string" },
133
+ "description": "Role ids suggested for follow-up tasks."
134
+ }
135
+ },
136
+ "additionalProperties": false
137
+ },
138
+ "description": "The role registry this team runs with."
139
+ },
140
+ "domainInstructions": {
141
+ "type": "array",
142
+ "items": { "type": "string", "minLength": 1 },
143
+ "description": "Industry guardrails (Phase 2.4, design 2.1/2.4). On profiles that set this field the lines REPLACE buildRoleOperatingRules wholesale in the controller and worker prompt pipelines - the software engineering operating rules are NOT injected. software-rd must not set this field (fatal cross-validation in profile-loader)."
144
+ },
145
+ "outputConstraints": {
146
+ "type": "object",
147
+ "properties": {
148
+ "tailnote": { "type": "string" },
149
+ "refusals": { "type": "array", "items": { "type": "string" } },
150
+ "citationPolicy": { "type": "object" }
151
+ },
152
+ "additionalProperties": false,
153
+ "description": "Reserved (Phase 3): output-side hard constraints; mandatory for the finance packs."
154
+ },
155
+ "glossary": {
156
+ "type": "array",
157
+ "items": { "type": "string" },
158
+ "description": "Reserved (Phase 3): industry terminology injected into prompts."
159
+ },
160
+ "workflows": {
161
+ "type": "array",
162
+ "items": { "type": "object" },
163
+ "description": "Reserved (Phase 3): declarative workflow templates with conclusion branches (design section 2.4)."
164
+ },
165
+ "capabilities": {
166
+ "type": "object",
167
+ "required": ["git", "teamauto", "runnablePreview", "deliveryReview"],
168
+ "properties": {
169
+ "git": { "type": "boolean" },
170
+ "teamauto": { "type": "boolean" },
171
+ "runnablePreview": { "type": "boolean" },
172
+ "deliveryReview": { "type": "boolean" }
173
+ },
174
+ "additionalProperties": false,
175
+ "description": "Software capability switches. Phase 1 exposes the data; the short-circuit consumers land in Phase 2.3."
176
+ },
177
+ "warmupRoles": {
178
+ "type": "array",
179
+ "minItems": 1,
180
+ "items": { "type": "string" },
181
+ "uniqueItems": true,
182
+ "description": "Role ids pre-warmed at startup (cost control: 3-4 core roles max)."
183
+ },
184
+ "knowledgePacks": {
185
+ "type": "array",
186
+ "items": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9][a-z0-9-]*\\.md$" },
187
+ "uniqueItems": true,
188
+ "description": "Phase 4 static knowledge packs (zero-cost exception, design 3 Phase 4): stable reference files shipped in the profile's knowledge/ directory and injected into worker prompts after the operating contract to ground common domain concepts. Items are bare .md file names from src/src/profiles/knowledge/ (the pattern forbids path separators, so references cannot escape the pack directory); the loader cross-validation makes a missing or empty referenced file a FATAL load error, mirroring the role-reference red line. Packs carry stable reference material only - time-sensitive figures (rates, thresholds) stay out by design and remain TBD-driven."
189
+ },
190
+ "deliverableHints": {
191
+ "type": "object",
192
+ "description": "Reserved (Phase 2+): deliverable preview semantics for the industry (replaces the runnable-preview prompt wording)."
193
+ },
194
+ "defaultRole": {
195
+ "type": "string",
196
+ "minLength": 1,
197
+ "description": "Role id used when no better signal exists (role-inference miss, unconfigured startup provisioning)."
198
+ }
199
+ },
200
+ "additionalProperties": false
201
+ }