Abstract Wiki Architect/Contributor Guide
⚠️ Disclaimer: This project is the sole independent work of Réjean McCormick. It is not affiliated with, endorsed by, or representing the Wikimedia Foundation.
Contributor Guide
[edit]This guide outlines the standard workflows for contributing to the Abstract Wiki Architect. Because the system uses a Hybrid Factory architecture, the method you use to contribute depends on the maturity level of the language you are working on.
The Contribution Waterfall
[edit]Before starting, identify which "Tier" your contribution falls into:
- Tier 3 (Factory): The language is missing entirely. You need to register it so the system can auto-generate a basic grammar.
- Tier 2 (Contrib): The language exists but is basic (Pidgin). You want to manually write or paste a better grammar to "graduate" it.
- Tier 1 (RGL): The language is part of the official core. You need to update the submodule.
Scenario A: Adding a "Missing" Language (Tier 3)
[edit]Goal: Add a language (e.g., Hausa `hau`) that is currently completely missing from the system.
Action:
- Open the Factory configuration file: `utils/grammar_factory.py`.
- Add the language definition to the configuration dictionary using its ISO code. You must specify the basic word order (e.g., SVO, SOV).
- Run the build script.
# In utils/grammar_factory.py
"hau": {
"name": "Hausa",
"order": "SVO"
}
Result:
- The next time `gf/build_300.py` runs, it will detect the new entry.
- It will automatically generate `WikiHau.gf` in the `gf/generated/` folder.
- The language is now available in the API (Tier 3 status).
Scenario B: "Graduating" a Language (Tier 2)
[edit]Goal: Replace a low-quality "Pidgin" grammar (Tier 3) with a high-quality manual grammar (Tier 2).
Action:
- Create a new folder for your language in the contributions directory: `gf/contrib/{iso_code}/` (e.g., `gf/contrib/zul/` for Zulu).
- Create your manual grammar file (e.g., `WikiZul.gf`) inside this folder.
- (Optional) Use the AI Grammar Refiner tool to help generate the initial syntax rules.
Result:
- The build orchestrator (`gf/build_300.py`) automatically prioritizes the `gf/contrib` folder over `gf/generated`.
- It ignores the auto-generated Pidgin version and compiles your manual version instead.
- The language has effectively "graduated" to Tier 2.
Scenario C: Updating Core Languages (Tier 1)
[edit]Goal: Update standard languages like English or French.
Action: Since these languages are managed by the official Resource Grammar Library (RGL), do not edit them manually in the project files. Instead, update the submodule:
cd gf/gf-rgl/
git pull origin master
Verification & Testing
[edit]After adding or modifying a language, you must verify that it compiles and generates text correctly.
Run the Dynamic Tester: Execute the test script to verify that your new language is recognized by the binary.
python test_gf_dynamic.py
If successful, the script will output the linearization status for all active languages, including your new addition.