بنقرة واحدة
work-toward-parity
Use this skill to make a the behavior of our builtins match that of TCL.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use this skill to make a the behavior of our builtins match that of TCL.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | work-toward-parity |
| description | Use this skill to make a the behavior of our builtins match that of TCL. |
Step-by-step process for implementing missing TCL behaviors to achieve parity with standard TCL. Use this when a feature is partially implemented and needs additional behaviors to match TCL.
Before starting any work:
git show HEAD
Understand the current state and any handoff notes from your colleague.
Review the documentation file for the feature:
cat docs/builtin-<feature>.md
Look for entries marked as "Not implemented" or features that differ from TCL.
Test expected behavior against the reference TCL interpreter interactively:
tclsh << 'EOF'
# Test code here
EOF
Or use the oracle wrapper:
echo '<tcl code>' | bin/oracle
Key areas to explore:
Create or update testcases/<feature>.html with test cases for the missing behaviors.
Use the correct test case structure:
<test-case name="descriptive name">
<script>
tcl code here
</script>
<return>TCL_OK</return>
<error></error>
<stdout>expected output</stdout>
<stderr></stderr>
<exit-code>0</exit-code>
</test-case>
For error cases:
<return>TCL_ERROR</return><error>expected error message</error><exit-code>1</exit-code><stdout> tag entirely (do not include empty <stdout></stdout>)bin/harness run --host oracle testcases/<feature>.html
All tests must pass against the oracle before implementation. Fix any test expectation mismatches.
Commit the tests separately before implementing:
git add testcases/<feature>.html
git commit -m "Add test cases for <feature> <specific behaviors>"
This ensures tests are preserved even if implementation is incomplete.
Now implement to make the tests pass. Common patterns:
When adding return values or parameters:
src/internal.h declarationssrc/<file>.cIf new host operations are needed: you first MUST STOP and ASK THE USER whether the extension is appropriate.
Extending the host interface is a measure of last resort: we want to keep as much logic in the C core as possible.
First think again whether you could implement the feature without extending the host interface.
If you have been granted permission to extend the host interface, follow these steps:
src/feather.h in appropriate ops structsrc/host.hcallbacks.csrc/host.cinterp_callbacks.go)js/feather.js)# Build
mise build
# Run specific tests
bin/harness run --host bin/feather-tester testcases/<feature>.html
# When tests pass, run full regression
mise test
# Run JS/WASM tests
mise test:js
Fix failures one at a time. Common issues:
git add -A
git commit -m "Implement <specific behaviors> for <feature>
<Detailed description of what was implemented>
<Key implementation decisions>
All N tests pass in both Go and JS/WASM hosts."
Update docs/builtin-<feature>.md:
Update docs/index.md if the feature status changed significantly.
git add docs/
git commit -m "Update <feature> documentation to reflect implementation"
| File | Purpose |
|---|---|
docs/builtin-*.md | Feature documentation with implementation status |
docs/index.md | Summary of all builtins and missing features |
testcases/*.html | Test definitions |
src/internal.h | Internal C declarations |
src/*.c | C implementations |
src/feather.h | Host interface definitions |
callbacks.c | C-to-Go callback wrappers |
interp_callbacks.go | Go host implementations |
js/feather.js | JS/WASM host implementations |
Different trace types handle errors differently:
can't read/set "varname": <error>When behavior must propagate through nested calls:
::tcl namespaceIf tests use TCL features Feather doesn't support (e.g., lindex $list end):
lindex $list [expr {$len - 1}])tclsh to understand behaviortestcases/trace-step.html with 15 test casesbin/harness run --host oracle testcases/trace-step.htmlbin/harness run --host bin/feather-tester testcases/trace-step.htmllindex endmise test and mise test:jsdocs/builtin-trace.md and docs/index.mdDefines or updates usage help for built-in commands. Use when adding help documentation to commands that don't have it, or fixing inaccurate help text.
Use this skill when asked to review the package documentation of the Go implementation of Feather.
Implements new TCL builtin commands or subcommands in feather. Use when adding new TCL commands like lrepeat, or new subcommands to existing commands like namespace.
Create a git commit at the end of a work increment. Use when you have completed a meaningful unit of work and need to hand off to a colleague.
Use this skill when asked to work on a milestone. You are not required to complete the milestone when this skill is invoked.
Use this skill when asked to remember information about coding standards, quality, or any other kind of future rule.