Request:
- Update the hk-ipo-analyst skill so generated reports add a Chinese-name column after the stock code.
- Avoid using English company names as the report display label.
Changes:
- Added Report Name Display Rules to the analyst skill.
- Required IPO tables to keep the ticker/code column separate and add a dedicated 中文名 column immediately after it.
- Required official archived Chinese names or stock short names, with hk-ipo-archivist backfill or data_gap instead of substituting English names.
Verification:
- Ran python3 /root/.codex/skills/.system/skill-creator/scripts/quick_validate.py .agents/skills/hk-ipo-analyst.
- Ran git diff --check and git diff --cached --check.
Next useful context:
- This applies to actionable rankings, fundamentals tables, closed/waiting lists, A/H overlays, recent 30-day reviews, and generated single-ticker reports.
Request:
- Regenerate the latest HK IPO candidate report.
- Include current IPO candidate refresh, updated subscription heat, A/H dual-listed pricing analysis for 03661 and 01688, and T2 grey-market review context.
Changes:
- Refreshed HKEX current-listing, VBKR/Jieli T0.95 heat, ipohk external history, sync-state, and analysis-model snapshots as of 2026-06-23T08:53:26Z.
- Archived raw Yahoo chart evidence for 300661.SZ, 002600.SZ, and HKD/CNY so the A/H discount overlay has a reproducible local source.
- Regenerated reports/2026-06-23_latest_ipo_candidates_analysis.md and mirrored it to reports/README.md.
- Added the generated model v0 report from the rebuilt analysis dataset.
- Marked T2 grey-market evidence quality explicitly: ipohk grey-market returns are Tier 3 historical summaries, while newer June IPOs remain data_gap.
Verification:
- Confirmed reports/README.md matches the dated latest report with cmp.
- Ran git diff --check and git diff --cached --check.
- Verified all repo-relative paths referenced by the latest report exist.
- Verified source_refs paths are repo-relative, existing, and hash-matching.
- Recomputed A/H overlay values from archived raw JSON: 03661 discount about 46.2%, 01688 discount about 45.1%.
Next useful context:
- The 2026-06-23T08:53:26Z heat snapshot leaves the same 8 currently actionable candidates as the 07:00 refresh, with small heat updates.
- 02335 and 06106 still have no official T1 demand rows in the project archive.
- A/H discounts are valuation anchors, not direct arbitrage, because the A and H shares are not fungible.
Request:
- Add T2_grey_market prices to the hk-ipo-analyst review logic.
- Analyze and document credible grey-market data sources inside the skill.
Changes:
- Added T2 grey-market source-quality reviews to the analyst skill description.
- Required latest candidate and recent-listing reviews to include T2 grey-market context when reliable archived evidence exists.
- Added a T2 Grey-Market Review Overlay section with required fields, source tiers, and data-gap guardrails.
- Updated review-card requirements to include T2 grey-market price/return or an explicit data_gap.
Verification:
- Ran python3 /root/.codex/skills/.system/skill-creator/scripts/quick_validate.py .agents/skills/hk-ipo-analyst.
- Ran git diff --cached --check.
- Confirmed Codex CLI parses in this repo with codex --search -s danger-full-access -a never exec -C /root/projects/hk-ipo --help.
Next useful context:
- Tier 1 is executable broker/account evidence; Tier 2 is reproducible public broker quote pages; Tier 3 is attributed aggregators/history datasets; Tier 4 is weak news/community color.
- Do not scrape or redistribute proprietary grey-market feeds without an approved source strategy, and do not infer T2 from D1.
Request:
- Make the HK IPO analyst skill explicitly call out candidates that already have Mainland A shares, such as 03661 and 01688.
- Require special treatment because A/H dual-listed IPOs have a different pricing setup from pure first-time HK IPOs.
Changes:
- Added A/H dual-listed valuation overlays to the hk-ipo-analyst skill description.
- Added a Latest Candidate Report guardrail requiring broad reports to include the A/H overlay whenever current or recently closed candidates have A shares or another onshore listed class.
- Added an A/H Dual-Listed IPO Overlay section covering detection cues, required A-share/H-share valuation fields, fungibility guardrails, and short-exit interpretation.
Verification:
- Ran python3 /root/.codex/skills/.system/skill-creator/scripts/quick_validate.py .agents/skills/hk-ipo-analyst.
- Ran git diff --cached --check.
- Confirmed Codex CLI parses in this repo with codex --search -s danger-full-access -a never exec -C /root/projects/hk-ipo --help.
Next useful context:
- 03661 SG Micro is tied to 300661.SZ and 01688 Lingyi iTech is tied to 002600.SZ.
- The overlay should distinguish valuation support from trading demand because A shares and H shares are generally not fungible.
Request:
- Run the scheduled hk-ipo-analyst refresh as of 2026-06-23T07:00:25Z.
- Refresh the latest IPO candidate universe and online facts through the archivist before analysis.
- Rebuild the analysis dataset and publish the latest broad candidate report in Simplified Chinese.
Changes:
- Archived the HKEX current new-listing page for 2026-06-23 and added the new 00668 prospectus plus extracted text.
- Archived a fresh VBKR/Jieli T0.95 market-heat snapshot with 8 still-actionable rows while leaving same-day closed names out of the live T0.95 set.
- Archived 06067 and 06132 D1 price-performance responses, refreshed ipohk external history, and archived the 06067 2026-06-23 allotment-results clarification PDF.
- Rebuilt data/snapshots/analysis_model_v0_dataset.csv after the archive refresh.
- Wrote reports/2026-06-23_latest_ipo_candidates_analysis.md and mirrored the same content to reports/README.md.
Verification:
- Ran archive_hkex_current_new_listings.py, archive_hkex_documents.py, backfill_t1_demand_from_text.py, archive_t0_5_market_heat.py, archive_price_performance.py, archive_ipohk_history.py, extract_pdf_text.py, update_sync_state.py, and build_analysis_dataset.py with as-of 2026-06-23T07:00:25Z.
- Confirmed reports/README.md matches the dated report with cmp.
- Ran git diff --check and git diff --cached --check.
- Checked source_refs paths are repo-relative, existing, and hash-matching.
- Checked the latest 8 T0.95 live heat rows remain separate from official T1 demand rows.
Next useful context:
- As of 2026-06-23T07:00:25Z, 02335 and 06106 still have no archived official T1 demand rows and remain T1 data_gap names.
- 06067 D1 was positive at about +30.0%, while 06132 D1 was negative at about -49.6%, reinforcing the 18A-B risk guardrail.
- The 2026-06-23 HKEX current page shows 00668 as a new live candidate; its first VBKR/Jieli heat snapshot was only 0.32x.
Request:
- Run the scheduled hk-ipo-analyst refresh as of 2026-06-22T23:00:18Z.
- Refresh the IPO candidate universe and latest online facts through the archivist before analysis.
- Rebuild the analysis dataset and publish the latest broad candidate report in Simplified Chinese.
Changes:
- Re-archived the HKEX current new-listing page at the requested as-of time and refreshed sync state.
- Archived a fresh VBKR/Jieli T0.95 market-heat snapshot for the 13 actionable candidates while keeping unofficial heat in ipo_market_heat.
- Refreshed ipohk external history, reran official HKEX document/T1 demand and price-performance refreshes, and rebuilt analysis_model_v0_dataset.csv.
- Rewrote reports/2026-06-22_latest_ipo_candidates_analysis.md for the 23:00Z snapshot and mirrored it to reports/README.md.
Verification:
- Ran archive_hkex_current_new_listings.py, archive_hkex_documents.py, backfill_t1_demand_from_text.py, archive_t0_5_market_heat.py, archive_price_performance.py, archive_ipohk_history.py, and build_analysis_dataset.py with as-of 2026-06-22T23:00:18Z.
- Confirmed reports/README.md matches the dated report with cmp.
- Ran git diff --check and git diff --cached --check.
- Checked source_refs paths are repo-relative, existing, and hash-matching.
- Checked the latest 13 T0.95 live heat rows remain separate from official T1 demand rows.
Next useful context:
- The 23:00Z VBKR/Jieli heat values matched the prior 15:47Z values for the 13 active candidates.
- No new official T1 rows were available for 06106 or 02335 as of 2026-06-22T23:00:18Z; keep them as T1 data_gap names.
- Yahoo price refresh wrote no new internal D1 rows; 00901 remains an internal D1 data_gap.
Request:
- Run the scheduled hk-ipo-analyst refresh as of 2026-06-22T15:47:32Z.
- Refresh the IPO candidate universe and network facts through the archivist before analysis.
- Rebuild the analysis dataset and publish the latest broad candidate report in Simplified Chinese.
Changes:
- Archived the HKEX current new-listing page, new official allotment-result PDFs for 06067 and 06132, extracted text, a fresh VBKR/Jieli T0.95 market-heat snapshot, ipohk external history, and recent Yahoo price-performance responses.
- Updated structured SQLite facts and CSV snapshots, including official T1 demand for 06067 and 06132 while keeping live subscription heat in ipo_market_heat.
- Rebuilt data/snapshots/analysis_model_v0_dataset.csv after the archive refresh.
- Rewrote reports/2026-06-22_latest_ipo_candidates_analysis.md and mirrored the same content to reports/README.md.
Verification:
- Ran archive_hkex_current_new_listings.py, archive_hkex_documents.py, backfill_t1_demand_from_text.py, archive_t0_5_market_heat.py, archive_price_performance.py, archive_ipohk_history.py, and build_analysis_dataset.py with as-of 2026-06-22T15:47:32Z.
- Confirmed reports/README.md matches the dated report with cmp.
- Ran git diff --check and git diff --cached --check.
- Checked source_refs paths are repo-relative and existing.
- Checked the latest 13 T0.95 live heat rows remain separate from official T1 demand rows.
Next useful context:
- 06067 and 06132 now have official T1 demand in the archive; 06106 and 02335 remain T1 data_gap names as of this run.
- The 15:47Z VBKR/Jieli live heat values matched the earlier 13:57Z values for active candidates.
- Price refresh still has provider gaps for some historical tickers, including internal D1 price data for 00901.
Request:
- Fix Codex v0.139.0 failing to load the project-local HK IPO skills with invalid YAML errors.
Changes:
- Converted the three HK IPO skill frontmatter descriptions to YAML folded block scalars.
- Preserved the existing description text and skill bodies.
- Left unrelated IPO archive/report refresh files unstaged.
Verification:
- Ran git diff --cached --check.
- Confirmed Codex CLI parses with 'codex --search -s danger-full-access -a never exec -C /root/projects/hk-ipo --help'.
- Ran a short Codex smoke test that returned OK without the prior invalid YAML errors.
Next useful context:
- Codex CLI v0.139.0 is the installed CLI package version, not the model version.
- The prior YAML failed because unquoted descriptions contained ': ' such as 'project: T0/T1/T2', which strict YAML treats as a mapping separator.
Request:
- Fix hk-ipo-analyst.service failing with 'unexpected argument -a' when the scheduled runner invokes Codex.
Changes:
- Moved Codex global options before the exec subcommand in scripts/run_hk_ipo_analyst_once.sh.
- Kept the existing scheduled prompt and systemd units unchanged.
- Reset the failed hk-ipo-analyst.service state after the previous invalid-argument failure.
Verification:
- Ran bash -n scripts/run_hk_ipo_analyst_once.sh.
- Ran git diff --cached --check.
- Confirmed 'codex --search -s danger-full-access -a never exec -C /root/projects/hk-ipo --help' parses successfully.
- Ran systemd-analyze verify for the service and timer; only unrelated system xfs unit warnings were reported.
Next useful context:
- I did not start hk-ipo-analyst.service after this fix to avoid triggering a full analyst refresh outside the timer window.
Request:
- Make each scheduled analyst run refresh the latest IPO universe and all report-relevant online facts, especially subscription/margin multiples.
- Mirror the latest dated IPO candidate report to reports/README.md.
- Add this latest-report behavior to the hk-ipo-analyst skill instructions.
Changes:
- Expanded the scheduled analyst runner prompt to require online candidate refresh, market-heat/subscription-multiple refresh, official T1 updates when available, complete latest report regeneration, and reports/README.md mirroring.
- Added a Latest Candidate Report Refresh section to hk-ipo-analyst documenting the refresh flow, stage-safe market-heat handling, official T1 boundaries, and README mirror contract.
- Added reports/README.md as a copy of the current latest dated candidate report.
Verification:
- Ran bash -n scripts/run_hk_ipo_analyst_once.sh.
- Ran git diff --check and git diff --cached --check.
- Confirmed reports/README.md matches reports/2026-06-22_latest_ipo_candidates_analysis.md with cmp.
- Confirmed hk-ipo-analyst.timer still points to 2026-06-22 23:00:00 UTC as the next run.
Next useful context:
- reports/README.md is intentionally overwriteable on each latest candidate refresh; dated reports remain the historical copies.
- Unofficial subscription multiples should stay in ipo_market_heat and not be copied into official T1 demand fields.
Request:
- Install systemd-based scheduling for the hk-ipo-analyst automation to run three times per day without overlapping executions.
Changes:
- Added an executable wrapper script that resolves the repository root, acquires a non-blocking flock lock, builds a scheduled analyst prompt, and invokes codex exec with the hk-ipo-analyst skill.
- The installed systemd service and timer live under /etc/systemd/system and are not part of this repository commit.
Verification:
- Ran bash -n scripts/run_hk_ipo_analyst_once.sh.
- Ran git diff --cached --check.
- Ran systemd-analyze verify for hk-ipo-analyst.service and hk-ipo-analyst.timer; only unrelated xfs unit deprecation warnings were reported.
- Enabled hk-ipo-analyst.timer and confirmed the next trigger is 2026-06-22 23:00:00 UTC.
Next useful context:
- The timer schedule is explicit UTC: 07:00, 15:00, and 23:00 UTC daily.
- The wrapper exits successfully without starting a second run when another analyst process holds /run/hk-ipo/analyst.lock.
Request:
- Add missing agents/openai.yaml metadata for the hk-ipo-audit skill.
Changes:
- Added UI-facing display name, short description, and default prompt for hk-ipo-audit.
- Enabled implicit invocation to match the analyst and archivist skills.
Verification:
- Ran git diff --check and git diff --cached --check.
- Confirmed the new openai.yaml content matches the existing project skill metadata style.
Next useful context:
- The prior local commit that moved skills from .codex to .agents was already ahead of origin before this change.
Request:
- Rename the corresponding skill folders to match the hk-ipo-* skill names.
Changes:
- Renamed .codex/skills/analyst to .codex/skills/hk-ipo-analyst.
- Renamed .codex/skills/archivist to .codex/skills/hk-ipo-archivist.
- Renamed .codex/skills/audit to .codex/skills/hk-ipo-audit.
- Updated the remaining repo path reference to the audit skill.
Verification:
- Ran git diff --check and git diff --cached --check.
- Validated .codex/skills contains exactly hk-ipo-analyst, hk-ipo-archivist, and hk-ipo-audit.
- Confirmed each SKILL.md frontmatter name matches its directory name.
- Confirmed current repo docs/skills have no old .codex/skills/analyst, archivist, or audit path references.
Request:
- Prefix the three selected project-local skill names with hk-ipo-.
Changes:
- Renamed skill metadata to hk-ipo-analyst, hk-ipo-archivist, and hk-ipo-audit.
- Updated skill-to-skill routing references to use the new names.
- Updated existing OpenAI skill UI metadata/default prompts for analyst and archivist.
- Updated README skill names and documented the audit skill.
Verification:
- Ran git diff --check and git diff --cached --check.
- Validated all local SKILL.md frontmatter names contain hk-ipo-.
- Confirmed README and current skill metadata have no old $analyst/$archivist/$audit invocations; old names remain only in historical reports.
Request:
- Put the actionable scoring/ranking first in the latest IPO candidate report.
- Then show fundamentals, break-risk/risk-reward, per-IPO notes, and finally the 30-day listed IPO review.
- Solidify this report order in the analyst skill.
Changes:
- Moved the current candidate ranking table to the first body section of the June 22 report.
- Moved the 30-day IPO review after per-IPO notes and waiting names.
- Added a Broad Candidate Report Layout section to the analyst skill so future broad candidate reports follow the same action-first order.
Verification:
- Ran git diff --check.
- Confirmed report heading order with rg: ranking, fundamentals, break-risk, per-IPO notes, waiting names, 30-day review, guardrails, sources.
Request:
- Add a recent one-month listed IPO review to the latest candidate report.
- Make this review a standing analyst skill requirement for future broad IPO candidate reports.
Changes:
- Added a 2026-05-22 to 2026-06-22 IPO review table covering structure, fundamentals, T1 allotment demand, D1 performance, and PM lessons.
- Mapped recent T1/D1 outcomes back to the current candidate batch and flagged the 00901 D1 price data gap.
- Added a Recent Listing Review Overlay section to the project analyst skill.
Verification:
- Ran git diff --check.
- Recomputed the recent review sample from analysis_model_v0_dataset.csv: 11 IPOs, 10 D1 observations, 9 nonnegative D1 returns, 1 negative D1 return, average D1 return 91.2%.
Request:
- Update the current HK IPO candidates after subscription multiples changed again.
- Refresh the candidate ranking and defensive risk/reward view.
Changes:
- Archived the 2026-06-22T13:57:38Z VBKR/Jieli T0.95 market-heat snapshot.
- Re-archived the HKEX current new-listing page and rebuilt snapshots/model dataset.
- Updated the June 22 candidates report with the latest heat multiples, ranking, execution guidance, and defensive score table.
- Refreshed the model report analysis timestamp.
Verification:
- Ran git diff --check and git diff --cached --check.
- Confirmed SQLite PRAGMA integrity_check = ok.
- Parsed changed CSV snapshots and confirmed 13 latest T0_95_final_heat rows.
- Checked the current candidate ranking against data/snapshots/analysis_model_v0_dataset.csv.
Request:
- Analyze the current HK IPO batch from break probability, capital efficiency, and risk/reward.
- Test whether names such as 01688 deserve a higher defensive ranking than their heat score implies.
Changes:
- Added rules/ipo_break_risk_reward_v0.yaml as an experimental defensive overlay.
- Split the new framework into break protection, capital efficiency, and upside optionality.
- Added historical break-rate calibration anchors from analysis_model_v0_dataset.csv.
- Updated the 2026-06-22 IPO report with a defensive risk/reward ranking and dual execution guidance.
- Logged the rule change and its caveats.
Verification:
- Ran git diff --check and git diff --cached --check.
- Parsed the new YAML file with PyYAML.
- Recomputed key historical break-rate anchors from the current model dataset.
Request:
- Compare fundamentals for 01688 and 01956 against the current HK IPO candidate batch.
- Add the comparison to the 2026-06-22 IPO report.
Changes:
- Added a fundamentals section explaining 01688 as a mature cash-generative manufacturing platform.
- Added a fundamentals section explaining 01956 as a high-growth AI services IPO that remains loss-making.
- Added a 13-company comparison table and clarified how fundamentals should affect the heat-adjusted subscription ranking.
Verification:
- Ran git diff --check for Markdown formatting and whitespace.
Request:
- Update the latest Hong Kong IPO candidate list and rescore it based on subscription multiples.
Changes:
- Archived the 2026-06-22 HKEX Main Board New Listing Information page, adding 02697, 03952, 06715, and 06915 to the current candidate set.
- Archived and extracted the four new prospectuses, refreshed current HKEX document facts, and rebuilt the v0 analysis dataset to 311 rows.
- Archived a 2026-06-22T08:55:00Z VBKR/Jieli market-heat snapshot and wrote only still-actionable T0.95 rows to avoid look-ahead leakage for already-closed IPOs.
- Improved prospectus date parsing for split weekday/month text, glued noon/commence phrases, and current new-listing expected listing-date updates.
- Added a Chinese 2026-06-22 latest IPO report ranking candidates after the subscription-multiple overlay.
Verification:
- Ran py_compile for archive_hkex_documents.py, archive_t0_5_market_heat.py, archive_hkex_current_new_listings.py, and build_analysis_dataset.py.
- Re-ran HKEX current-page seeding, document archiving, market-heat archiving, and analysis dataset build as of 2026-06-22T08:55:00Z.
- Ran git diff --check and git diff --cached --check.
- Ran SQLite integrity_check and foreign_key_check.
- Verified source_refs paths, file existence, and SHA-256 hashes.
Next useful context:
- 01956 is the only current candidate with both strong T0 structure and >100x actionable heat in this snapshot.
- Recheck 03952 and 06715 near the 2026-06-25 cutoff; their structure is strong but 2026-06-22 heat is below 10x.
- Official T1 allotment facts for 06067 and 06132 were still unavailable at this archive timestamp.
Request:
- Use the analyst workflow to analyze the latest Hong Kong IPOs, connect their source data, and produce a current report.
Changes:
- Added a current HKEX New Listing Information page seeder that archives the official page, seeds visible tickers, and records source_refs.
- Archived current HKEX prospectus and allotment-result sources for the 16 visible Main Board candidates and extracted their text.
- Extended prospectus parsing for offer price, derived gross proceeds, HDR offerings, and listing-date text extracted with split characters.
- Rebuilt the analysis dataset and added a Chinese 2026-06-21 latest IPO report separating live T0 watchlist names from past-cutoff T1/D1 candidates.
Verification:
- Ran py_compile for update_recent_ipo_list.py, archive_hkex_current_new_listings.py, archive_hkex_documents.py, and build_analysis_dataset.py.
- Re-ran HKEX current page seeding, document archiving, and analysis dataset build as of 2026-06-21T08:44:59Z.
- Ran git diff --check and git diff --cached --check.
- Ran SQLite integrity_check and foreign_key_check.
- Verified source_refs paths, file existence, SHA-256 hashes, and report source paths.
Next useful context:
- Capture T0.95 market heat before the 2026-06-23 and 2026-06-24 order cutoffs before converting the new watchlist into execution calls.
- Treat 02667 as a stale/special HKEX page item until a fresh June timetable or official result appears.
Request:
- Refresh today's HK IPO analyst view for the current candidate set.
Changes:
- Refreshed the 2026 HKEX new-listing report archive and synchronized source hashes across 2026 report-backed rows.
- Re-ran HKEX document archiving for 01392, 06067, 06132, 02335, and 06106; no official T1 allotment facts were available at 2026-06-18T08:16:33Z.
- Rebuilt the v0 analysis dataset and model report as of 2026-06-18T08:16:33Z.
- Added a Chinese 2026-06-18 cross-candidate analysis update that treats 06106/02335 as past standard subscription cutoff, flags 01392 for a post-23:00 HKT T1 refresh, and lists newly visible HKEX page tickers as pending archivist work.
Verification:
- Ran scripts/update_recent_ipo_list.py for 2026-01-01 through 2026-06-18.
- Ran scripts/archive_hkex_documents.py for 01392,06067,06132,02335,06106.
- Ran scripts/build_analysis_dataset.py as of 2026-06-18T08:16:33Z.
- Ran git diff --check and git diff --cached --check.
- Ran py_compile for the touched workflow scripts.
- Ran SQLite integrity_check and foreign_key_check.
- Verified durable report paths exist and source_refs have no missing paths or hash mismatches.
Next useful context:
- Re-run archivist after 2026-06-18T15:00:00Z to capture 01392 allotment results if published.
- Add a seed/archive path for current HKEX New Listing Information page candidates before scoring 02672, 01191, 09637, 09630, 06228, 03661, 01956, 02272, 01688, and 02667.
Request:
- Use the project analyst workflow to analyze the latest upcoming Hong Kong IPO candidates.
Changes:
- Refreshed recent HK IPO target coverage through 2026-06-17 and archived current HKEX source updates.
- Archived 06675 allotment results and D1 Yahoo price performance for boundary-case review.
- Archived a 2026-06-17 T0.5 VBKR/Jieli market-heat snapshot for still-actionable 02335 and 06106.
- Rebuilt the v0 analysis dataset and snapshots at 2026-06-17T08:20:00Z.
- Added a Chinese horizontal analyst report ranking 06106, 02335, 06132, 06067, 01392, with 06675 separated as a T1/D1 review sample.
Verification:
- Ran SQLite PRAGMA integrity_check and foreign_key_check.
- Ran git diff --check and git diff --cached --check.
- Confirmed report source paths exist.
Next useful context:
- 06106 is the top still-actionable T0.5 candidate at this as-of time.
- 02335 needs another pre-deadline heat sample before a stronger call.
- 01392, 06067, and 06132 are now mainly waiting for T1 official allotment results.
Request:
- Reflect that near-final market heat can be used when the user can still place an IPO order at T0.95.
Changes:
- Added T0_95_final_heat as a separate analyst decision stage with executability and no-leakage rules.
- Added an experimental T0.95 rule overlay for late-order heat scoring and calibration discipline.
- Updated archivist guidance and the market-heat archiver so snapshots can be explicitly stored as T0_95_final_heat.
- Added market_heat_stage to the analysis dataset and refreshed the model report to show T0.95 coverage separately.
Verification:
- Ran py_compile for the modified scripts.
- Checked archive_t0_5_market_heat.py --help for the new --stage option.
- Rebuilt data/snapshots/analysis_model_v0_dataset.csv and reports/2026-06-15_analysis_model_v0.md.
- Ran git diff --check.
Next useful context:
- Current archived heat rows remain T0_5_market_heat only; there are no true T0.95 rows yet.
- external_ipo_history.public_oversubscription_times is still calibration-only unless a comparable value is archived before the executable order cutoff.
Request:
- Summarize recent three-year HK IPO T0.5 coverage and statistics.
Changes:
- Added a Chinese Markdown report that separates true subscription-period T0.5 snapshots from external final public oversubscription history.
- Reported current true T0.5 coverage, active future T0.5 rows, final heat proxy buckets, and top recent high-heat IPOs.
- Documented model implications for short T2/D1 exits and future T0.5 sampling.
Verification:
- Ran git diff --check.
- Reconciled counts against data/hk_ipo.sqlite with read-only SQLite queries.
Next useful context:
- True historical T0.5 coverage is currently zero for listed IPOs in 2023-06-15 to 2026-06-15 because T0.5 snapshots only started on 2026-06-15.
- external_ipo_history.public_oversubscription_times is a post-hoc heat proxy, not an original T0.5 input.
Request:
- Add historical data around T0.5 margin heat and rebuild the model.
Changes:
- Add external_ipo_history to store third-party historical IPO records separately from true T0.5 market-heat snapshots.
- Add scripts/archive_ipohk_history.py to archive ipohk structured listed IPO history.
- Archive 807 ipohk rows, including final oversubscription, one-lot win rate, grey-market return, and first-day return where available.
- Extend the v0 analysis dataset with true T0.5 market-heat columns and separate external final-heat columns.
- Rebuild reports/2026-06-15_analysis_model_v0.md with T0.5 coverage and external final-heat calibration.
- Add a Chinese report explaining why historical final oversubscription cannot be treated as T0.5 margin snapshots.
- Update analyst and archivist skills to keep T0.5 and external final history separate.
Verification:
- .venv/bin/python -m py_compile scripts/build_analysis_dataset.py scripts/archive_ipohk_history.py scripts/archive_t0_5_market_heat.py
- .venv/bin/python scripts/build_analysis_dataset.py --as-of 2026-06-15T19:20:00Z
- Python sqlite3 PRAGMA integrity_check returned ok and foreign_key_check returned zero rows.
- Confirmed 807 external_ipo_history rows, 792 rows with external final oversubscription, 5 true T0.5 market-heat rows, and 297 analysis dataset rows.
- git diff --cached --check
Next useful context:
- True T0.5 historical backtesting still requires ongoing frozen margin-heat snapshots during each IPO subscription window.
Request:
- Test whether subscription-period T0.5 market heat data can be captured and incorporated into IPO analysis.
Changes:
- Add an ipo_market_heat table for non-official market-heat snapshots.
- Add a VBKR/Jieli archive script for expected margin subscription multiples.
- Archive the 2026-06-15T18:40:00Z heat snapshot for 01392, 02335, 06067, 06106, and 06132.
- Add an experimental T0.5 overlay rule file and a Chinese cross-IPO trial report.
- Update archivist and analyst skills so T0.5 remains separate from official T1 allotment demand.
Verification:
- .venv/bin/python -m py_compile scripts/archive_t0_5_market_heat.py scripts/build_analysis_dataset.py scripts/update_sync_state.py
- Python sqlite3 PRAGMA integrity_check returned ok and foreign_key_check returned zero rows.
- Confirmed 5 ipo_market_heat rows and 5 t0_5_market_heat source_refs for the frozen snapshot.
- git diff --cached --check
Next useful context:
- T0.5 data is non-official and should be resampled during the subscription window, then compared against T1 official allotment results.
Request:
- Combine the currently selected T0 IPO reports into one cross-sectional analysis report.
Changes:
- Add a Chinese horizontal T0 report comparing 01392, 02335, 06067, 06106, and 06132.
- Rank the selected IPOs by the current T0 model and short-exit discipline focused on T2/D1 selling.
- Backfill 02335's Chinese company name from its Chinese HKEX prospectus and archive the source PDF plus extracted text.
- Refresh the v0 analysis dataset and sync-state snapshots at 2026-06-15T18:20:00Z.
Verification:
- .venv/bin/python -m py_compile scripts/build_analysis_dataset.py scripts/generate_ipo_report.py scripts/extract_pdf_text.py scripts/update_sync_state.py
- Python sqlite3 PRAGMA integrity_check returned ok and foreign_key_check returned zero rows.
- Confirmed 02335 Chinese source_ref, extracted text manifest row, and selected horizontal report content.
- git diff --cached --check
Next useful context:
- Untracked PDF exports of individual reports and the horizontal report were left out of this focused commit.
Request:
- Update the selected analyst reports so stock/company names include Chinese names and use Chinese names first.
Changes:
- Updated the selected T0 reports for 01392, 06067, 06106, and 06132 to show Chinese company names in the title and summary, with English names in parentheses.
- Added company_name_zh to the analyst dataset so report generation has access to Chinese names.
- Updated the report generator to prefer Chinese company names and fall back to English names only when Chinese names are unavailable.
- Filled Chinese company names for the selected tickers in ipo_master and refreshed snapshots.
Verification:
- Compiled build_analysis_dataset.py and generate_ipo_report.py.
- Ran generator dry-runs for 06132 and 01392 to confirm Chinese-first output.
- Ran SQLite integrity_check and foreign_key_check.
- Ran git diff --check.
Next useful context:
- Future generated analyst reports now use company_name_zh first when available.
Request:
- Generate an analyst report for HK IPO ticker 02335.
Changes:
- Archived the official HKEXnews 02335 prospectus PDF and extracted text under project-relative data paths.
- Seeded 02335 T0 prospectus facts, source references, sync state, and analysis snapshots.
- Generated reports/2026-06-15_02335_T0_prospectus_analysis.md in Simplified Chinese with concrete T0/T1/T2/D1 dates and short-exit T2/D1 discipline.
- Made PDF text extraction tolerant of invalid Unicode surrogate characters emitted by pypdf.
Verification:
- Compiled archive_hkex_documents.py, generate_ipo_report.py, build_analysis_dataset.py, extract_pdf_text.py, and update_sync_state.py.
- Ran SQLite integrity_check and foreign_key_check.
- Verified the archived 02335 PDF hash, extracted-text manifest row, and analysis dataset row.
- Ran git diff --check.
Next useful context:
- 02335 is currently T0_prospectus; T1_allotment is pending for 2026-06-23.
Request:
- Generate an analyst report for HK IPO ticker 06067.
Changes:
- Archived the official HKEXnews 06067 prospectus PDF and extracted text under project-relative data paths.
- Seeded 06067 T0 prospectus facts, source references, sync state, and analysis snapshots.
- Generated reports/2026-06-15_06067_T0_prospectus_analysis.md in Simplified Chinese with concrete T0/T1/T2/D1 dates and short-exit T2/D1 discipline.
- Updated the HKEX document archiver so over-allotment shares are only recorded when the prospectus supports them, with explicit no-option cases stored as zero.
Verification:
- Compiled archive_hkex_documents.py, generate_ipo_report.py, build_analysis_dataset.py, extract_pdf_text.py, and update_sync_state.py.
- Ran SQLite integrity_check and foreign_key_check.
- Verified the archived 06067 PDF hash, extracted-text manifest row, and analysis dataset row.
- Ran git diff --check.
Next useful context:
- 06067 is currently T0_prospectus; T1_allotment is pending for 2026-06-22.
Request:
- Analyze HK IPO ticker 01392 with the analyst skill.
- Preserve the in-flight 06132 archive/report work already created for the prior request.
Changes:
- Archived official HKEX prospectus PDFs and extracted text for 01392 and 06132.
- Seeded structured T0 facts into the SQLite archive and refreshed CSV snapshots and sync state.
- Rebuilt the v0 analysis dataset and model calibration report.
- Generated Simplified Chinese T0 prospectus-stage analyst reports for 01392 and 06132.
- Adjusted report stage calendars so T2 uses the previous business day before D1 when listing is separated from allocation by a weekend.
Verification:
- Compiled modified Python scripts with in-memory syntax checks.
- Ran SQLite quick_check and foreign_key_check.
- Confirmed DB row counts match CSV snapshots for key tables.
- Verified 01392/06132 source paths are repo-relative, raw files exist, hashes match, and PDF text manifest rows are ok.
- Ran git diff --cached --check.
Next useful context:
- 01392 T1 is due on 2026-06-18; rerun analyst after allotment results are archived.
- 06132 T1 is due on 2026-06-22; rerun analyst after allotment results are archived.
Request:
- Make analyst reports Chinese by default and record the rule in the analyst skill.
Changes:
- Add a Simplified Chinese default-language rule to the analyst skill.
- Update the single-IPO report generator to emit Chinese Markdown sections, labels, actions, risks, triggers, and exit plans.
- Preserve ticker symbols, stage codes, rule ids, score buckets, and source paths as machine-readable identifiers.
- Regenerate the 06106 T0 report in Chinese.
- Document the Chinese report default in README and the rule change log.
Verification:
- Ran py_compile for scripts/generate_ipo_report.py.
- Generated a 06106 dry-run report and checked Chinese section headings.
- Regenerated reports/2026-06-15_06106_T0_prospectus_analysis.md.
- Ran git diff --check.
Next useful context:
- Future analyst prediction and review reports should be written in Simplified Chinese unless the user explicitly requests another language.
Request:
- Include the concrete T0, T1, T2, and D1 dates in every analyst report.
Changes:
- Add a Stage Calendar section to the single-IPO report generator.
- Require analyst reports to include ticker-specific T0 subscription window, T1 allotment-result date, T2 grey-market date/window, and D1 listing date.
- Update the 06106 T0 report with its concrete stage dates.
- Document the requirement in the analyst skill, README, and rule change log.
Verification:
- Ran py_compile for scripts/generate_ipo_report.py.
- Generated a 06106 dry-run report and checked the stage calendar.
- Ran git diff --check.
Next useful context:
- For 06106, T0 is 2026-06-15 to 2026-06-18, T1/T2 is 2026-06-23, and D1 is 2026-06-24.
Request:
- Emphasize that the analyst model is for selling allocated IPO shares in T2 grey market or on D1, not for long-term holding.
Changes:
- Add explicit T2/D1 sell discipline to the analyst skill.
- Update ipo_score_v0 targets and holding policy so D1 sell return is primary and T2 is the intended extension when reliable grey-market data exists.
- Clarify that D5/D20/D60 are review labels only, not planned holding targets.
- Update the model report, single-ticker report generator, README, and the 06106 report language to reflect the short-exit horizon.
Verification:
- Rebuilt the model report with the same dataset timestamp and confirmed the analysis dataset did not change.
- Ran py_compile for build_analysis_dataset.py and generate_ipo_report.py.
- Generated a 06106 dry-run report showing T2/D1 exit discipline.
- Ran git diff --check.
Next useful context:
- T2 is still disabled in v0 until archivist approves a reliable grey-market data source; D1 remains the live modeled sell label.
Request:
- Use the analyst skill to analyze upcoming IPO 06106 and generate a Markdown report.
Changes:
- Add a stage-safe T0_prospectus analyst report for 06106.
- Record the v0 score, calibrated historical probability, key T0 positives, risks, triggers, and source path.
Verification:
- Confirmed 06106 has no structured T1 demand yet, so the report is T0_prospectus.
- Reviewed the report for stage safety and repo-relative source paths.
- Ran git diff --check.
Next useful context:
- Re-run analyst after 06106 allotment results are archived around 2026-06-23 to generate a T1_allotment report.
Request:
- Let the analyst skill generate a Markdown report directly when a new IPO ticker is provided.
Changes:
- Add scripts/generate_ipo_report.py for stage-safe single-ticker reports from the v0 analysis dataset.
- Auto-select T1 reports when structured allotment demand exists and otherwise use T0 prospectus-stage reporting.
- Keep post-listing D1/D5/D20/D60 outcomes out of prediction reports while using historical buckets for calibration.
- Document the workflow in the analyst skill and README.
Verification:
- Ran py_compile for scripts/generate_ipo_report.py.
- Generated stdout dry-run reports for 06106 and 06658.
- Wrote temporary Markdown reports under /tmp for output-path validation.
- Ran git diff --check.
Next useful context:
- Before generating a report for a ticker absent from the analysis dataset, run archivist updates and rebuild scripts/build_analysis_dataset.py.
Request:
- Re-analyze the IPO model using the updated historical archive after T1 demand backfill.
Changes:
- Regenerate the v0 analysis dataset from the current SQLite archive.
- Refresh the v0 calibration report with expanded T1 coverage and new empirical bucket rates.
- Update the report template to show pending T1 rows and field-level blanks.
- Clarify v0 limitations and record why the score formula stays unchanged for this refresh.
Verification:
- Ran scripts/build_analysis_dataset.py against data/hk_ipo.sqlite.
- Ran py_compile for scripts/build_analysis_dataset.py.
- Checked dataset row count, T1 demand coverage, source-only T1 gaps, and repo-relative paths.
- Ran git diff --check.
Next useful context:
- T1 structured coverage is now 291 rows, with 06106 and 06675 still pending_not_due.
- The high-conviction T1 bucket remains differentiated, but middle and low buckets are still not monotonic enough for a v1 rule change.
Request:
- Use archivist to close the 137 T1 ipo_demand source-only gaps using extracted PDF text.
Changes:
- Add an incremental T1 demand text backfill script.
- Parse existing allotment-result extracted text into ipo_demand.
- Archive linked Summary PDFs from old HKEX HTML allotment-result pages.
- Correct allotment-result selection to prefer primary result announcements over clarification or supplemental notices.
- Add robust line-aware allotment parsing and document the workflow in archivist and README.
- Record the backfill result in a report.
Execution:
- Selected 137 source-only T1 demand gaps.
- Wrote 137 ipo_demand rows, increasing ipo_demand from 154 to 291 rows.
- Archived 38 new HKEX allotment-result PDFs and extracted their text.
- Confirmed an incremental rerun selects 0 gaps and writes 0 rows.
Verification:
- Ran git diff --cached --check.
- Ran py_compile for archive_hkex_documents.py and backfill_t1_demand_from_text.py.
- Checked SQLite integrity and foreign keys.
- Confirmed DB row counts match CSV snapshots.
- Verified no T1 complete row is missing ipo_demand.
- Verified source_refs paths/files/hashes and PDF extracted-text manifest hashes.
Next useful context:
- T1 demand structure is complete for listed rows; 06106 and 06675 remain pending_not_due.
- T2 grey-market and due price-performance gaps remain separate archivist priorities.
- Analyst output should be regenerated before using the new T1 demand facts for scoring.
Request:
- Use the audit skill to check historical data completeness and self-correct the audit criteria after the missed PDF extracted-text gap.
Changes:
- Add a mandatory derived-evidence checklist to the audit skill.
- Require broad historical audits to reconcile PDF source_refs, extracted text files, manifest rows, and hashes.
- Add a historical data completeness audit report for the current archive.
Findings:
- Source integrity and PDF extracted-text completeness now pass.
- Full historical completeness still fails due to incomplete structured T1 demand, unresolved T2 grey-market data, open due price-performance tasks, and missing context fields.
Verification:
- Ran SQLite integrity, foreign-key, source hash, snapshot, PDF manifest, extracted-text hash, stage coverage, and analysis-dataset checks.
- Ran scripts/extract_pdf_text.py and confirmed 557 PDF sources were skipped unchanged with 557 manifest rows.
- Ran git diff --check.
Request:
- Add extracted PDF text generation to the archivist workflow as a standard step.
Changes:
- Run PDF text extraction automatically for newly archived HKEX PDF sources.
- Make the PDF text extractor incremental and manifest-preserving.
- Document extracted-text handling in the archivist skill and README.
- Mark generated extracted text as no-diff data evidence.
- Backfill extracted text for all archived PDF source references.
Verification:
- Ran git diff --cached --check.
- Ran .venv/bin/python -m py_compile scripts/extract_pdf_text.py scripts/archive_hkex_documents.py.
- Ran full PDF extraction, then confirmed an incremental rerun skips unchanged files.
- Verified 557 PDF source_refs, 557 manifest rows, all status ok, and zero missing text/hash/path issues.
Next useful context:
- HKEX HTML notices and Yahoo JSON market data remain under data/raw and are not expected in data/extracted_text.
Request:
- Use the analyst skill to digest downloaded IPO archive data and start building an analysis model.
Changes:
- Add ipo_score_v0 as the first transparent stage-safe scoring rule set.
- Add build_analysis_dataset.py to derive model features, scores, decision bands, and empirical D1 calibration from SQLite.
- Generate analysis_model_v0_dataset.csv with 293 scored IPO rows and archived source paths.
- Add a model calibration report documenting coverage, T0/T1 bucket performance, usage, and known gaps.
- Record the initial model entry in the rule change log and document the command in README.
Verification:
- Ran py_compile for scripts/build_analysis_dataset.py.
- Regenerated the analysis dataset and report with as-of 2026-06-15T13:00:00Z.
- Checked CSV row count, source path coverage, and repo-relative path hygiene.
- Ran git diff --cached --check.
Next useful context:
- v0 should be treated as a transparent baseline, with T1 high-score calibration strongest and middle buckets still non-monotonic.
- T2 is excluded until a reliable grey-market source is approved.
Request:
- Rework archivist handling for stubborn T0/T1 HKEX document gaps and unresolved T2 grey-market gaps.
Changes:
- Query HKEXnews titleSearchServlet with IPO-date windows instead of only the latest title-search page.
- Recognize SHARE OFFER listing documents and archive official HTML allotment-result notices when no PDF is published.
- Mark source-only allotment completion clearly when structured demand parsing is not yet covered.
- Add a reusable grey-market gap marker and archivist source policy for T2 data.
- Archive newly discovered HKEX raw sources, update SQLite, and refresh CSV snapshots.
- Treat raw evidence files as binary in Git attributes.
Verification:
- Ran py_compile for archive_hkex_documents.py, update_sync_state.py, and mark_grey_market_gaps.py.
- Ran HKEX document archive backfill and grey-market gap marker.
- Checked SQLite integrity, foreign keys, source paths, source hashes, and DB-vs-snapshot row counts.
- Ran git diff --cached --check after marking raw archives binary.
Next useful context:
- T0 is now complete for 293 tickers.
- T1 has 291 complete and 2 pending_not_due tickers.
- T2 has 291 blocked gaps pending an approved grey-market source strategy.
Request:
- Adjust archivist after the audit findings and update historical data.
Changes:
- Teach the archivist skill to close audit-discovered gaps in priority order.
- Add scripts/archive_price_performance.py for due D1/D5/D20/D60 price-performance backfills.
- Document the price-performance backfill command in README.
- Archive raw Yahoo Finance chart responses under repo-relative data/raw/{ticker}/ paths.
- Populate price_performance with D1/D5/D20/D60 checkpoints and refresh source_refs, sync_runs, sync_tasks, and ticker_sync_state snapshots.
Execution:
- Ran .venv/bin/python scripts/archive_price_performance.py --as-of 2026-06-15T10:00:00Z.
- Selected 291 due price-performance tickers.
- Archived 273 price-history sources and wrote 1063 price-performance rows.
- Re-ran .venv/bin/python scripts/archive_hkex_documents.py --as-of 2026-06-15T10:05:00Z for the remaining open T0/T1 tasks; no additional completed T0/T1 stages resulted.
Verification:
- Compiled the new price-performance script.
- Ran git diff --check.
- Checked SQLite integrity and foreign keys.
- Confirmed database row counts match CSV snapshots.
- Verified all 979 source_refs use valid repo-relative paths, have files, have hashes, and SHA256 hashes match.
- Confirmed no generated Python caches or SQLite transient files remain.
Next useful context:
- price_performance now has 1063 rows: D1 273, D5 272, D20 267, D60 251.
- Remaining due price-performance gaps are 18 tickers where Yahoo history was unavailable or the request failed.
- T0/T1 gaps remain at T0 93 and T1 77; T2 grey-market remains unresolved pending a reproducible source strategy.
Request:
- Add a project-local audit skill for checking IPO data completeness, sufficiency, and analysis self-consistency.
Changes:
- Create .codex/skills/audit/SKILL.md.
- Define audit scope across source integrity, stage data completeness, data sufficiency, and reasoning consistency.
- Separate responsibilities from archivist fact updates and analyst investment conclusions.
Verification:
- Reviewed the new skill body.
- Ran git diff --check.
- Confirmed the project-local skill list includes archivist, analyst, and audit.
Request:
- Remove wording that could imply batched HKEX document backfills.
Changes:
- Replace the remaining progressive-fill phrase in README with direct full-run wording.
Verification:
- Confirmed README, archivist skill, and archiver script contain no batch, small-batch, --limit 5, progressively, or 分批 wording.
- Ran git diff --check.
Request:
- Remove small-batch guidance and execute the HKEX document archiver across all open T0/T1 sync tasks in one run.
Changes:
- Make archive_hkex_documents.py process every open T0/T1 ticker by default when --limit is omitted.
- Add per-ticker progress output and keep full refreshes moving if one ticker fails.
- Suppress noisy pypdf warnings during large official document extraction.
- Update archivist and README instructions to show the full-run command without batch notes.
- Archive official HKEXnews prospectus and allotment-results PDFs under repo-relative data/raw paths.
- Refresh hk_ipo.sqlite and CSV snapshots for parsed T0/T1 fields, source_refs, sync_runs, sync_tasks, and ticker_sync_state.
Execution:
- Ran .venv/bin/python scripts/archive_hkex_documents.py --as-of 2026-06-15T09:00:00Z.
- Selected 284 open T0/T1 tickers, processed 210 tickers, and archived 398 source files.
- Left 74 tickers as missing target docs because title search did not return target prospectus/allotment documents for this pass.
Verification:
- Parsed archivist scripts with Python ast.
- Confirmed README, archivist skill, and archiver script no longer contain batch guidance.
- Ran git diff --check.
- Checked SQLite integrity and DB/snapshot row counts.
- Verified 706 source_refs use relative local paths, all files exist, and SHA256 hashes match.
Next useful context:
- Current source_refs count is 706 and ipo_demand count is 134.
- Sync ledger now reports 414 complete, 1595 pending_due, and 42 pending_not_due states.