Imported from anderson930420/SignalForge (
AGENTS.md). Install upstream withnpx skills add anderson930420/SignalForge. Copyright stays with the author.
SignalForge Agent Instructions
Project Identity
SignalForge is a paper-derived factor and standardized signal generation layer.
SignalForge is not a backtester.
SignalForge exists to transform input market data and factor definitions into standardized signal artifacts that can later be validated by AlphaForge.
SignalForge Owns
- OHLCV data input for signal generation
- future multi-source data contract boundaries
- factor calculation
- signal composition
- signal.csv export
- signal_contract.yaml export
- data_quality_report.json export
- AlphaForge-compatible signal schema validation
SignalForge Does Not Own
- backtesting
- strategy search over performance metrics
- final holdout evaluation
- portfolio construction
- live trading
- broker execution
- AlphaForge report generation
Boundary With AlphaForge
AlphaForge remains the validation backend.
SignalForge may export signal.csv artifacts that AlphaForge can consume through a custom_signal interface.
SignalForge must not import AlphaForge in MVP unit tests.
SignalForge compatibility checks should be pure schema validation.
Development Method
Use OpenSpec before non-trivial changes.
For each meaningful change:
- Create or update an OpenSpec change.
- Keep the change scope narrow.
- Implement only behavior covered by the spec.
- Add tests for public contracts.
- Run pytest, ruff, and OpenSpec validation.
- Do not archive until tests and specs pass.
Universal Workflow
These instructions apply to Codex, opencode, and any other coding agent working in this repository.
Before making changes:
- Read this file.
- Inspect the current workspace state.
- Find the smallest relevant files and constraints before editing.
For task execution:
- Keep the change scope narrow.
- Stay inside the SignalForge boundaries defined above.
- Prefer repo-native scripts and tests over ad hoc workarounds.
- Before each meaningful action, run
python3 scripts/read_memory.pyand review01 Projects/SignalForge/worklog.md. - After each meaningful action, append one step log with
python3 src/obsidian_logger.py <log-file-or-string>. - Every step log must use the required
### [YYYY-MM-DD HH:MM] Step: ...header format. - If the task is an Obsidian memory task, use
scripts/read_memory.pyandsrc/obsidian_logger.pyonly, and write only to01 Projects/SignalForge/worklog.md. - Do not modify Daily notes or AlphaForge-related Obsidian content.
- Deduplicate log entries before appending.
Architecture Rules
- schemas.py contains passive data models and schema constants only.
- data_registry.py owns data loading, normalization, and quality checks.
- factor_base.py owns the factor protocol.
- factor_registry.py owns factor registration and factor config validation.
- signal_composer.py owns conversion from factor output to signal artifact rows.
- export.py owns artifact writing and deterministic file layout.
- compatibility.py owns pure AlphaForge-compatible schema checks.
- factors/ contains factor implementations.
- No backtest.py in MVP.
- No performance metric ranking.
- No portfolio logic.
Required Signal Artifact
signal.csv must use this stable column order:
datetime
available_at
symbol
signal_name
signal_value
signal_binary
source
Required artifacts for every export:
signal.csv signal_contract.yaml data_quality_report.json
Testing Rules
Tests should verify:
required signal columns deterministic signal export signal_binary only contains 0 or 1 available_at <= datetime no duplicate datetime-symbol-signal_name rows missing OHLCV columns fail clearly FactorRegistry rejects unknown and duplicate factors SignalForge does not import AlphaForge SignalForge does not run backtests