dsh-industry-research 0.1.3 → 0.2.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.
- package/CHANGELOG.md +24 -0
- package/README.es.md +12 -7
- package/README.hi.md +12 -7
- package/README.md +17 -11
- package/README.pt.md +12 -7
- package/README.zh.md +12 -7
- package/cordis.patch.yml +4 -0
- package/lib/index.js +1665 -169
- package/lib/types/adversarial.d.ts +32 -0
- package/lib/types/adversarial.d.ts.map +1 -0
- package/lib/types/adversarial.js +81 -0
- package/lib/types/adversarial.js.map +1 -0
- package/lib/types/chain-svg.d.ts +44 -0
- package/lib/types/chain-svg.d.ts.map +1 -0
- package/lib/types/chain-svg.js +186 -0
- package/lib/types/chain-svg.js.map +1 -0
- package/lib/types/chain.d.ts +36 -7
- package/lib/types/chain.d.ts.map +1 -1
- package/lib/types/chain.js +59 -7
- package/lib/types/chain.js.map +1 -1
- package/lib/types/company.d.ts +49 -0
- package/lib/types/company.d.ts.map +1 -1
- package/lib/types/company.js +82 -3
- package/lib/types/company.js.map +1 -1
- package/lib/types/config.d.ts +3 -0
- package/lib/types/config.d.ts.map +1 -1
- package/lib/types/config.js +4 -2
- package/lib/types/config.js.map +1 -1
- package/lib/types/depth.d.ts +41 -0
- package/lib/types/depth.d.ts.map +1 -0
- package/lib/types/depth.js +39 -0
- package/lib/types/depth.js.map +1 -0
- package/lib/types/index.d.ts +23 -10
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +12 -5
- package/lib/types/index.js.map +1 -1
- package/lib/types/jobs.d.ts +37 -0
- package/lib/types/jobs.d.ts.map +1 -0
- package/lib/types/jobs.js +17 -0
- package/lib/types/jobs.js.map +1 -0
- package/lib/types/report.d.ts +19 -2
- package/lib/types/report.d.ts.map +1 -1
- package/lib/types/report.js +108 -9
- package/lib/types/report.js.map +1 -1
- package/lib/types/research-state.d.ts +70 -0
- package/lib/types/research-state.d.ts.map +1 -0
- package/lib/types/research-state.js +94 -0
- package/lib/types/research-state.js.map +1 -0
- package/lib/types/taxonomy.d.ts +25 -0
- package/lib/types/taxonomy.d.ts.map +1 -0
- package/lib/types/taxonomy.js +58 -0
- package/lib/types/taxonomy.js.map +1 -0
- package/lib/types/timeline.d.ts +16 -0
- package/lib/types/timeline.d.ts.map +1 -1
- package/lib/types/timeline.js +31 -0
- package/lib/types/timeline.js.map +1 -1
- package/lib/types/toolkit.d.ts +6 -0
- package/lib/types/toolkit.d.ts.map +1 -1
- package/lib/types/toolkit.js +12 -0
- package/lib/types/toolkit.js.map +1 -1
- package/lib/types/tools/company.d.ts +23 -9
- package/lib/types/tools/company.d.ts.map +1 -1
- package/lib/types/tools/company.js +260 -85
- package/lib/types/tools/company.js.map +1 -1
- package/lib/types/tools/map.d.ts +8 -0
- package/lib/types/tools/map.d.ts.map +1 -1
- package/lib/types/tools/map.js +43 -5
- package/lib/types/tools/map.js.map +1 -1
- package/lib/types/tools/report.d.ts +12 -0
- package/lib/types/tools/report.d.ts.map +1 -1
- package/lib/types/tools/report.js +81 -14
- package/lib/types/tools/report.js.map +1 -1
- package/lib/types/tools/track.d.ts +3 -0
- package/lib/types/tools/track.d.ts.map +1 -1
- package/lib/types/tools/track.js +28 -6
- package/lib/types/tools/track.js.map +1 -1
- package/lib/types/version.d.ts +1 -1
- package/lib/types/version.js +1 -1
- package/lib/types/versions.d.ts +56 -0
- package/lib/types/versions.d.ts.map +1 -0
- package/lib/types/versions.js +100 -0
- package/lib/types/versions.js.map +1 -0
- package/package.json +1 -1
- package/src/adversarial.ts +82 -0
- package/src/chain-svg.ts +191 -0
- package/src/chain.ts +70 -7
- package/src/company.ts +101 -1
- package/src/config.ts +7 -2
- package/src/depth.ts +55 -0
- package/src/index.ts +23 -10
- package/src/jobs.ts +44 -0
- package/src/report.ts +99 -8
- package/src/research-state.ts +126 -0
- package/src/taxonomy.ts +69 -0
- package/src/timeline.ts +36 -0
- package/src/toolkit.ts +15 -0
- package/src/tools/company.ts +287 -92
- package/src/tools/map.ts +52 -5
- package/src/tools/report.ts +88 -14
- package/src/tools/track.ts +32 -6
- package/src/version.ts +1 -1
- package/src/versions.ts +114 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,30 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.0] - 2026-08-23
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Deterministic `chain.json` → SVG network renderer (`src/chain-svg.ts`): tier-column layout, directed arrow edges, and dual-rule bottleneck detection (funnel: in-degree ≥ 2 and out-degree ≤ 1; hub: in-degree ≥ 2 and out-degree ≥ 2) with highlight colors. `industry_map` gains a `renderSvg` flag that writes `chain.svg` beside `chain.json` and returns the bottleneck summary; all user text is XML-escaped and the output is byte-stable for the same input.
|
|
13
|
+
- Status assertions with dates: chain nodes and company cards may carry a `status` (`public`/`private`/`acquired`/`IPO`) that must carry a non-future `statusAsOf`; missing or future dates fail validation loud.
|
|
14
|
+
- Price discipline and ticker validation: company cards accept sourced `metrics` (every value requires `source` + `asOf`) and a `ticker` checked against built-in formats (A-share 6 digits, US 1–5 letters, HK 1–5 digits), with the `scan.strictTicker` config exemption.
|
|
15
|
+
- Research depth routing (`src/depth.ts`): `industry_map` / `industry_track` / `company_scan` accept a `depth` argument (quick/standard/comprehensive, default standard) that deterministically scales web collection — quick uses minimal source counts, comprehensive uses maximum — with loud failure out of range.
|
|
16
|
+
- Per-company scan failure isolation: `company_scan` accepts a `companies` batch argument; one company's failure (bad file, path escape, validation) no longer aborts the batch and is reported in a `failures` list with its reason while the rest produce normally.
|
|
17
|
+
- Artifact version ledger (`src/versions.ts` + `versions.jsonl` at the industry root): `industry_map` / `company_scan` / `industry_report` append a root-relative path + SHA-256 + injected timestamp + change type on every artifact write; artifact reads verify against the ledger and fail loud on a hash mismatch (unrecorded artifacts are skipped).
|
|
18
|
+
- Built-in industry taxonomy anchor table (`src/taxonomy.ts`, 国民经济行业分类 大类 code-name-keywords); chain nodes may declare a `taxonomyCode` that must hit the table, with loud failure for unknown codes.
|
|
19
|
+
- Evidence category labels: timeline entries may carry an `evidenceCategory` (`confirmed-catalyst` / `market-narrative` / `forum-buzz` / `technical-confirmation` / `macro-amplifier` / `background-noise`) validated on write; the auto-draft groups timeline entries by category.
|
|
20
|
+
- Delivery contract validation (`validateDeliveryContract`): `industry_report` runs a deterministic pre-production check (complete blocks, status assertions with dates, value assertions with source + asOf, no placeholder residue) and fails loud instead of emitting a half-assembled report.
|
|
21
|
+
- Research-state memory (`src/research-state.ts` + `research-state.json` per industry): `industry_map` / `industry_track` persist the last run's depth, latest artifact hashes, source URLs, evidence-category counts, gaps, and an injected timestamp, and return a deterministic "vs last run" delta (new/removed sources, unchanged evidence); a corrupt state fails loud and the write is registered in `versions.jsonl`.
|
|
22
|
+
- Red-team adversarial review (`src/adversarial.ts`): `industry_report` runs the deterministic `adversarialCheck` machine-check baseline (dead evidence links, unsourced/undated numbers, statuses without dates) and, when `ctx.get('jobs')` is mounted, spawns a devil's-advocate review job that writes `red-review-note.md`; without `jobs` it records `review: skipped(jobs unavailable)`.
|
|
23
|
+
- Per-company parallel scan: `company_scan` batch mode accepts `parallel` (default false); with `parallel: true` and a mounted `ctx.jobs` it fans each company out into an independent job with failure isolation and reports the execution `mode`, otherwise it falls back to the sequential path.
|
|
24
|
+
|
|
25
|
+
### Deviations
|
|
26
|
+
|
|
27
|
+
- **chain.json Slot client visualization UI** — needs a new client face plus packaging changes; the deterministic `chain.svg` artifact already covers the core value.
|
|
28
|
+
- **Industry-expert subagent team (model orchestration)** — covered by failure isolation, depth routing, and adversarial review; a full model team exceeds this repo's determinism-first principle.
|
|
29
|
+
- **Exa external retrieval service** — third-party API dependency, out of scope.
|
|
30
|
+
- **Skill self-evolution (Hermes shadow agent)** — exceeds the DSH skill-provider mechanism.
|
|
31
|
+
|
|
8
32
|
## [0.1.3] - 2026-08-23
|
|
9
33
|
|
|
10
34
|
### Added
|
package/README.es.md
CHANGED
|
@@ -90,24 +90,25 @@ Todos los ajustes son campos `Config` de Schemastery; los valores inválidos fal
|
|
|
90
90
|
| `track.maxFetchesPerCall` | `10` | Presupuesto de capturas por llamada `industry_track`. |
|
|
91
91
|
| `scan.maxFileBytes` | `1048576` | Tope de lectura por archivo de datos de empresa. |
|
|
92
92
|
| `scan.maxFigureCandidates` | `100` | Presupuesto de líneas candidatas por escaneo. |
|
|
93
|
+
| `scan.strictTicker` | `true` | Los tickers de tarjetas deben coincidir con un formato integrado (A-share 6 dígitos, EE. UU. 1–5 letras, HK 1–5 dígitos); `false` exime la verificación. |
|
|
93
94
|
|
|
94
95
|
## Tools & surfaces
|
|
95
96
|
|
|
96
|
-
### `industry_map({ industry, seed?, seedFiles?, web?, chain? })`
|
|
97
|
+
### `industry_map({ industry, seed?, seedFiles?, web?, chain?, renderSvg?, depth? })`
|
|
97
98
|
|
|
98
|
-
Con `chain`: valida (aristas colgadas, valores sin fuente, tiers ilegales, ids duplicados — fallo ruidoso con la lista completa) y persiste `chain.json`, luego lista las lagunas explícitas. Sin `chain`: devuelve el mapa actual, las fuentes registradas y un resumen opcional de estructura vía `ctx.web` para iterar. Emite `industry-research/map`.
|
|
99
|
+
Con `chain`: valida (aristas colgadas, valores sin fuente, tiers ilegales, ids duplicados, status/statusAsOf, `taxonomyCode` desconocido — fallo ruidoso con la lista completa) y persiste `chain.json`, luego lista las lagunas explícitas y los nodos cuello de botella. Sin `chain`: devuelve el mapa actual, las fuentes registradas y un resumen opcional de estructura vía `ctx.web` para iterar. Con `renderSvg: true` también escribe un `chain.svg` determinista. `depth` escala la asistencia web. Emite `industry-research/map`.
|
|
99
100
|
|
|
100
|
-
### `industry_track({ industry, topics?, since? })`
|
|
101
|
+
### `industry_track({ industry, topics?, since?, depth?, evidenceCategory? })`
|
|
101
102
|
|
|
102
|
-
Busca cada tema a través de `ctx.web`, filtra por las listas y `since`, captura instantáneas (SHA-256) dentro del presupuesto y fusiona en `timeline.jsonl` (deduplicación por URL normalizada, con tope). Las fuentes cuya instantánea falló se conservan como entradas solo-cita con la razón en `note`. Falla en voz alta nombrando la capacidad faltante cuando `ctx.web` no está montada o `offline: true`. Emite `industry-research/track`.
|
|
103
|
+
Busca cada tema a través de `ctx.web`, filtra por las listas y `since`, captura instantáneas (SHA-256) dentro del presupuesto y fusiona en `timeline.jsonl` (deduplicación por URL normalizada, con tope). `depth` escala el presupuesto; `evidenceCategory` etiqueta cada entrada y se valida contra la enumeración de seis categorías. Las fuentes cuya instantánea falló se conservan como entradas solo-cita con la razón en `note`. Falla en voz alta nombrando la capacidad faltante cuando `ctx.web` no está montada o `offline: true`. Emite `industry-research/track`.
|
|
103
104
|
|
|
104
|
-
### `company_scan({ name, dataFiles?, web? })`
|
|
105
|
+
### `company_scan({ name | companies, dataFiles?, web?, status?, statusAsOf?, ticker?, metrics?, depth?, parallel? })`
|
|
105
106
|
|
|
106
|
-
Lee los archivos de datos del workspace (`.md/.txt/.csv/.tsv/.json`; v1 no analiza PDF), los hashea, extrae esquemas Markdown y líneas candidatas de cifras, adjunta citas `ctx.web` opcionales y persiste la tarjeta. Los archivos rechazados regresan con razones; todo lo que la tarjeta no puede establecer es una laguna explícita.
|
|
107
|
+
Lee los archivos de datos del workspace (`.md/.txt/.csv/.tsv/.json`; v1 no analiza PDF), los hashea, extrae esquemas Markdown y líneas candidatas de cifras, adjunta citas `ctx.web` opcionales y persiste la tarjeta. Un `status` requiere un `statusAsOf` no futuro; un `ticker` debe coincidir con un formato integrado salvo `scan.strictTicker: false`; cada valor de `metrics` debe llevar `source` + `asOf`. `companies` (lote) aísla una empresa fallida sin abortar el lote; `parallel: true` distribuye cada empresa en un job independiente cuando `ctx.jobs` está montado (si no, vuelve a secuencial, reflejado en `mode`). Los archivos rechazados regresan con razones; todo lo que la tarjeta no puede establecer es una laguna explícita.
|
|
107
108
|
|
|
108
109
|
### `industry_report({ industry, sections?, companies?, draft? })`
|
|
109
110
|
|
|
110
|
-
Reúne la evidencia (`E-chain`, `E-timeline`, `E-company-<slug>`) y valida tu `draft` (secciones + claims; cada `evidenceIds` debe referenciar evidencia registrada) o construye el borrador mecánico (métricas con fuente y entradas recientes se convierten en claims). Ruta del motor: directorio sellado + `sealHash` + veredictos por claim. Ruta integrada: Markdown versionado + manifiesto, claims honestamente marcados `unverified`. Emite `industry-research/report`.
|
|
111
|
+
Reúne la evidencia (`E-chain`, `E-timeline`, `E-company-<slug>`), verifica los artefactos leídos contra `versions.jsonl` (el hash que no coincide falla en voz alta) y valida tu `draft` (secciones + claims; cada `evidenceIds` debe referenciar evidencia registrada) o construye el borrador mecánico (métricas con fuente y entradas recientes se convierten en claims, agrupadas por `evidenceCategory`). Un contrato de entrega determinista corre antes de producir y falla en voz alta ante bloques faltantes, marcadores de posición o aserciones sin fuente/fecha. Una comprobación adversaria determinista siempre corre, y un job de revisión rojo (`red-review-note.md`) se lanza cuando `ctx.jobs` está montado (si no, `review: skipped(jobs unavailable)`). Ruta del motor: directorio sellado + `sealHash` + veredictos por claim. Ruta integrada: Markdown versionado + manifiesto, claims honestamente marcados `unverified`. Emite `industry-research/report`.
|
|
111
112
|
|
|
112
113
|
## Skills
|
|
113
114
|
|
|
@@ -119,7 +120,11 @@ Ambas se cargan bajo demanda con la herramienta estándar `skill` (`加载 indus
|
|
|
119
120
|
## Data layout
|
|
120
121
|
|
|
121
122
|
```
|
|
123
|
+
<workspace>/<industryRoot>/versions.jsonl registro de versiones (SHA-256 + timestamp + cambio)
|
|
124
|
+
<workspace>/<industryRoot>/<industria>/research-state.json memoria de estado de investigación
|
|
125
|
+
<workspace>/<industryRoot>/<industria>/red-review-note.md industry_report (revisión roja, jobs)
|
|
122
126
|
<workspace>/<industryRoot>/<industria>/chain.json industry_map
|
|
127
|
+
<workspace>/<industryRoot>/<industria>/chain.svg industry_map (renderSvg: true)
|
|
123
128
|
<workspace>/<industryRoot>/<industria>/timeline.jsonl industry_track
|
|
124
129
|
<workspace>/<industryRoot>/<industria>/sources.json registro de fuentes citables (S1, S2, …)
|
|
125
130
|
<workspace>/<industryRoot>/<industria>/notes/ notas semilla
|
package/README.hi.md
CHANGED
|
@@ -90,24 +90,25 @@ dsh plugin --profile demo remove dsh-industry-research # अनइंस्
|
|
|
90
90
|
| `track.maxFetchesPerCall` | `10` | प्रति `industry_track` कॉल स्नैपशॉट-फ़ेच बजट। |
|
|
91
91
|
| `scan.maxFileBytes` | `1048576` | कंपनी डेटा फ़ाइलों की प्रति-फ़ाइल रीड सीमा। |
|
|
92
92
|
| `scan.maxFigureCandidates` | `100` | प्रति कंपनी स्कैन आंकड़ा-उम्मीदवार बजट। |
|
|
93
|
+
| `scan.strictTicker` | `true` | कार्ड टिकर को बिल्ट-इन फ़ॉर्मेट से मेल खाना चाहिए (A-share 6 अंक, US 1–5 अक्षर, HK 1–5 अंक); `false` फ़ॉर्मेट जाँच को छूट देता है। |
|
|
93
94
|
|
|
94
95
|
## Tools & surfaces
|
|
95
96
|
|
|
96
|
-
### `industry_map({ industry, seed?, seedFiles?, web?, chain? })`
|
|
97
|
+
### `industry_map({ industry, seed?, seedFiles?, web?, chain?, renderSvg?, depth? })`
|
|
97
98
|
|
|
98
|
-
`chain` के साथ: वैलिडेट करता है (लटकती एज, बिना-स्रोत मान, अवैध tier, डुप्लिकेट id — पूरी समस्या सूची के साथ स्पष्ट विफलता) और `chain.json` सहेजता है, फिर स्पष्ट अंतराल स्लॉट सूचीबद्ध करता है। `chain` के बिना: वर्तमान मानचित्र, दर्ज स्रोत और वैकल्पिक `ctx.web` श्रृंखला-संरचना सारांश लौटाता है ताकि मॉडल पुनरावृत्ति कर सके। `industry-research/map` उत्सर्जित करता है।
|
|
99
|
+
`chain` के साथ: वैलिडेट करता है (लटकती एज, बिना-स्रोत मान, अवैध tier, डुप्लिकेट id, status/statusAsOf, अज्ञात `taxonomyCode` — पूरी समस्या सूची के साथ स्पष्ट विफलता) और `chain.json` सहेजता है, फिर स्पष्ट अंतराल स्लॉट व बॉटलनेक नोड सूचीबद्ध करता है। `chain` के बिना: वर्तमान मानचित्र, दर्ज स्रोत और वैकल्पिक `ctx.web` श्रृंखला-संरचना सारांश लौटाता है ताकि मॉडल पुनरावृत्ति कर सके। `renderSvg: true` पर एक नियतात्मक `chain.svg` भी लिखता है। `depth` web सहायता को स्केल करता है। `industry-research/map` उत्सर्जित करता है।
|
|
99
100
|
|
|
100
|
-
### `industry_track({ industry, topics?, since? })`
|
|
101
|
+
### `industry_track({ industry, topics?, since?, depth?, evidenceCategory? })`
|
|
101
102
|
|
|
102
|
-
`ctx.web` से प्रत्येक विषय खोजता है, सूचियों व `since` से फ़िल्टर करता है, कॉल बजट के भीतर स्नैपशॉट (SHA-256) फ़ेच करता है, और `timeline.jsonl` में मर्ज करता है (नॉर्मलाइज़्ड URL से डीडुप, सीमा सहित)। जिन स्रोतों का स्नैपशॉट विफल हुआ वे कारण `note` में लिखकर केवल-उद्धरण एंट्री के रूप में रहते हैं। `ctx.web` अनमाउंटेड या `offline: true` होने पर गुम क्षमता का नाम बताते हुए स्पष्ट विफल। `industry-research/track` उत्सर्जित करता है।
|
|
103
|
+
`ctx.web` से प्रत्येक विषय खोजता है, सूचियों व `since` से फ़िल्टर करता है, कॉल बजट के भीतर स्नैपशॉट (SHA-256) फ़ेच करता है, और `timeline.jsonl` में मर्ज करता है (नॉर्मलाइज़्ड URL से डीडुप, सीमा सहित)। `depth` बजट स्केल करता है; `evidenceCategory` हर एंट्री को लेबल करता है और छह-श्रेणी एनम से वैलिडेट होता है। जिन स्रोतों का स्नैपशॉट विफल हुआ वे कारण `note` में लिखकर केवल-उद्धरण एंट्री के रूप में रहते हैं। `ctx.web` अनमाउंटेड या `offline: true` होने पर गुम क्षमता का नाम बताते हुए स्पष्ट विफल। `industry-research/track` उत्सर्जित करता है।
|
|
103
104
|
|
|
104
|
-
### `company_scan({ name, dataFiles?, web? })`
|
|
105
|
+
### `company_scan({ name | companies, dataFiles?, web?, status?, statusAsOf?, ticker?, metrics?, depth?, parallel? })`
|
|
105
106
|
|
|
106
|
-
workspace डेटा फ़ाइलें (`.md/.txt/.csv/.tsv/.json`; v1 PDF पार्स नहीं करता) पढ़ता, हैश करता, Markdown रूपरेखा व आंकड़ा-उम्मीदवार पंक्तियाँ निकालता है, वैकल्पिक `ctx.web` उद्धरण जोड़ता है और कार्ड सहेजता है। अस्वीकृत फ़ाइलें कारणों सहित लौटती हैं; कार्ड जो स्थापित नहीं कर सकता वह स्पष्ट अंतराल है।
|
|
107
|
+
workspace डेटा फ़ाइलें (`.md/.txt/.csv/.tsv/.json`; v1 PDF पार्स नहीं करता) पढ़ता, हैश करता, Markdown रूपरेखा व आंकड़ा-उम्मीदवार पंक्तियाँ निकालता है, वैकल्पिक `ctx.web` उद्धरण जोड़ता है और कार्ड सहेजता है। `status` को एक गैर-भविष्य `statusAsOf` चाहिए; `ticker` को `scan.strictTicker: false` के अलावा बिल्ट-इन फ़ॉर्मेट से मेल खाना चाहिए; हर `metrics` मान को `source` + `asOf` चाहिए। `companies` (बैच) एक विफल कंपनी को बैच रोके बिना अलग करता है; `parallel: true` और `ctx.jobs` माउंट होने पर हर कंपनी को स्वतंत्र job में फ़ैन-आउट करता है (वरना क्रमिक पथ पर लौटता है, `mode` में दर्शित)। अस्वीकृत फ़ाइलें कारणों सहित लौटती हैं; कार्ड जो स्थापित नहीं कर सकता वह स्पष्ट अंतराल है।
|
|
107
108
|
|
|
108
109
|
### `industry_report({ industry, sections?, companies?, draft? })`
|
|
109
110
|
|
|
110
|
-
एविडेंस (`E-chain`, `E-timeline`, `E-company-<slug>`) जुटाता है और या तो आपका `draft` वैलिडेट करता है (sections + claims; हर claim के `evidenceIds` दर्ज एविडेंस को संदर्भित करने चाहिए) या यांत्रिक ऑटो-ड्राफ़्ट बनाता है (स्रोतित मेट्रिक्स और हालिया टाइमलाइन एंट्री claims बनती
|
|
111
|
+
एविडेंस (`E-chain`, `E-timeline`, `E-company-<slug>`) जुटाता है, पढ़े गए आर्टिफ़ैक्ट `versions.jsonl` से वेरिफ़ाई करता है (बेमेल हैश स्पष्ट विफल) और या तो आपका `draft` वैलिडेट करता है (sections + claims; हर claim के `evidenceIds` दर्ज एविडेंस को संदर्भित करने चाहिए) या यांत्रिक ऑटो-ड्राफ़्ट बनाता है (स्रोतित मेट्रिक्स और हालिया टाइमलाइन एंट्री claims बनती हैं, `evidenceCategory` से समूहित)। उत्पादन से पहले एक नियतात्मक डिलीवरी कॉन्ट्रैक्ट चलता है और गुम ब्लॉक, प्लेसहोल्डर या बिना-स्रोत/बिना-तिथि कथन पर स्पष्ट विफल होता है। एक नियतात्मक विरोधी मशीन-जाँच हमेशा चलती है, और `ctx.jobs` माउंट होने पर एक रेड-टीम समीक्षा job (`red-review-note.md`) शुरू होता है (वरना `review: skipped(jobs unavailable)`)। इंजन पथ: सील्ड डायरेक्टरी + `sealHash` + प्रति-claim निष्कर्ष। फ़ॉलबैक पथ: संस्करणित Markdown + मैनिफ़ेस्ट, claims ईमानदारी से `unverified` अंकित। `industry-research/report` उत्सर्जित करता है।
|
|
111
112
|
|
|
112
113
|
## Skills
|
|
113
114
|
|
|
@@ -119,7 +120,11 @@ workspace डेटा फ़ाइलें (`.md/.txt/.csv/.tsv/.json`; v1 PDF
|
|
|
119
120
|
## Data layout
|
|
120
121
|
|
|
121
122
|
```
|
|
123
|
+
<workspace>/<industryRoot>/versions.jsonl संस्करण लेजर (SHA-256 + टाइमस्टैम्प + बदलाव)
|
|
124
|
+
<workspace>/<industryRoot>/<उद्योग>/research-state.json अनुसंधान-स्थिति स्मृति
|
|
125
|
+
<workspace>/<industryRoot>/<उद्योग>/red-review-note.md industry_report (रेड-टीम समीक्षा, jobs)
|
|
122
126
|
<workspace>/<industryRoot>/<उद्योग>/chain.json industry_map
|
|
127
|
+
<workspace>/<industryRoot>/<उद्योग>/chain.svg industry_map (renderSvg: true)
|
|
123
128
|
<workspace>/<industryRoot>/<उद्योग>/timeline.jsonl industry_track
|
|
124
129
|
<workspace>/<industryRoot>/<उद्योग>/sources.json उद्धरण योग्य स्रोत रजिस्ट्री (S1, S2, …)
|
|
125
130
|
<workspace>/<industryRoot>/<उद्योग>/notes/ सीड नोट्स
|
package/README.md
CHANGED
|
@@ -32,10 +32,11 @@
|
|
|
32
32
|
|
|
33
33
|
## What you get
|
|
34
34
|
|
|
35
|
-
- **`industry_map`** — build or update an industry chain map (`chain.json`): upstream/midstream/downstream nodes, edges, and metric slots. A metric with a `value` must carry a `sourceRef`; a value-less slot is an explicit gap. Seed notes/files and an optional `ctx.web` digest are registered as citable sources (`S1`, `S2`, …).
|
|
36
|
-
- **`industry_track`** — public-source policy/news tracking over the official `ctx.web` seam: per-topic search, host allow/block lists, `since` filtering, bounded snapshot fetches with SHA-256 provenance hashes, and append + dedupe into `timeline.jsonl` with a retention cap. Fails loud when the web capability is unreachable.
|
|
37
|
-
- **`company_scan`** — company cards (`card.json` + `card.md`) from your workspace data files (SHA-256-hashed, with Markdown outlines and figure-candidate lines so every number cites a file and a line), plus an optional `ctx.web` citation complement. Text formats only in v1 (no PDF).
|
|
38
|
-
- **`industry_report`** — one auditable report from the map + timeline + cards. With a mounted `ctx.researchReport` engine the evidence/sections/claims are sealed by its `assemble` and per-claim verdicts come back; without one, the builtin fallback writes versioned `reports/<YYYYMMDD-HHmmss>/report.md` + `manifest.json` with a SHA-256 source-traceability table and honestly labels `engine: 'builtin-fallback'`.
|
|
35
|
+
- **`industry_map`** — build or update an industry chain map (`chain.json`): upstream/midstream/downstream nodes, edges, and metric slots. A metric with a `value` must carry a `sourceRef`; a value-less slot is an explicit gap. Node `status` assertions carry a `statusAsOf`, and an optional `taxonomyCode` must hit the built-in 国民经济行业分类 大类 table. With `renderSvg: true` it also writes a deterministic, tier-layered `chain.svg` network diagram with funnel/hub bottleneck highlighting. A `depth` argument scales the web assist (quick/standard/comprehensive). Seed notes/files and an optional `ctx.web` digest are registered as citable sources (`S1`, `S2`, …).
|
|
36
|
+
- **`industry_track`** — public-source policy/news tracking over the official `ctx.web` seam: per-topic search, host allow/block lists, `since` filtering, bounded snapshot fetches with SHA-256 provenance hashes, and append + dedupe into `timeline.jsonl` with a retention cap. Entries may carry a validated `evidenceCategory`; a `depth` argument scales source counts. Fails loud when the web capability is unreachable.
|
|
37
|
+
- **`company_scan`** — company cards (`card.json` + `card.md`) from your workspace data files (SHA-256-hashed, with Markdown outlines and figure-candidate lines so every number cites a file and a line), plus an optional `ctx.web` citation complement. Cards carry a listing `status` (with `statusAsOf`), a format-checked `ticker`, and sourced price/value `metrics` (each with `source` + `asOf`). Batch mode (`companies`) isolates one bad company without aborting the batch; `depth` scales the web complement. Text formats only in v1 (no PDF).
|
|
38
|
+
- **`industry_report`** — one auditable report from the map + timeline + cards. Before producing, a deterministic delivery contract checks blocks, status/price assertions, and placeholder residue (fail loud, no half-assembled report). Timeline entries are grouped by `evidenceCategory`. With a mounted `ctx.researchReport` engine the evidence/sections/claims are sealed by its `assemble` and per-claim verdicts come back; without one, the builtin fallback writes versioned `reports/<YYYYMMDD-HHmmss>/report.md` + `manifest.json` with a SHA-256 source-traceability table and honestly labels `engine: 'builtin-fallback'`.
|
|
39
|
+
- **Artifact version ledger** — `industry_map` / `company_scan` / `industry_report` append to `versions.jsonl` (root-relative path + SHA-256 + timestamp + change type) on every artifact write; reads verify the hash and fail loud on mismatch.
|
|
39
40
|
- **Two methodology skills** — `industry-research-method` (chain decomposition, supply/demand framework, sourcing discipline, gap-declaration discipline) and `company-research-method` (company framework, public-source list, compliance wording).
|
|
40
41
|
- **Typed Cordis events** — `industry-research/map`, `industry-research/track`, `industry-research/report` emitted after each committed artifact.
|
|
41
42
|
|
|
@@ -91,24 +92,25 @@ All tunables are Schemastery `Config` fields; invalid values fail the profile lo
|
|
|
91
92
|
| `track.maxFetchesPerCall` | `10` | Snapshot-fetch budget per `industry_track` call. |
|
|
92
93
|
| `scan.maxFileBytes` | `1048576` | Per-file read cap for company data files. |
|
|
93
94
|
| `scan.maxFigureCandidates` | `100` | Figure-candidate budget per company scan. |
|
|
95
|
+
| `scan.strictTicker` | `true` | Company-card tickers must match a built-in format (A-share 6 digits, US 1–5 letters, HK 1–5 digits); `false` exempts the format check. |
|
|
94
96
|
|
|
95
97
|
## Tools & surfaces
|
|
96
98
|
|
|
97
|
-
### `industry_map({ industry, seed?, seedFiles?, web?, chain? })`
|
|
99
|
+
### `industry_map({ industry, seed?, seedFiles?, web?, chain?, renderSvg?, depth? })`
|
|
98
100
|
|
|
99
|
-
Called with `chain`: validates (dangling edges, unsourced values, illegal tiers, duplicate ids — loud failure with the full issue list) and persists `chain.json`, then lists the explicit gap slots. Called without `chain`: returns the current map, the registered sources, and an optional `ctx.web` chain-structure digest so the model can iterate. Emits `industry-research/map`.
|
|
101
|
+
Called with `chain`: validates (dangling edges, unsourced values, illegal tiers, duplicate ids, status/statusAsOf, unknown `taxonomyCode` — loud failure with the full issue list) and persists `chain.json`, then lists the explicit gap slots and bottleneck nodes. Called without `chain`: returns the current map, the registered sources, and an optional `ctx.web` chain-structure digest so the model can iterate. With `renderSvg: true` it also writes a deterministic `chain.svg`. `depth` (quick/standard/comprehensive) scales the web assist. Returns a `delta` summary vs the previous `research-state.json`. Emits `industry-research/map`.
|
|
100
102
|
|
|
101
|
-
### `industry_track({ industry, topics?, since? })`
|
|
103
|
+
### `industry_track({ industry, topics?, since?, depth?, evidenceCategory? })`
|
|
102
104
|
|
|
103
|
-
Searches each topic through `ctx.web`, filters by the allow/block lists and `since`, fetches page snapshots (SHA-256) within the call budget, and merges into `timeline.jsonl` (dedupe by normalized URL, capped). Sources whose snapshot failed are kept as citation-only entries with the reason in `note`. Fails loud naming the missing capability when `ctx.web` is unmounted or `offline: true`. Emits `industry-research/track`.
|
|
105
|
+
Searches each topic through `ctx.web`, filters by the allow/block lists and `since`, fetches page snapshots (SHA-256) within the call budget, and merges into `timeline.jsonl` (dedupe by normalized URL, capped). `depth` scales the source/fetch budget; `evidenceCategory` labels every appended entry and is validated against the six-category enum. Sources whose snapshot failed are kept as citation-only entries with the reason in `note`. Returns a `delta` summary vs the previous `research-state.json`. Fails loud naming the missing capability when `ctx.web` is unmounted or `offline: true`. Emits `industry-research/track`.
|
|
104
106
|
|
|
105
|
-
### `company_scan({ name, dataFiles?, web? })`
|
|
107
|
+
### `company_scan({ name | companies, dataFiles?, web?, status?, statusAsOf?, ticker?, metrics?, depth?, parallel? })`
|
|
106
108
|
|
|
107
|
-
Reads the workspace data files (`.md/.txt/.csv/.tsv/.json`; v1 does not parse PDF), hashes them, extracts Markdown outlines and figure-candidate lines, optionally attaches `ctx.web` citations, and persists the card. Rejected files come back with reasons; everything the card cannot establish is an explicit gap.
|
|
109
|
+
Reads the workspace data files (`.md/.txt/.csv/.tsv/.json`; v1 does not parse PDF), hashes them, extracts Markdown outlines and figure-candidate lines, optionally attaches `ctx.web` citations, and persists the card. A `status` requires a non-future `statusAsOf`; a `ticker` must match a built-in format unless `scan.strictTicker: false`; every `metrics` value must carry `source` + `asOf`. `companies` (batch) isolates one bad company without aborting the batch; `parallel: true` fans each company into an independent job when `ctx.jobs` is mounted (otherwise it falls back to sequential, reported in the result `mode`). Rejected files come back with reasons; everything the card cannot establish is an explicit gap.
|
|
108
110
|
|
|
109
111
|
### `industry_report({ industry, sections?, companies?, draft? })`
|
|
110
112
|
|
|
111
|
-
Assembles evidence (`E-chain`, `E-timeline`, `E-company-<slug>`) and either validates your `draft` (sections + claims; every claim's `evidenceIds` must reference registered evidence) or builds the mechanical auto-draft (sourced metrics and recent timeline entries become claims). Engine path: sealed directory + `sealHash` + per-claim verdicts. Fallback path: versioned Markdown + manifest, claims honestly marked `unverified`. Emits `industry-research/report`.
|
|
113
|
+
Assembles evidence (`E-chain`, `E-timeline`, `E-company-<slug>`), verifies the read artifacts against `versions.jsonl` (hash mismatch fails loud), and either validates your `draft` (sections + claims; every claim's `evidenceIds` must reference registered evidence) or builds the mechanical auto-draft (sourced metrics and recent timeline entries become claims, grouped by `evidenceCategory`). A deterministic delivery contract runs before production and fails loud on any missing block, placeholder, or unsourced/undated assertion. A deterministic adversarial machine-check always runs, and a red-team review job (`red-review-note.md`) is spawned when `ctx.jobs` is mounted (else `review: skipped(jobs unavailable)`). Engine path: sealed directory + `sealHash` + per-claim verdicts. Fallback path: versioned Markdown + manifest, claims honestly marked `unverified`. Emits `industry-research/report`.
|
|
112
114
|
|
|
113
115
|
## Skills
|
|
114
116
|
|
|
@@ -120,10 +122,14 @@ Both load on demand through the standard `skill` tool (`加载 industry-research
|
|
|
120
122
|
## Data layout
|
|
121
123
|
|
|
122
124
|
```
|
|
125
|
+
<workspace>/<industryRoot>/versions.jsonl artifact version ledger (SHA-256 + timestamp + change)
|
|
126
|
+
<workspace>/<industryRoot>/<industry>/research-state.json research-state memory
|
|
123
127
|
<workspace>/<industryRoot>/<industry>/chain.json industry_map
|
|
128
|
+
<workspace>/<industryRoot>/<industry>/chain.svg industry_map (renderSvg: true)
|
|
124
129
|
<workspace>/<industryRoot>/<industry>/timeline.jsonl industry_track
|
|
125
130
|
<workspace>/<industryRoot>/<industry>/sources.json citable source registry (S1, S2, …)
|
|
126
131
|
<workspace>/<industryRoot>/<industry>/notes/ seed notes
|
|
132
|
+
<workspace>/<industryRoot>/<industry>/red-review-note.md industry_report (red-team review, jobs)
|
|
127
133
|
<workspace>/<industryRoot>/<industry>/reports/<ts>/ industry_report (report.md + manifest.json)
|
|
128
134
|
<workspace>/<industryRoot>/companies/<name>/card.* company_scan
|
|
129
135
|
```
|
package/README.pt.md
CHANGED
|
@@ -90,24 +90,25 @@ Todos os ajustes são campos `Config` de Schemastery; valores inválidos falham
|
|
|
90
90
|
| `track.maxFetchesPerCall` | `10` | Orçamento de capturas por chamada `industry_track`. |
|
|
91
91
|
| `scan.maxFileBytes` | `1048576` | Teto de leitura por arquivo de dados de empresa. |
|
|
92
92
|
| `scan.maxFigureCandidates` | `100` | Orçamento de linhas candidatas por varredura. |
|
|
93
|
+
| `scan.strictTicker` | `true` | Tickers de cartões devem corresponder a um formato integrado (A-share 6 dígitos, EUA 1–5 letras, HK 1–5 dígitos); `false` isenta a verificação. |
|
|
93
94
|
|
|
94
95
|
## Tools & surfaces
|
|
95
96
|
|
|
96
|
-
### `industry_map({ industry, seed?, seedFiles?, web?, chain? })`
|
|
97
|
+
### `industry_map({ industry, seed?, seedFiles?, web?, chain?, renderSvg?, depth? })`
|
|
97
98
|
|
|
98
|
-
Com `chain`: valida (arestas pendentes, valores sem fonte, tiers ilegais, ids duplicados — falha ruidosa com a lista completa) e persiste `chain.json`, depois lista as lacunas explícitas. Sem `chain`: devolve o mapa atual, as fontes registradas e um resumo opcional de estrutura via `ctx.web` para iterar. Emite `industry-research/map`.
|
|
99
|
+
Com `chain`: valida (arestas pendentes, valores sem fonte, tiers ilegais, ids duplicados, status/statusAsOf, `taxonomyCode` desconhecido — falha ruidosa com a lista completa) e persiste `chain.json`, depois lista as lacunas explícitas e os nós gargalo. Sem `chain`: devolve o mapa atual, as fontes registradas e um resumo opcional de estrutura via `ctx.web` para iterar. Com `renderSvg: true` também grava um `chain.svg` determinístico. `depth` escala a assistência web. Emite `industry-research/map`.
|
|
99
100
|
|
|
100
|
-
### `industry_track({ industry, topics?, since? })`
|
|
101
|
+
### `industry_track({ industry, topics?, since?, depth?, evidenceCategory? })`
|
|
101
102
|
|
|
102
|
-
Busca cada tópico via `ctx.web`, filtra pelas listas e `since`, captura snapshots (SHA-256) dentro do orçamento e funde em `timeline.jsonl` (deduplicação por URL normalizada, com teto). Fontes cujo snapshot falhou são mantidas como entradas só-citação com a razão em `note`. Falha em voz alta nomeando a capacidade ausente quando `ctx.web` não está montada ou `offline: true`. Emite `industry-research/track`.
|
|
103
|
+
Busca cada tópico via `ctx.web`, filtra pelas listas e `since`, captura snapshots (SHA-256) dentro do orçamento e funde em `timeline.jsonl` (deduplicação por URL normalizada, com teto). `depth` escala o orçamento; `evidenceCategory` rotula cada entrada e é validado contra a enumeração de seis categorias. Fontes cujo snapshot falhou são mantidas como entradas só-citação com a razão em `note`. Falha em voz alta nomeando a capacidade ausente quando `ctx.web` não está montada ou `offline: true`. Emite `industry-research/track`.
|
|
103
104
|
|
|
104
|
-
### `company_scan({ name, dataFiles?, web? })`
|
|
105
|
+
### `company_scan({ name | companies, dataFiles?, web?, status?, statusAsOf?, ticker?, metrics?, depth?, parallel? })`
|
|
105
106
|
|
|
106
|
-
Lê os arquivos de dados do workspace (`.md/.txt/.csv/.tsv/.json`; v1 não analisa PDF), calcula hashes, extrai esboços Markdown e linhas candidatas de números, anexa citações `ctx.web` opcionais e persiste o cartão. Arquivos rejeitados retornam com razões; tudo o que o cartão não consegue estabelecer é uma lacuna explícita.
|
|
107
|
+
Lê os arquivos de dados do workspace (`.md/.txt/.csv/.tsv/.json`; v1 não analisa PDF), calcula hashes, extrai esboços Markdown e linhas candidatas de números, anexa citações `ctx.web` opcionais e persiste o cartão. Um `status` exige um `statusAsOf` não futuro; um `ticker` deve corresponder a um formato integrado salvo `scan.strictTicker: false`; cada valor de `metrics` deve levar `source` + `asOf`. `companies` (lote) isola uma empresa falha sem abortar o lote; `parallel: true` distribui cada empresa em um job independente quando `ctx.jobs` está montado (senão volta a sequencial, refletido em `mode`). Arquivos rejeitados retornam com razões; tudo o que o cartão não consegue estabelecer é uma lacuna explícita.
|
|
107
108
|
|
|
108
109
|
### `industry_report({ industry, sections?, companies?, draft? })`
|
|
109
110
|
|
|
110
|
-
Reúne a evidência (`E-chain`, `E-timeline`, `E-company-<slug>`) e valida o seu `draft` (seções + claims; cada `evidenceIds` deve referenciar evidência registrada) ou constrói o rascunho mecânico (métricas com fonte e entradas recentes viram claims). Rota do motor: diretório selado + `sealHash` + veredictos por claim. Rota integrada: Markdown versionado + manifesto, claims honestamente marcados `unverified`. Emite `industry-research/report`.
|
|
111
|
+
Reúne a evidência (`E-chain`, `E-timeline`, `E-company-<slug>`), verifica os artefatos lidos contra `versions.jsonl` (hash divergente falha em voz alta) e valida o seu `draft` (seções + claims; cada `evidenceIds` deve referenciar evidência registrada) ou constrói o rascunho mecânico (métricas com fonte e entradas recentes viram claims, agrupadas por `evidenceCategory`). Um contrato de entrega determinístico roda antes de produzir e falha em voz alta ante blocos faltantes, marcadores de posição ou asserções sem fonte/data. Uma verificação adversária determinística sempre roda, e um job de revisão vermelho (`red-review-note.md`) é lançado quando `ctx.jobs` está montado (senão `review: skipped(jobs unavailable)`). Rota do motor: diretório selado + `sealHash` + veredictos por claim. Rota integrada: Markdown versionado + manifesto, claims honestamente marcados `unverified`. Emite `industry-research/report`.
|
|
111
112
|
|
|
112
113
|
## Skills
|
|
113
114
|
|
|
@@ -119,7 +120,11 @@ Ambas carregam sob demanda pela ferramenta padrão `skill` (`加载 industry-res
|
|
|
119
120
|
## Data layout
|
|
120
121
|
|
|
121
122
|
```
|
|
123
|
+
<workspace>/<industryRoot>/versions.jsonl registro de versões (SHA-256 + timestamp + mudança)
|
|
124
|
+
<workspace>/<industryRoot>/<indústria>/research-state.json memória de estado de pesquisa
|
|
125
|
+
<workspace>/<industryRoot>/<indústria>/red-review-note.md industry_report (revisão vermelha, jobs)
|
|
122
126
|
<workspace>/<industryRoot>/<indústria>/chain.json industry_map
|
|
127
|
+
<workspace>/<industryRoot>/<indústria>/chain.svg industry_map (renderSvg: true)
|
|
123
128
|
<workspace>/<industryRoot>/<indústria>/timeline.jsonl industry_track
|
|
124
129
|
<workspace>/<industryRoot>/<indústria>/sources.json registro de fontes citáveis (S1, S2, …)
|
|
125
130
|
<workspace>/<industryRoot>/<indústria>/notes/ notas-semente
|
package/README.zh.md
CHANGED
|
@@ -90,24 +90,25 @@ dsh plugin --profile demo remove dsh-industry-research # 卸载
|
|
|
90
90
|
| `track.maxFetchesPerCall` | `10` | 每次 `industry_track` 调用的快照抓取预算。 |
|
|
91
91
|
| `scan.maxFileBytes` | `1048576` | 公司数据文件的单文件读取上限(字节)。 |
|
|
92
92
|
| `scan.maxFigureCandidates` | `100` | 每次公司扫描的数字候选行预算。 |
|
|
93
|
+
| `scan.strictTicker` | `true` | 公司卡 ticker 必须匹配内置格式(A 股 6 位数字、美股 1–5 字母、港股 1–5 数字);`false` 豁免格式校验。 |
|
|
93
94
|
|
|
94
95
|
## Tools & surfaces
|
|
95
96
|
|
|
96
|
-
### `industry_map({ industry, seed?, seedFiles?, web?, chain? })`
|
|
97
|
+
### `industry_map({ industry, seed?, seedFiles?, web?, chain?, renderSvg?, depth? })`
|
|
97
98
|
|
|
98
|
-
带 `chain` 调用:校验(悬空边、无来源数值、非法 tier、重复 id
|
|
99
|
+
带 `chain` 调用:校验(悬空边、无来源数值、非法 tier、重复 id、status/statusAsOf、未知 `taxonomyCode`——带完整问题清单响亮失败)并落盘 `chain.json`,随后列出显式缺口槽位与瓶颈节点。不带 `chain` 调用:返回当前图、已登记来源与可选 `ctx.web` 产业链结构摘要,供模型迭代。`renderSvg: true` 时另写确定性的 `chain.svg`。`depth`(quick/standard/comprehensive)调节 web 辅助检索规模。返回与上次 `research-state.json` 相比的 `delta` 摘要。发出 `industry-research/map` 事件。
|
|
99
100
|
|
|
100
|
-
### `industry_track({ industry, topics?, since? })`
|
|
101
|
+
### `industry_track({ industry, topics?, since?, depth?, evidenceCategory? })`
|
|
101
102
|
|
|
102
|
-
经 `ctx.web` 逐主题检索,按白/黑名单与 `since` 过滤,在调用预算内抓取页面快照(SHA-256),合并进 `timeline.jsonl`(按规范化 URL
|
|
103
|
+
经 `ctx.web` 逐主题检索,按白/黑名单与 `since` 过滤,在调用预算内抓取页面快照(SHA-256),合并进 `timeline.jsonl`(按规范化 URL 去重,保留上限)。`depth` 调节来源/抓取预算;`evidenceCategory` 为本批条目打分类标签并按六类枚举校验。快照失败的来源以纯引用条目保留并在 `note` 中说明原因。返回与上次 `research-state.json` 相比的 `delta` 摘要。`ctx.web` 未挂载或 `offline: true` 时响亮失败并指明缺失能力。发出 `industry-research/track` 事件。
|
|
103
104
|
|
|
104
|
-
### `company_scan({ name, dataFiles?, web? })`
|
|
105
|
+
### `company_scan({ name | companies, dataFiles?, web?, status?, statusAsOf?, ticker?, metrics?, depth?, parallel? })`
|
|
105
106
|
|
|
106
|
-
读取工作区数据文件(`.md/.txt/.csv/.tsv/.json`;v1 不解析 PDF),计算哈希,提取 Markdown 大纲与数字候选行,可选附加 `ctx.web`
|
|
107
|
+
读取工作区数据文件(`.md/.txt/.csv/.tsv/.json`;v1 不解析 PDF),计算哈希,提取 Markdown 大纲与数字候选行,可选附加 `ctx.web` 引用,落盘速览卡。`status` 必须带非未来 `statusAsOf`;`ticker` 必须匹配内置格式(除非 `scan.strictTicker: false`);每条 `metrics` 数值必须带 `source` + `asOf`。`companies`(批量)单公司失败不中断整批;`parallel: true` 且挂载 `ctx.jobs` 时按公司 fan-out 为独立 job(否则回退顺序路径并在结果 `mode` 注明)。未采纳文件带原因返回;卡片无法确立的内容一律写入显式缺口。
|
|
107
108
|
|
|
108
109
|
### `industry_report({ industry, sections?, companies?, draft? })`
|
|
109
110
|
|
|
110
|
-
组装证据(`E-chain`、`E-timeline`、`E-company-<slug
|
|
111
|
+
组装证据(`E-chain`、`E-timeline`、`E-company-<slug>`),读取时对照 `versions.jsonl` 校验哈希(不一致响亮失败),或校验你提供的 `draft`(章节 + claims;每条 claim 的 `evidenceIds` 必须引用已登记证据),或机械自动生成草稿(有来源的指标与近期时间线条目生成 claims,按 `evidenceCategory` 分组)。产出前跑确定性交付契约校验(缺区块/占位符/无来源或无日期断言即响亮失败)。确定性对抗机器检查始终执行;挂载 `ctx.jobs` 时派生红方审阅 job 写回 `red-review-note.md`(否则 `review: skipped(jobs unavailable)`)。引擎路径:封存目录 + `sealHash` + 逐 claim 结论。降级路径:版本化 Markdown + manifest,claims 如实标记 `unverified`。发出 `industry-research/report` 事件。
|
|
111
112
|
|
|
112
113
|
## Skills
|
|
113
114
|
|
|
@@ -119,10 +120,14 @@ dsh plugin --profile demo remove dsh-industry-research # 卸载
|
|
|
119
120
|
## Data layout
|
|
120
121
|
|
|
121
122
|
```
|
|
123
|
+
<工作区>/<industryRoot>/versions.jsonl 工件版本清单(SHA-256 + 时间戳 + 变更类型)
|
|
124
|
+
<工作区>/<industryRoot>/<行业>/research-state.json 研究状态记忆
|
|
122
125
|
<工作区>/<industryRoot>/<行业>/chain.json industry_map
|
|
126
|
+
<工作区>/<industryRoot>/<行业>/chain.svg industry_map(renderSvg: true)
|
|
123
127
|
<工作区>/<industryRoot>/<行业>/timeline.jsonl industry_track
|
|
124
128
|
<工作区>/<industryRoot>/<行业>/sources.json 可引用来源登记(S1、S2……)
|
|
125
129
|
<工作区>/<industryRoot>/<行业>/notes/ 种子笔记
|
|
130
|
+
<工作区>/<industryRoot>/<行业>/red-review-note.md industry_report(红方审阅,需 jobs)
|
|
126
131
|
<工作区>/<industryRoot>/<行业>/reports/<ts>/ industry_report(report.md + manifest.json)
|
|
127
132
|
<工作区>/<industryRoot>/companies/<公司>/card.* company_scan
|
|
128
133
|
```
|
package/cordis.patch.yml
CHANGED
|
@@ -42,3 +42,7 @@
|
|
|
42
42
|
maxFileBytes: 1048576
|
|
43
43
|
# Maximum figure-candidate lines surfaced per company scan.
|
|
44
44
|
maxFigureCandidates: 100
|
|
45
|
+
# When true, company-card tickers must match a built-in format
|
|
46
|
+
# (A-share 6 digits, US 1-5 letters, HK 1-5 digits); false exempts
|
|
47
|
+
# the format check.
|
|
48
|
+
strictTicker: true
|