create-tradejs 3.1.29-beta.276 → 3.1.29-beta.278
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/dist/skill-bundle/.codex/skills/ai-train-local-research/SKILL.md +11 -0
- package/dist/skill-bundle/.codex/skills/strategy-backtest-research/SKILL.md +10 -0
- package/dist/skill-bundle/.codex/skills/strategy-backtest-research/references/research-notes.md +8 -0
- package/dist/skill-bundle/.codex/skills/strategy-backtest-research/references/research-retention.md +157 -0
- package/dist/skill-bundle/.codex/skills/strategy-backtest-research/scripts/retire-worktree.py +116 -0
- package/dist/skill-bundle/.codex/skills/strategy-candidate-compare/SKILL.md +6 -0
- package/dist/skill-bundle/.codex/skills/strategy-candidate-report/SKILL.md +7 -0
- package/dist/skill-bundle/.codex/skills/strategy-improvement-research/SKILL.md +13 -0
- package/dist/skill-bundle/.codex/skills/strategy-period-revalidate/SKILL.md +5 -0
- package/dist/skill-bundle/.codex/skills/strategy-release/references/evidence-retention.md +9 -0
- package/dist/skill-bundle/.codex/tradejs-skill-bundle.json +11 -9
- package/package.json +1 -1
|
@@ -638,6 +638,17 @@ Every new AI-gate study must:
|
|
|
638
638
|
- downgrade `reproduction` from `complete` when any displayed metric or lineage
|
|
639
639
|
cannot be recovered from the note after export deletion.
|
|
640
640
|
|
|
641
|
+
## Completed study storage
|
|
642
|
+
|
|
643
|
+
Follow
|
|
644
|
+
[`../strategy-backtest-research/references/research-retention.md`](../strategy-backtest-research/references/research-retention.md)
|
|
645
|
+
at the final handoff. Preserve candidate gate code/config and structured
|
|
646
|
+
raw/approved/partition/terminal metrics, rejected hypotheses, test exposure and
|
|
647
|
+
final charts. Remove trade/feature exports and intermediate datasets after all
|
|
648
|
+
consumers finish. If this gate board is part of an ongoing improvement study,
|
|
649
|
+
return its temporary-file inventory to that study's orchestrator instead of
|
|
650
|
+
deleting shared inputs during the gate stage.
|
|
651
|
+
|
|
641
652
|
## Current repo conventions
|
|
642
653
|
|
|
643
654
|
- Prefer `GPT-5 Mini` by default for non-local AI replay unless the user names another model.
|
|
@@ -360,6 +360,16 @@ it exactly.
|
|
|
360
360
|
`node .codex/skills/strategy-backtest-research/scripts/research-notes-check.mjs`
|
|
361
361
|
after creating or editing research records.
|
|
362
362
|
|
|
363
|
+
## Completed research storage
|
|
364
|
+
|
|
365
|
+
At the final handoff, follow
|
|
366
|
+
[`references/research-retention.md`](references/research-retention.md).
|
|
367
|
+
Keep compact results and every frozen candidate permanently; remove temporary
|
|
368
|
+
trade data and run-specific caches after all consuming research stages finish.
|
|
369
|
+
When executing one experiment for an ongoing improvement study, hand its
|
|
370
|
+
temporary-file inventory to the orchestrator and preserve its inputs until
|
|
371
|
+
that study's final cleanup.
|
|
372
|
+
|
|
363
373
|
## Validation
|
|
364
374
|
|
|
365
375
|
- Run the affected strategy tests after strategy edits, for example `yarn jest packages/strategies/src/<StrategyName> --runInBand`.
|
package/dist/skill-bundle/.codex/skills/strategy-backtest-research/references/research-notes.md
CHANGED
|
@@ -230,6 +230,14 @@ calendar days`. Include zero-activity side cohorts rather than omitting them.
|
|
|
230
230
|
- State any metric that cannot be recovered from the structured snapshot under
|
|
231
231
|
`Limitations and next step` and lower the reproduction status accordingly.
|
|
232
232
|
|
|
233
|
+
## Completed study cleanup
|
|
234
|
+
|
|
235
|
+
Follow [research-retention.md](research-retention.md) after the entire study
|
|
236
|
+
finishes. Keep compact results and all frozen candidates permanently. Trade
|
|
237
|
+
rows, matched-pair payloads, exports and run-specific caches are temporary.
|
|
238
|
+
The permanent note must contain aggregate metrics and exact candidate source
|
|
239
|
+
or retained source patches before those temporary files are removed.
|
|
240
|
+
|
|
233
241
|
## Historical migration
|
|
234
242
|
|
|
235
243
|
Historical split records retain their original body under a common v1
|
package/dist/skill-bundle/.codex/skills/strategy-backtest-research/references/research-retention.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Completed research storage
|
|
2
|
+
|
|
3
|
+
Read this when finishing a research lineage or cleaning an older completed
|
|
4
|
+
study. The Project owner keeps compact results and frozen candidates permanently.
|
|
5
|
+
Trade rows, AI feature exports, trace streams, intermediate datasets and
|
|
6
|
+
run-specific caches are temporary. Remove them after the entire study finishes,
|
|
7
|
+
including gate evaluation, comparisons and final charts. A completed backtest
|
|
8
|
+
inside an active study is not permission to remove its inputs.
|
|
9
|
+
|
|
10
|
+
## Permanent records
|
|
11
|
+
|
|
12
|
+
Use the existing note, candidate manifest and trial ledger. Do not create a
|
|
13
|
+
second best-candidate pointer. Before cleanup, preserve:
|
|
14
|
+
|
|
15
|
+
- Every hypothesis and candidate, including rejected and failed attempts, its
|
|
16
|
+
causal claim, exact resolved config, source commit and any uncommitted patch,
|
|
17
|
+
deterministic gate code/config, context settings, parent IDs and verdict.
|
|
18
|
+
A hash or a deleted worktree path does not preserve candidate source.
|
|
19
|
+
- The common comparison scope: timestamps, ordered symbols, interval, fees,
|
|
20
|
+
slippage, execution assumptions, risk unit, code/tool versions, train/test
|
|
21
|
+
boundaries, exposure history and reconciliation/completion results.
|
|
22
|
+
- Structured metrics for every reported candidate, period and ALL/LONG/SHORT
|
|
23
|
+
cohort, including zero-trade cohorts, statistical checks, limitations and
|
|
24
|
+
candidate-minus-control deltas. Preserve selected and rejected reasons and
|
|
25
|
+
the full trial denominator. Keep compact month/fold/regime summaries and
|
|
26
|
+
cost tests needed to explain the decision.
|
|
27
|
+
- Final reports and charts, the ledger/index and artifact hashes. Freeze any
|
|
28
|
+
chart points needed to render the final chart before removing trade rows.
|
|
29
|
+
Store aggregate metrics in JSON; do not embed trades or matched-pair objects
|
|
30
|
+
in the permanent note merely to retain a large export under another name.
|
|
31
|
+
|
|
32
|
+
Follow [research-notes.md](research-notes.md), and run `yarn notes:check`.
|
|
33
|
+
Review the actual configs, source and metrics, not just the frontmatter label.
|
|
34
|
+
The record must explain which old behavior was tried and why the next study
|
|
35
|
+
should reuse or reject it. Future research reads these records before choosing
|
|
36
|
+
new hypotheses. Compare saved results directly only on matching scopes and
|
|
37
|
+
risk units. Changed periods or assumptions require a new frozen evaluation.
|
|
38
|
+
|
|
39
|
+
## Cleanup
|
|
40
|
+
|
|
41
|
+
The research owner performs cleanup as the final step of the study, without a
|
|
42
|
+
new approval request. The owner's storage policy authorizes removal of temporary
|
|
43
|
+
research files after their permanent records have been verified. Keep files
|
|
44
|
+
needed by another unfinished study. Never clear a whole shared cache, Redis,
|
|
45
|
+
market history, runtime evidence or unrelated research directory.
|
|
46
|
+
|
|
47
|
+
Create a retention inventory under the study directory. Use the installed
|
|
48
|
+
`yarn strategy-release retention` command with these fields:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"now": 1792108800000,
|
|
53
|
+
"research": {
|
|
54
|
+
"researchId": "example-study",
|
|
55
|
+
"status": "completed",
|
|
56
|
+
"completedAt": 1792108800000,
|
|
57
|
+
"permanentArtifacts": [
|
|
58
|
+
{"role": "note", "path": "notes/MyStrategy/2026-10-16-example.md", "sha256": "<actual SHA-256>"},
|
|
59
|
+
{"role": "candidates", "path": "data/strategy-release/example/candidates.json", "sha256": "<actual SHA-256>"},
|
|
60
|
+
{"role": "metrics", "path": "data/strategy-release/example/metrics.json", "sha256": "<actual SHA-256>"}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"entries": [
|
|
64
|
+
{
|
|
65
|
+
"path": "data/ai/export/example.jsonl",
|
|
66
|
+
"kind": "research_payload",
|
|
67
|
+
"researchId": "example-study",
|
|
68
|
+
"sha256": "<actual SHA-256>",
|
|
69
|
+
"createdAt": 1792022400000,
|
|
70
|
+
"bytes": 1234,
|
|
71
|
+
"verified": true,
|
|
72
|
+
"aggregated": true
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Use actual timestamps, sizes and hashes. `research_cache` identifies disposable
|
|
79
|
+
run-specific cache files. The same note may serve several permanent roles when
|
|
80
|
+
it embeds the complete candidate and metric records; list its exact checksum
|
|
81
|
+
for each role. Add source patches, gate files, manifests, ledgers, indexes and
|
|
82
|
+
charts to `permanentArtifacts` too. Only explicit files inside Project `data/`
|
|
83
|
+
are eligible. Files open in another process, symlinks, notes and patches are
|
|
84
|
+
protected. The command checks all permanent and disposable hashes before
|
|
85
|
+
removing any file, and writes an incremental cleanup receipt.
|
|
86
|
+
On macOS, cached virtual-machine file handles require an additional read-only
|
|
87
|
+
check of the actual processes inside every local Docker container that mounts
|
|
88
|
+
those files. Unreadable or unresolved consumers keep the files protected.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
yarn strategy-release retention --input <inventory.json>
|
|
92
|
+
yarn strategy-release retention --input <inventory.json> --apply
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Check that the plan's `deleteCount` matches the intended inventory before
|
|
96
|
+
applying, then check the completed receipt. An older installed CLI may not
|
|
97
|
+
support research entries and may return zero deletions. In the canonical
|
|
98
|
+
workspace, use the explicitly built framework CLI from the Project directory
|
|
99
|
+
when that happens, and record its source SHA/dirty diff:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
PROJECT_CWD="$PWD" node "$TRADEJS_FRAMEWORK_REPOSITORY_ROOT/packages/cli/dist/cli.js" \
|
|
103
|
+
strategy-release retention --input <inventory.json> [--apply]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Do not change installed package versions or publish a release just to clean
|
|
107
|
+
research files. If the built source CLI is unavailable, keep the inventory and
|
|
108
|
+
report cleanup as pending rather than claiming the files were removed.
|
|
109
|
+
|
|
110
|
+
Research payloads have no age delay once the study is complete and aggregated.
|
|
111
|
+
The separate runtime retention policy remains unchanged. Keep the inventory and
|
|
112
|
+
receipt and its deletion journal with the permanent records. A future comparison can use the saved
|
|
113
|
+
numbers and reproduce the candidate by rerunning its frozen code/config. New
|
|
114
|
+
trade-level questions and new historical windows require a rerun. Do not claim
|
|
115
|
+
the removed files remain available for checksum verification.
|
|
116
|
+
|
|
117
|
+
## Older studies
|
|
118
|
+
|
|
119
|
+
Recover available compact results and candidate definitions from existing
|
|
120
|
+
notes, configs, manifests and reports without starting another backtest. If
|
|
121
|
+
the missing evidence cannot be recovered without a rerun, retire the old study
|
|
122
|
+
and delete its temporary payloads. The owner explicitly authorized that policy.
|
|
123
|
+
Keep its original partial/blocked status and record the gaps. Never fabricate
|
|
124
|
+
historical configs, metrics or successful completion.
|
|
125
|
+
|
|
126
|
+
Use `research.status: retired` and set `completedAt` to the retirement decision
|
|
127
|
+
time. Add `retirement: {policy: "discard-unrecoverable-without-rerun", reason:
|
|
128
|
+
"<specific reason>", missingEvidence: ["<recorded gaps>"]}`. Preserve all
|
|
129
|
+
available notes, candidate/source/config files and compact metrics. The tool
|
|
130
|
+
permits partial or blocked notes in this mode and records the retirement in
|
|
131
|
+
the cleanup receipt. `aggregated: false` records genuinely missing aggregates;
|
|
132
|
+
file checksum verification remains mandatory. Active studies are never retired
|
|
133
|
+
merely to reclaim disk space.
|
|
134
|
+
|
|
135
|
+
## Worktree removal
|
|
136
|
+
|
|
137
|
+
Remove the study's dedicated worktree after freezing permanent candidate and
|
|
138
|
+
result records, including when a selected candidate exists. Retain its
|
|
139
|
+
commit/branch and exact source. For old idle research worktrees, preserve dirty
|
|
140
|
+
and untracked source before removal. Do not delete branches, canonical checkouts,
|
|
141
|
+
locked or managed checkouts belonging to active chats, or ongoing studies.
|
|
142
|
+
|
|
143
|
+
Inspect the owning repository's `git worktree list` and checkout status.
|
|
144
|
+
The helper preserves a Git history bundle, source snapshot and staged/unstaged
|
|
145
|
+
patches, verifies their contents, and refuses worktrees with open files:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
python3 .codex/skills/strategy-backtest-research/scripts/retire-worktree.py \
|
|
149
|
+
--repository <canonical-repository> --worktree <exact-worktree> \
|
|
150
|
+
--out data/worktree-cleanup/<id>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Review its plan, then repeat with `--apply`. Keep the source archive and
|
|
154
|
+
receipt permanently. Prune stale registrations only after checking that their
|
|
155
|
+
directories are actually absent, and preserve their branch/commit identities
|
|
156
|
+
in the cleanup inventory. For Codex-managed worktrees attached to this chat,
|
|
157
|
+
prefer the app's archive tool, which preserves recoverable state.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Archive exact source state before removing an explicitly selected worktree."""
|
|
3
|
+
import argparse
|
|
4
|
+
import hashlib
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
import subprocess
|
|
9
|
+
import tarfile
|
|
10
|
+
import shutil
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def git(root, *args):
|
|
14
|
+
return subprocess.check_output(['git', '-C', str(root), *args])
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def sha_file(file):
|
|
18
|
+
result = hashlib.sha256()
|
|
19
|
+
with file.open('rb') as stream:
|
|
20
|
+
for chunk in iter(lambda: stream.read(1024 * 1024), b''):
|
|
21
|
+
result.update(chunk)
|
|
22
|
+
return result.hexdigest()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def retire(repository, worktree, out, apply=False):
|
|
26
|
+
repository, worktree, out = map(lambda p: Path(p).resolve(), (repository, worktree, out))
|
|
27
|
+
records = git(repository, 'worktree', 'list', '--porcelain').decode().strip().split('\n\n')
|
|
28
|
+
paths = [r.splitlines()[0].split(' ', 1)[1] for r in records]
|
|
29
|
+
if str(worktree) not in paths or str(worktree) == paths[0]:
|
|
30
|
+
raise ValueError('Select a registered secondary worktree, never the primary checkout')
|
|
31
|
+
record = records[paths.index(str(worktree))]
|
|
32
|
+
if '\nlocked' in record or not worktree.is_dir():
|
|
33
|
+
raise ValueError('Worktree is locked or missing')
|
|
34
|
+
if git(worktree, 'submodule', 'status').strip():
|
|
35
|
+
raise ValueError('Archive submodules separately before removing this worktree')
|
|
36
|
+
if worktree == out or worktree in out.parents:
|
|
37
|
+
raise ValueError('Archive must be outside the removed worktree')
|
|
38
|
+
head = git(worktree, 'rev-parse', 'HEAD').decode().strip()
|
|
39
|
+
status = git(worktree, 'status', '--porcelain=v1', '-z')
|
|
40
|
+
patch = git(worktree, 'diff', 'HEAD', '--binary')
|
|
41
|
+
staged = git(worktree, 'diff', '--cached', '--binary')
|
|
42
|
+
files = set(git(worktree, 'ls-files', '-z', '--cached', '--others', '--exclude-standard').split(b'\0'))
|
|
43
|
+
files.update(git(worktree, 'ls-files', '-z', '--others', '--ignored', '--exclude-standard').split(b'\0'))
|
|
44
|
+
generated = {'node_modules', 'dist', 'build', '.yarn', '.turbo', '.next', 'coverage', '__pycache__'}
|
|
45
|
+
selected = []
|
|
46
|
+
for raw in sorted(files):
|
|
47
|
+
if not raw:
|
|
48
|
+
continue
|
|
49
|
+
name = os.fsdecode(raw)
|
|
50
|
+
relative = Path(name)
|
|
51
|
+
if relative.is_absolute() or '..' in relative.parts:
|
|
52
|
+
raise ValueError('Invalid source path')
|
|
53
|
+
if any(part in generated for part in relative.parts):
|
|
54
|
+
continue
|
|
55
|
+
if (relative.name == '.env' or relative.name.startswith('.env.') and relative.suffix not in {'.example', '.sample', '.template'}):
|
|
56
|
+
raise ValueError('Preserve local credentials separately before removing this worktree')
|
|
57
|
+
file = worktree / relative
|
|
58
|
+
if file.is_symlink() or file.is_file():
|
|
59
|
+
selected.append((name, None if file.is_symlink() else sha_file(file)))
|
|
60
|
+
plan = {'worktree': str(worktree), 'repository': str(repository), 'head': head,
|
|
61
|
+
'registration': record, 'sourceFiles': len(selected), 'dirty': bool(status), 'archive': str(out)}
|
|
62
|
+
if not apply:
|
|
63
|
+
return {**plan, 'status': 'planned'}
|
|
64
|
+
# A cwd or any open source file means this checkout is still in use.
|
|
65
|
+
opened = subprocess.run(['lsof', '-F', 'pcn', '+D', str(worktree)], capture_output=True)
|
|
66
|
+
if opened.returncode != 1:
|
|
67
|
+
raise ValueError('Worktree has open files or cannot be inspected: ' + opened.stdout.decode()[:500])
|
|
68
|
+
out.mkdir(parents=True, exist_ok=False)
|
|
69
|
+
git(worktree, 'bundle', 'create', str(out / 'history.bundle'), 'HEAD')
|
|
70
|
+
git(repository, 'bundle', 'verify', str(out / 'history.bundle'))
|
|
71
|
+
(out / 'working-tree.patch').write_bytes(patch)
|
|
72
|
+
(out / 'staged.patch').write_bytes(staged)
|
|
73
|
+
(out / 'status.porcelain').write_bytes(status)
|
|
74
|
+
archive = out / 'source.tar.gz'
|
|
75
|
+
with tarfile.open(archive, 'w:gz', dereference=False) as tar:
|
|
76
|
+
for name, _ in selected:
|
|
77
|
+
tar.add(worktree / name, arcname=name, recursive=False)
|
|
78
|
+
with tarfile.open(archive, 'r:gz') as tar:
|
|
79
|
+
for name, digest in selected:
|
|
80
|
+
member = tar.getmember(name)
|
|
81
|
+
file = worktree / name
|
|
82
|
+
if member.issym():
|
|
83
|
+
assert os.readlink(file) == member.linkname
|
|
84
|
+
else:
|
|
85
|
+
stream = tar.extractfile(member)
|
|
86
|
+
archived = hashlib.file_digest(stream, 'sha256').hexdigest()
|
|
87
|
+
assert archived == digest == sha_file(file), name
|
|
88
|
+
if git(worktree, 'rev-parse', 'HEAD').decode().strip() != head or git(worktree, 'status', '--porcelain=v1', '-z') != status or git(worktree, 'diff', 'HEAD', '--binary') != patch:
|
|
89
|
+
raise ValueError('Worktree changed during archival; leave it in place')
|
|
90
|
+
receipt = {**plan, 'status': 'archived', 'sha256': {p.name: sha_file(p) for p in out.iterdir()}}
|
|
91
|
+
target = out / 'receipt.json'
|
|
92
|
+
target.write_text(json.dumps(receipt, indent=2) + '\n')
|
|
93
|
+
try:
|
|
94
|
+
git(repository, 'worktree', 'remove', *(['--force'] if status else []), str(worktree))
|
|
95
|
+
except subprocess.CalledProcessError:
|
|
96
|
+
# Git can remove the registration but leave an ignored dependency tree
|
|
97
|
+
# behind on macOS. Only finish removal after registration is gone and
|
|
98
|
+
# the exact source snapshot has already passed the checks above.
|
|
99
|
+
remaining = git(repository, 'worktree', 'list', '--porcelain').decode()
|
|
100
|
+
if f'worktree {worktree}\n' in remaining or worktree.is_symlink():
|
|
101
|
+
raise
|
|
102
|
+
if worktree.exists():
|
|
103
|
+
shutil.rmtree(worktree)
|
|
104
|
+
receipt['status'] = 'removed'
|
|
105
|
+
target.write_text(json.dumps(receipt, indent=2) + '\n')
|
|
106
|
+
return receipt
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
if __name__ == '__main__':
|
|
110
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
111
|
+
parser.add_argument('--repository', required=True)
|
|
112
|
+
parser.add_argument('--worktree', required=True)
|
|
113
|
+
parser.add_argument('--out', required=True)
|
|
114
|
+
parser.add_argument('--apply', action='store_true')
|
|
115
|
+
args = parser.parse_args()
|
|
116
|
+
print(json.dumps(retire(args.repository, args.worktree, args.out, args.apply), indent=2))
|
|
@@ -27,6 +27,12 @@ it must not change either composition.
|
|
|
27
27
|
|
|
28
28
|
## Make the comparison fair
|
|
29
29
|
|
|
30
|
+
Use retained compact results and frozen candidate definitions even when a
|
|
31
|
+
completed study's trade data was intentionally removed. Check the permanent
|
|
32
|
+
record and cleanup receipt. Compare saved metrics on identical scopes; a new
|
|
33
|
+
period or unavailable metric needs a frozen bridge evaluation, not an invented
|
|
34
|
+
value or a repeat of the original optimization.
|
|
35
|
+
|
|
30
36
|
Use the maximum common timestamp range, point-in-time universe, symbols,
|
|
31
37
|
interval, fees, slippage, entry delay, risk unit, and execution assumptions.
|
|
32
38
|
Normalize PnL and drawdown per unit of `MAX_LOSS_VALUE` when production and the
|
|
@@ -27,6 +27,13 @@ Creating a report or chart under `output/` is allowed.
|
|
|
27
27
|
|
|
28
28
|
## Report
|
|
29
29
|
|
|
30
|
+
Completed studies may intentionally retain only compact results and candidate
|
|
31
|
+
source/config. Read their permanent notes, manifests, ledgers and cleanup
|
|
32
|
+
receipts before looking for raw exports. Missing intentionally removed trade
|
|
33
|
+
data does not erase a recorded result or rejected hypothesis. Verify retained
|
|
34
|
+
records and label the scope as saved metrics; new trade-level analysis requires
|
|
35
|
+
a rerun. Reuse the saved final chart when raw rows have been removed.
|
|
36
|
+
|
|
30
37
|
Show:
|
|
31
38
|
|
|
32
39
|
- candidate ID, selection time, research ID, source/package revision, dirty
|
|
@@ -34,6 +34,10 @@ source edits does not need a worktree.
|
|
|
34
34
|
on the worktree branch and hand off the exact commit SHA; do not retain
|
|
35
35
|
rejected behavior as source commits.
|
|
36
36
|
|
|
37
|
+
After the final evidence handoff, remove the dedicated worktree even when a
|
|
38
|
+
candidate was selected. Keep its commit/branch, source snapshot and any
|
|
39
|
+
uncommitted candidate patches under the shared research-retention contract.
|
|
40
|
+
|
|
37
41
|
## Authority boundary
|
|
38
42
|
|
|
39
43
|
You may refresh research artifacts, run cache-backed research, edit strategy
|
|
@@ -123,6 +127,15 @@ underpowered below 20 events, diagnostic at 20–49, and selection-grade at 50+.
|
|
|
123
127
|
|
|
124
128
|
## Handoff
|
|
125
129
|
|
|
130
|
+
Before the final answer, complete
|
|
131
|
+
[`../strategy-backtest-research/references/research-retention.md`](../strategy-backtest-research/references/research-retention.md).
|
|
132
|
+
Preserve compact results, all candidate definitions, source/gate patches,
|
|
133
|
+
selection history and final charts. Then remove the finished study's trade
|
|
134
|
+
exports, trace streams, intermediate datasets and run-specific caches. Do not
|
|
135
|
+
clean up after an individual round or core run while gate/comparison work still
|
|
136
|
+
needs its rows. Read permanent notes and ledgers before inventing new trials;
|
|
137
|
+
the absence of deleted exports is not a reason to repeat an old hypothesis.
|
|
138
|
+
|
|
126
139
|
Create or update the existing checksum-verified strategy-release/candidate
|
|
127
140
|
manifest rather than inventing a second pointer format. Freeze candidate ID,
|
|
128
141
|
source/package SHA, full resolved core config, deterministic gate/context,
|
|
@@ -45,3 +45,8 @@ Update the immutable comparison evidence and candidate freshness without
|
|
|
45
45
|
rewriting the original selection record. State whether the incumbent remains
|
|
46
46
|
best under the frozen objective and choose exactly one next skill: report,
|
|
47
47
|
research, forward-start, forward-status, or risk-scale.
|
|
48
|
+
|
|
49
|
+
Before finishing, follow
|
|
50
|
+
[`../strategy-backtest-research/references/research-retention.md`](../strategy-backtest-research/references/research-retention.md).
|
|
51
|
+
Keep the frozen candidates and compact old/new metric comparison permanently,
|
|
52
|
+
then remove this completed evaluation's trade exports and run-specific caches.
|
|
@@ -139,6 +139,15 @@ approval and a separate release decision.
|
|
|
139
139
|
|
|
140
140
|
Use the default tiering unless the user later changes it:
|
|
141
141
|
|
|
142
|
+
Completed research follows
|
|
143
|
+
[`../../strategy-backtest-research/references/research-retention.md`](../../strategy-backtest-research/references/research-retention.md).
|
|
144
|
+
Keep compact outcomes, all candidate definitions, configs, source/gate patches,
|
|
145
|
+
trial ledgers and final charts permanently. Remove research trade payloads and
|
|
146
|
+
run-specific caches immediately after the full study finishes and its compact
|
|
147
|
+
records pass verification. Use `research_payload` or `research_cache` entries
|
|
148
|
+
with an exact completed research binding; never apply this rule to runtime
|
|
149
|
+
evidence. The tiers below apply to runtime data.
|
|
150
|
+
|
|
142
151
|
- operational Redis evidence: 3 days;
|
|
143
152
|
- reproducible verbose payloads: 14 days;
|
|
144
153
|
- verified, aggregated runtime bundles: 90 days;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "tradejs-skill-bundle/v1",
|
|
3
3
|
"source": "TradeJS-Dev/TradeJS:.codex/skills",
|
|
4
|
-
"bundleSha256": "
|
|
4
|
+
"bundleSha256": "e63d233c0cab62f3924a14db1c665433244f6572cf550812ca30857ae69bfa29",
|
|
5
5
|
"skills": [
|
|
6
6
|
"ai-train-local-research",
|
|
7
7
|
"backtest-config-redis",
|
|
@@ -40,21 +40,23 @@
|
|
|
40
40
|
".codex/skills/ai-train-local-research/scripts/research-entry-gate-bridge.test.mjs": "a9f5a918cda1d36da62dbaaf1ea3aea6bcb40f06ad9f7c4bfc4da18baa5aa01e",
|
|
41
41
|
".codex/skills/ai-train-local-research/scripts/symbol-mix-diagnostics.mjs": "ad70b73ea49060c0a350d2ca2f85788e6900bdbece46434e9a95865965329d89",
|
|
42
42
|
".codex/skills/ai-train-local-research/scripts/symbol-mix-diagnostics.test.mjs": "6244c3540f708be6f2f29fa5b871a266e0ecee7a5ba4d588b0e3acb47e1ee445",
|
|
43
|
-
".codex/skills/ai-train-local-research/SKILL.md": "
|
|
43
|
+
".codex/skills/ai-train-local-research/SKILL.md": "371d98fa7e7de3cb7ccfab6924d7d7bb2638b1c0ed05cf2035c9a074c24ce4fc",
|
|
44
44
|
".codex/skills/backtest-config-redis/scripts/get_backtest_config.sh": "833e950d6348c5b7a4bd3f00d25af60f6394190bff744bd5ab64db9e43d826d5",
|
|
45
45
|
".codex/skills/backtest-config-redis/SKILL.md": "ac4f9d685c12f748a87b1882df1f731dd3ae9ec8bd7c11cb652221fe0463febc",
|
|
46
46
|
".codex/skills/runtime-parity-mismatch-analysis/SKILL.md": "f9cbc571baaba7a185550415c3ef31f0f55a9503107c8ace2314fac88ba025bd",
|
|
47
47
|
".codex/skills/save-strategy-config-from-backtest/agents/openai.yaml": "ba163f9449562241ed954ca2e0f12e22562390740cdcf0d09d7f99f0ef791741",
|
|
48
48
|
".codex/skills/save-strategy-config-from-backtest/SKILL.md": "a73cddc29fb8fa741fe6226c051e19b0f9a19747babf96d336e7f165fb1fd298",
|
|
49
|
-
".codex/skills/strategy-backtest-research/references/research-notes.md": "
|
|
49
|
+
".codex/skills/strategy-backtest-research/references/research-notes.md": "85a23e26f2035e98cd8d3a56b4ec14638cd9d42b1dc34b4dc8ca958c3624ecaa",
|
|
50
|
+
".codex/skills/strategy-backtest-research/references/research-retention.md": "55fb27507d9f83a0123d9c840d4ef3080ff7d77c32ecfc94f33b7aab456e0f3c",
|
|
50
51
|
".codex/skills/strategy-backtest-research/scripts/backtest-run-metrics.mjs": "dbcc6bb7cab4e0108ed11df503b8a0a337d1a01b77c5b56554ce1264a00f5d57",
|
|
51
52
|
".codex/skills/strategy-backtest-research/scripts/backtest-run-metrics.test.mjs": "a00d0ae5fb0037cc554282dbe22109a9e34cb64b93d26a6feab69005a2ba637f",
|
|
52
53
|
".codex/skills/strategy-backtest-research/scripts/fast-ai-export-metrics.mjs": "61e8604bba829914315fccd604afc4a13f97409b7ebe2f22d255d0eb57f32921",
|
|
53
54
|
".codex/skills/strategy-backtest-research/scripts/fast-ai-export-metrics.test.mjs": "447453e2415004336293297b7f68ffd16ae35053d9725accaa5f42e1bbe28a58",
|
|
54
55
|
".codex/skills/strategy-backtest-research/scripts/research-notes-check.mjs": "435aa6560abcf4e8a60fb86230d8d8de2f2dc9e4c52acc7a272ce30287d40325",
|
|
55
|
-
".codex/skills/strategy-backtest-research/
|
|
56
|
-
".codex/skills/strategy-
|
|
57
|
-
".codex/skills/strategy-candidate-
|
|
56
|
+
".codex/skills/strategy-backtest-research/scripts/retire-worktree.py": "5fb920e5d639c58aeef51a104a4dad20824183c566f8f1d049e29394f12a9c68",
|
|
57
|
+
".codex/skills/strategy-backtest-research/SKILL.md": "7aaccb986c4b6fba4820af683497276d2f517439936011be9d5a2563e8cb8cce",
|
|
58
|
+
".codex/skills/strategy-candidate-compare/SKILL.md": "0213ffab975f7a19cc204260a9ca587e6f59dbd84f2a4cdac19d84418ebf0792",
|
|
59
|
+
".codex/skills/strategy-candidate-report/SKILL.md": "2f24b1ac546bd21a0cdcc04cfdce6eeeca25ff89fc42cdd1dc66516b6fe95c11",
|
|
58
60
|
".codex/skills/strategy-forward-start/SKILL.md": "a86311aeb4c5b46e43011806ffa0f665c4ec0fddce8d7f8c1232184e4a14bfa7",
|
|
59
61
|
".codex/skills/strategy-forward-status/SKILL.md": "7cb021991ff40bb3407eb58e1c9e2bcf597f67b0201059b9e20e4f37fd3320b9",
|
|
60
62
|
".codex/skills/strategy-improvement-plan/SKILL.md": "f5f0f390941dd3332890a2f0ffae1248abde4925db2cf49a41c0c0c1b47e7864",
|
|
@@ -67,14 +69,14 @@
|
|
|
67
69
|
".codex/skills/strategy-improvement-research/scripts/final-composition-board.test.mjs": "4dae48e797c27a55913639b3c90b66b7c8effe8eb9da3c943d804df301d58aa6",
|
|
68
70
|
".codex/skills/strategy-improvement-research/scripts/freeze-gate-variants.mjs": "17b3c868880ddd5b326d309e6e42eaeef1ea22d625a5db947997ac73b221ad6d",
|
|
69
71
|
".codex/skills/strategy-improvement-research/scripts/freeze-gate-variants.test.mjs": "963e1c64ab3deef11fd48a96e10f3827af38036dfe2eb28daf7849f19dd414d8",
|
|
70
|
-
".codex/skills/strategy-improvement-research/SKILL.md": "
|
|
71
|
-
".codex/skills/strategy-period-revalidate/SKILL.md": "
|
|
72
|
+
".codex/skills/strategy-improvement-research/SKILL.md": "841956c4de5f0dbe29c7fe408f27791cb599968f9a86195c962ad18271b464b8",
|
|
73
|
+
".codex/skills/strategy-period-revalidate/SKILL.md": "b580d09c78c2bf64de26ca25c4394d5e2657e8bc1f8f717391153db894b57ab2",
|
|
72
74
|
".codex/skills/strategy-release/agents/openai.yaml": "46ddb09119b08ae3be3b9509121b57492342012e774789b615767b24270dba17",
|
|
73
75
|
".codex/skills/strategy-release/references/diagnose-live.md": "dc2effa6eba34e3cfcc1eaf4d2fd1c96d6ccdda971a0edec76c9eed1ec293a3d",
|
|
74
76
|
".codex/skills/strategy-release/references/direction-policy.md": "e7635e709dfc7301b94f3dbc1421c6a779c7c39ce4f6066b2eece38e4e600bec",
|
|
75
77
|
".codex/skills/strategy-release/references/directional-parameter-split.md": "c303fbd15183b4b8c5662526d5bc762edc0a21a42c45e141d0dc5efdd3b52d8c",
|
|
76
78
|
".codex/skills/strategy-release/references/evidence-limitations.md": "523d6541a230b51c2b0b81a6c11c99e3aef69203f22b77e94fda1e3b15321e20",
|
|
77
|
-
".codex/skills/strategy-release/references/evidence-retention.md": "
|
|
79
|
+
".codex/skills/strategy-release/references/evidence-retention.md": "d0f3c612b0ce13b6b2fd6d4053dc36e0f62c92a2ea2329d22ad7ff85b28c5675",
|
|
78
80
|
".codex/skills/strategy-release/references/historical-hypothesis-audit.md": "3c4d579a0c097e974592b855891446060eb70d8bddf8558d765052a92509b516",
|
|
79
81
|
".codex/skills/strategy-release/references/professional-research-loop.md": "e440f05dd6b5c803ba20da9f019f745f89477724d46551c53dbb8dab9cffe40f",
|
|
80
82
|
".codex/skills/strategy-release/references/release-workflow.md": "a103416334b5605addd856f105462b53602d29ace2816f96162b7e2ecd1a0bb6",
|