Project
Check zero, a negative value and both base limits, rejecting booleans, fractional values and unsupported bases.
A number can keep its value while changing its written form. Radix Foundry is a Windows AI coding workspace for discussing integer-formatting code, checking its accepted bases and reviewing the handling of zero and negative inputs.
def format_radix(value, base):
if type(value) is not int or type(base) is not int or not 2 <= base <= 36:
raise ValueError("radix.input")
if value == 0:
return "0"
sign, value = ("-" if value < 0 else ""), abs(value)
digits = "0123456789abcdefghijklmnopqrstuvwxyz"
result = ""
while value:
value, remainder = divmod(value, base)
result = digits[remainder] + result
return sign + resultCheck zero, a negative value and both base limits, rejecting booleans, fractional values and unsupported bases.
Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
Base URL, credentials and a reachable server.
def format_radix(value, base):
if type(value) is not int or type(base) is not int or not 2 <= base <= 36:
raise ValueError("radix.input")
if value == 0:
return "0"
sign, value = ("-" if value < 0 else ""), abs(value)
digits = "0123456789abcdefghijklmnopqrstuvwxyz"
result = ""
while value:
value, remainder = divmod(value, base)
result = digits[remainder] + result
return sign + resultRadix Foundry is a Windows coding workspace for discussing how software represents and exchanges values. Start with the project files and the receiving system’s expectations. When a change affects an identifier, exported field or display string, the AI conversation can focus on whether the representation still carries the meaning your application requires.
An integer-formatting request offers a small but revealing example. Ask the model to inspect a radix formatter and its callers before adding a supported base or changing letter case. Include zero and negative inputs in the requirement, together with the exact output a consumer expects. The task is to develop your code around that contract.
Review the proposal for changes beyond the visible characters. A caller may compare strings, store them or parse them later, so a cosmetic adjustment can become a compatibility issue. Run the relevant checks with representative values and inspect a complete write-and-read path where your project has one. Keep the expected representation explicit in the tests.
You can select an uncensored AI model offered by a supported OpenAI-compatible or Anthropic endpoint. Configure credentials when needed; the provider’s actual restrictions still apply. Context limits and tool support also depend on the selected model and server, rather than on the name of the formatting task.
Not necessarily. A consumer may compare or store the string exactly as produced. Identify those uses before changing case, and ask for an explanation of the affected callers. Test the required representation rather than assuming equivalent numeric meaning is enough.
Specify the error behavior your application expects. Review both the formatter and the caller that receives the failure. Returning a default representation can hide an invalid request, so do not introduce a fallback without an explicit requirement.
They answer different questions. A parser might accept a representation that another system rejects. Use round trips where relevant, but also compare exact strings for cases whose sign, digits or letter case form part of the external contract.
Provide runtime and relevant encoding assumptions along with sanitized fixtures. Review endpoint and tool destinations; even with a separately running local model server, every connected tool is not necessarily local. Share only the context needed for this change.
Radix Foundry · Updated 2026-10-25