Skip to content

Commit 48f124e

Browse files
Enhance wiki-guide.mdc with updated linking standards and handling of missing targets. Introduce card_index.txt as the primary source for internal link validation and refine the process for creating new cards. Remove obsolete GitHub Actions workflow for card checks.
1 parent 56f31cb commit 48f124e

File tree

4 files changed

+257
-13
lines changed

4 files changed

+257
-13
lines changed

.cursor/rules/wiki-guide.mdc

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,21 @@ To maintain consistency, each card type has specific content structure and forma
4545
These guidelines apply to all cards and content within the wiki.
4646

4747
### Linking Standards
48+
- **Card Index File:**
49+
- A file named `card_index.txt`, expected to be located in the workspace root, is generated periodically.
50+
- This file contains a list of all valid card names (without the `.md` extension), one per line.
51+
- The AI assistant **MUST** consider `card_index.txt` as the primary source of truth for existing card names when creating or validating internal links.
4852
- **Internal Links (`[[Page Name]]`):**
49-
- Links **must** point to existing card files (case-sensitive filename, `.md` implied) located **directly within the `cards` directory**.
50-
- **Verification is mandatory:** Before adding an internal link, confirm the target file exists (use `list_dir` or `file_search`).
53+
- Links **must** point to existing card files (case-sensitive filename, `.md` implied by the linking syntax) located **directly within the `cards` directory**.
54+
- **Verification is mandatory:** Before adding an internal link, the AI assistant **MUST** first attempt to read `card_index.txt`. Confirm that the target `Page Name` (from `[[Page Name]]`) exists in this list.
55+
- If `card_index.txt` cannot be read, is unavailable, or the card name is not found, the AI assistant should then use `file_search` for `Page Name.md` within the `cards` directory as a fallback verification method.
5156
- **No Broken Links:** Broken internal links are strictly forbidden.
52-
- **Handling Missing Targets:** If a potentially useful link target doesn't exist, the AI assistant **MUST**:
53-
1. Determine the most appropriate card category for the new concept (e.g., `#explain-card`, `#show-card`).
54-
2. Create the new card file (e.g., `cards/New Concept.md`) **directly within the `cards` directory**, adhering to all naming conventions (uppercase first letter, appropriate filename).
55-
3. Add the chosen category tag as the very first line of the new card file.
56-
4. Generate initial, relevant content for this new card based on its chosen category, the context of the link, and available knowledge. The goal is to create a useful stub, not just an empty file. Refer to the specific card type rules for content guidance.
57-
5. If creating a populated stub is not feasible or the concept is too broad/unknown, the link should be omitted. **Do not create empty or near-empty files.**
57+
- **Handling Missing Targets:** If a potentially useful link target (e.g., `[[New Concept]]`) doesn't exist (i.e., `New Concept` is not found in `card_index.txt` and `cards/New Concept.md` is confirmed not to exist via file search), the AI assistant **MUST**:
58+
1. Determine the most appropriate card category for the new concept (e.g., `#explain-card`, `#show-card`).
59+
2. Create the new card file (e.g., `cards/New Concept.md`) **directly within the `cards` directory**, adhering to all naming conventions (uppercase first letter, appropriate filename).
60+
3. Add the chosen category tag as the very first line of the new card file.
61+
4. Generate initial, relevant content for this new card based on its chosen category, the context of the link, and available knowledge. The goal is to create a useful stub, not just an empty file. Refer to the specific card type rules for content guidance.
62+
5. If creating a populated stub is not feasible or the concept is too broad/unknown, the link should be omitted. **Do not create empty or near-empty files.**
5863
- **External Links (`[Text](mdc:URL)`):**
5964
- Prioritize links to **official websites, documentation, or primary sources**, especially for projects, tools, and resources.
6065
- Use **descriptive link text** (e.g., `[Official Ethereum Website]`) instead of generic terms like "here" or "link".
@@ -81,11 +86,11 @@ As an AI assistant, your role is to proactively maintain and improve the Web3 Wi
8186
3. **Identify Improvements:** Look for cards that violate rules or could be improved. This includes checking for:
8287
- Completeness, clarity, and accuracy.
8388
- Outdated information (use web search/fetch to verify).
84-
- Broken or irrelevant internal/external links (use file search/web search/fetch to verify).
89+
- Broken or irrelevant internal/external links (use file search/web search/fetch to verify, and `card_index.txt` for internal links).
8590
4. **Implement Changes:** Propose and apply specific, constructive changes to address identified issues, clearly stating the intent. Use web search and fetching tools to gather up-to-date information for content revisions.
8691
5. **Link Management:**
87-
- Actively create relevant internal links, ensuring they are valid by **verifying target file existence first**.
88-
- When a target is missing, follow the updated `Handling Missing Targets` rule (i.e., determine category, create the card file **in the `cards` directory with initial content**, or omit the link).
92+
- Actively create relevant internal links, ensuring they are valid by **first checking `card_index.txt` (expected at the workspace root) for the target card name, and then as a fallback, verifying target file existence using `file_search` if needed**.
93+
- When a target is missing (i.e., not found in `card_index.txt` or via file search), follow the `Handling Missing Targets` rule (i.e., determine category, create the card file **in the `cards` directory with initial content**, or omit the link).
8994
- Ensure external links adhere to the `Linking Standards`, using web search/fetch for verification.
9095
6. **Card Creation:**
9196
- When creating new cards (e.g., to fulfill a missing link as per `Handling Missing Targets`, or by direct user request), ensure they are created **directly and exclusively within the `cards` directory**. This path (`cards/FILENAME.md`) is non-negotiable.
@@ -108,7 +113,7 @@ As an AI assistant, your role is to proactively maintain and improve the Web3 Wi
108113
- **Card Tag and Rule Compliance:**
109114
Ensure every created or updated card starts with the correct card tag and fully complies with its specific rule file. The content must be comprehensive, well-structured, and informative, not just a summary or outline.
110115
- **Internal Link Validation:**
111-
Verify that every internal link points to an existing, up-to-date card. There must be no broken or outdated links. If a relevant card does not exist, create it with substantive content before finalizing the current card.
116+
Verify that every internal link points to an existing, up-to-date card. This involves checking the target card name against `card_index.txt` (expected at the workspace root) and ensuring the target file (`cards/TargetCard.md`) exists. There must be no broken or outdated links. If a relevant card does not exist (i.e., not listed in `card_index.txt` and confirmed non-existent), create it with substantive content before finalizing the current card.
112117
- **Cross-Linking and Knowledge Integration:**
113118
Review the card for any mention of concepts, projects, or technologies that could be linked to existing cards. Add internal links with explanatory context, and update those linked cards if they are lacking in detail or accuracy.
114119
- **Section Depth and Breadth:**
@@ -117,4 +122,6 @@ As an AI assistant, your role is to proactively maintain and improve the Web3 Wi
117122
Where possible, provide references to primary sources, official documentation, or reputable third-party analyses. Use descriptive link text and ensure all external links are current and relevant.
118123
- **No Superficial Content:**
119124
Avoid brief, generic, or placeholder content. Every card should aim to be a definitive, standalone resource on its topic, similar in quality and depth to a well-maintained Wikipedia article.
120-
125+
- **Run Script Checks**:
126+
1. Run the `check-tags.py` script and fix any reported errors.
127+
2. Run the `check-internal-links.py` script and fix any reported errors. This script should ideally use or be consistent with `card_index.txt`.

.github/card_index.txt

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
AMA
2+
AMM
3+
API
4+
ASIC Resistant
5+
ATH
6+
ATL
7+
Acala
8+
Airdrop
9+
Alchemy
10+
Altcoin
11+
Anti-Money Laundering (AML)
12+
Arbitrum
13+
Artificial Intelligence
14+
Astar
15+
Avalanche
16+
Awesome Darwinia
17+
Awesome Ethereum
18+
Awesome Faucets
19+
Awesome Polkadot
20+
Awesome Solana
21+
Awesome Substrate
22+
Awesome Web3Tools
23+
BNB Chain
24+
Bagholder
25+
Base
26+
Beacon Chain
27+
Bearish
28+
Berachain
29+
Binance
30+
Binance Smart Chain
31+
Bitcoin
32+
Blast
33+
Blast Network
34+
Block
35+
Bloodbath
36+
Bounty
37+
Bullish
38+
Burned Tokens
39+
Buy Wall
40+
ByBit's $1.4 Billon ETH Hack
41+
Byzantine Fault
42+
Centralized Exchange (CEX)
43+
Chainlink
44+
Circulating Supply
45+
Coinbase
46+
Cold Wallet
47+
Consensus
48+
Counter-Terrorist Financing (CTF)
49+
CrossFi
50+
Crowdsale
51+
Crypto Bubble
52+
CryptoKitties
53+
Custody
54+
Cyber
55+
DAA
56+
DAO
57+
DApp
58+
DDOS
59+
DEX
60+
DYOR
61+
Darwinia
62+
Darwinia Network
63+
Data Security
64+
DeFI
65+
DeGov.AI
66+
Decentralized Finance (DeFi)
67+
Decentralized Identity (DID)
68+
Dencun Upgrade (EIP-4844)
69+
Diem
70+
Difficulty
71+
Double-spend
72+
Dusting Attack
73+
EIP
74+
ENS
75+
EOA
76+
ERC Standards
77+
ERC-20
78+
ERC-721
79+
ETF
80+
EVM
81+
Ethereum
82+
Ethereum Improvement Proposal 1559 (EIP-1559)
83+
Ethereum Request for Comments 1155 (ERC-1155)
84+
Ethereum Request for Comments 721 (ERC-721)
85+
Ethereum Yellow Paper
86+
Etherscan
87+
Faucet
88+
Fear of Missing Out
89+
Fiat-Pegged Cryptocurrency
90+
Financial Inclusion
91+
Fully Diluted Valuation (FDV)
92+
Gas
93+
Gas Limit
94+
Genesis Block
95+
Gm
96+
Gwei
97+
Halving
98+
Hard cap
99+
Hard fork
100+
ICO
101+
IPO
102+
IYKYK
103+
InfoFi
104+
Infura
105+
Ink
106+
Kaito
107+
Know Your Customer (KYC)
108+
Layer 2
109+
Lazarusbounty
110+
Ledger
111+
Lens
112+
Libra
113+
Linea
114+
Liquidity
115+
Lumia
116+
Mantle
117+
Market Maker
118+
Market Taker
119+
Memecoin
120+
Mempool
121+
Merkle Tree
122+
MetaMask
123+
Miner
124+
Mnemonic Phrase
125+
Moonbeam
126+
Morph
127+
Move
128+
Multisignal
129+
Mysten Labs
130+
NFT
131+
Nakamoto Coefficient
132+
Near
133+
Node
134+
Nonce
135+
OTC
136+
Off-chain transaction
137+
On-chain governance
138+
OpenZeppelin
139+
Optimism
140+
Optimism Stack (OP Stack)
141+
Oracle
142+
Parachain
143+
Pectra Upgrade
144+
Pi Network
145+
Polkadot
146+
Polygon
147+
Portfolio
148+
Privacy Coins
149+
Private Keys
150+
Private key
151+
Proof of Authority (PoA)
152+
Proof of stake
153+
Proof of work
154+
Public Keys
155+
Rat Trading
156+
Regulation
157+
Replay Attack
158+
Return On Investment (ROI)
159+
Revoke.Cash
160+
Rollup
161+
Rugpull
162+
Salt
163+
Satoshi
164+
Satoshi Nakamoto
165+
Scroll Network
166+
Seed
167+
Smart Contract
168+
Snapshot
169+
Soft fork
170+
Solana
171+
Solidity
172+
Soneium
173+
Soulbound Tokens
174+
Stablecoin
175+
Staking
176+
Starknet
177+
Story
178+
Subscan
179+
Substrate
180+
Sui (SUI)
181+
TRON
182+
Tezos
183+
The Merge
184+
Total Value Locked (TVL)
185+
Trading Volume
186+
Transactions Per Second (TPS)
187+
Turing-Complete
188+
UniChain
189+
Upgradeable Smart Contracts
190+
Validator
191+
Vitalik Buterin
192+
Web3
193+
Web3 Wiki
194+
Wei
195+
Whale
196+
When Lambo
197+
When Moon
198+
Whitelist
199+
World Chain
200+
XAI
201+
Yield Farming
202+
ZKSync
203+
Zero-Knowledge Proof (ZKP)
204+
Zero-Knowledge Succinct Non-Interactive Argument of Knowledge (zk-SNARKs)
205+
custodial wallet
206+
hardware wallet
207+
hot wallet
208+
phantom
209+
self custody wallet
210+
wallet
211+
zkKYC
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import os
2+
3+
def generate_card_index():
4+
cards_dir = "cards"
5+
output_file = ".github/card_index.txt"
6+
card_names = []
7+
8+
if not os.path.isdir(cards_dir):
9+
print(f"Error: Directory '{cards_dir}' not found.")
10+
return
11+
12+
for filename in os.listdir(cards_dir):
13+
if filename.endswith(".md"):
14+
card_names.append(os.path.splitext(filename)[0])
15+
16+
with open(output_file, "w") as f:
17+
for name in sorted(card_names): # Sort the names for consistency
18+
f.write(name + "\n")
19+
20+
print(f"Successfully generated '{output_file}' with {len(card_names)} card names.")
21+
22+
if __name__ == "__main__":
23+
generate_card_index()

.github/workflows/check-cards.yml renamed to .github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
- name: Checkout repository
1111
uses: actions/checkout@v2
1212

13+
- name: Generate card index
14+
run: python3 .github/scripts/generate-card-index.py
15+
1316
- name: Set up Python
1417
uses: actions/setup-python@v2
1518
with:

0 commit comments

Comments
 (0)