When chef Justin Walker and his wife, Danielle, bought the Cape Neddick Inn in May, they pretty much had to throw out the old menu and start over.

“Everything was precooked,” Walker said. “A lot of stuff was held for hours and hours and hours. All the vegetables were from South America. Nothing was local. Some of the seafood was frozen, some of it was from China. We’re in Maine, and virtually none of it was from Maine except for lobster.”

Longtime customers of the restaurant were angry that he deep-sixed the chicken parm and the Statler chicken. They wanted simple food they could recognize – no fancy sauces, no words they couldn’t understand.

So Walker created a simple new “base menu” to get the restaurant through to Nov. 4, when it will close for 10 weeks for renovations before re-opening as Walkers. He’ll hold off on the crudos and interesting vegetable preparations until the new restaurant launches. In the meantime, he is testing dishes on his customers, old and new, to get a feel for their tastes.

“We’re trying to see what they’re into,” he said. “You know, duck can be weird for people. Could we do a guinea hen? I don’t know. So let’s get a few guinea hens and give it a try. That’s where we’re at now.”

Recipe development and testing goes on all the time in restaurant kitchens, but is especially intense in the weeks before opening a new place. It gives chefs the opportunity to make tweaks in dishes that can transform them from just OK into real crowd pleasers. It gives the kitchen staff time to become familiar with ingredients and techniques. And it can help chefs balance their overall menu.

Chefs handle recipe testing in different ways. Some rely solely on their own palates and the advice of their staff. Others bounce dishes off of friends and family.

When the Portland restaurant Chaval was under construction in preparation for its mid-July opening, chef/owners Damian Sansonetti and Ilma Lopez covered everything up at night with tarps and dropcloths so they could test recipes on staff and friends without getting the food dusty, and spot the things they wanted to change.

“There were a couple of things where we just kept going back to the drawing board,” Sansonetti said. “And there were some things that were perfect at the start.”

The black pepper brioche bun that holds the house burger together (and is made with beef tallow) went through several incarnations as they experimented with different flours and tried nail the ratio of bun to meat.

The Spanish tortilla, a simple starter made with potatoes, eggs and onions, went under the flame about a dozen times to get it just right. (Served with garlic aioli, it’s now one of the cooks’ favorite snacks.)

Vien Dobui, chef/owner of Cong Tu Bot, and his sous chef, Joseph Zohn, worked on the pork patty for the Bún Cha – a vermicelli noodle bowl – for a month, getting together once or twice a week and sharing their adjustments as they tried to perfect it.

“I knew what I wanted it to taste like, and I knew how I wanted to cook it in the restaurant – over charcoal to get a nice smoky flavor,” Dobui said.

Dobui and Zohn went through 20 different versions of the patty before hitting the mark. For the final version, they added “really smoky bacon” and a Vietnamese caramel, which Dobui says is like a Vietnamese mother sauce. “It’s basically caramel that’s taken way too far,” he said. “A French cook would think that we’re doing something terribly, terribly wrong. Every Vietnamese family has a jar of caramel.”

Recipe testing starts with inspiration. Much of the menu at Cong Tu Bot is rooted in Dobui’s fond memories of growing up in California and eating “unexpected, comforting food” from tiny restaurants in bustling shopping centers. Inspiration could also be found in family gatherings and the chicken pho Dobui’s mother made for him every time he came home for a visit.

A simple cabbage salad Dobui grew up on “wasn’t sexy enough” for Cong Tu Bot’s menu, the chef fretted, but it’s become one of the restaurant’s more popular items.

Dobui and Zohn traveled to Vietnam last November, and found that for each dish Dobui wanted on his menu, there was a Vietnamese restaurant dedicated to making that dish, and that dish only, “and they’ve been tweaking it for 20 years.” Now Dobui’s personal goal is to make the perfect pho, even if the testing takes two decades.

PUTTING IDEAS TO THE TEST

Sansonetti and Lopez have also been inspired by favorite childhood foods, but the menu at Chaval was influenced mostly by their travels and what they’ve learned working with top French and Spanish chefs. They are, Sansonetti said, always talking about flavor and texture combinations that they really like.

A recipe, Sansonetti said, can start with a list of ingredients, or it can start with how the chef wants the plate to look and work backwards from there. If there’s rabbit in the kitchen, should the dish revolve around the legs only, or should the meat be stuffed into a roulade or wrapped in puff pastry?

Lopez recently created a Spanish sundae, a savory dessert that features ice cream made from ham bones and caramel made from pork fat. The sundae is topped with crispy fried serrano ham. It took her two weeks to develop and test the recipe.

Walker gets his inspiration almost entirely from the seasons. He doesn’t look at cookbooks or consider what other chefs are into, but he does go foraging – he has 70 pounds of maitake mushrooms in his walk-in – and visits local farms. He loves doing things with winter squash, baked beans and pastas this time of year.

Sometimes inspiration is forced upon you, as it was recently for chef Daron Goldstein. Three weeks ago, Goldstein suddenly found himself with an unexpected opportunity to open a new restaurant. He’s in the throes of recipe writing for the new place, called Provender, that he and his wife will open in a few weeks at 112 Main St. in Ellsworth.

Goldstein is planning a “contemporary American” menu that will be attractive to both lawyers and lobstermen. He’s working on a pan-seared scallop dish he’s changed four times so far. The current version includes parsnip puree, apple cider reduction and mushroom ragout.

“It’s not enough,” he said, sighing. “I think I can do better.”

The next version will be “a little more composed” and include celery root, golden raisins, capers, parsnip crisps and brown butter. “I know those flavors go well together,” Goldstein said. “I feel better about that dish now, and I know it’s something can be executed.”

For other chefs, recipe testing can get in the way of the creative process.

Ask Stephanie Brown how far ahead she started planning the menu for North 43 Bistro, which opened in July in South Portland, and she replies: “Two nights before we opened. I’m not kidding.”

“I always seem to do better when it’s like a last-minute homework assignment and I procrastinate,” she said, laughing. “I think the adrenaline and the pressure make me create better.”

And because she gets bored easily, Brown usually changes her menus every three weeks. Hence her motto: A week to learn it, a week to love it, a week to hate it, and then it’s gone. At her new restaurant, she’s stretched that time period to four weeks because she doesn’t want changing the menu to be “more of a strain than a pleasure.”

Brown says she only needs a single ingredient to catch her attention – something as big as a protein or as small as a seed – to trigger inspiration for an entire menu. She also tries to be constantly aware of the market and what’s going on in the world. Are dayboats going out? Will the hurricane in Texas affect beef prices?

Once she has an idea, she sits in front of the computer and writes recipes out of her head, making sure they will balance with everything else on the menu – soft versus crunchy, sweet versus salty, grilled versus sauteed. She knows from experience, she said, what ratios of ingredients work.

On “new menu day,” she walks into the kitchen with her recipes, and her staff starts prepping. They adjust the recipes as they go along, creating a “bible menu packet” with all the changes that have been made that they can follow for the next four weeks. If one particular component of a recipe – say, a batter that will coat fried seafood causes concern – they’ll do a small test.

In the beginning, Brown admits, her crew got a deer-in-the-headlights look whenever she came into the kitchen with new recipes. But now they can’t wait to get rid of menu items and move on.

“It’s funny how they’re now all on board,” Brown said. “It gets them excited and stimulated.”

EAT THE CLOCK

For Walker, testing dishes will be critical to making a smooth transition from the old Cape Neddick Inn to the new Walkers.

He and his staff test two dishes a week. Walker makes a lot of notes, and watches his staff’s reactions when they taste something.

“If you truly want to do menu development,” he said, “you have to give yourself time and you have to be patient.”

To try to keep the restaurant’s longtime customers from walking away, Walker has been replacing some dishes with fresh new ones, and putting a modern twist on others. The old menu, for example, featured a salad that Walker called “the cliche of cliches” – made with arugula, goat cheese and dried cranberries. He replaced it with a salad of kale and broccoli greens dressed in a vinaigrette that includes fish sauce, serrano chiles, lime juice and spicy peanuts. “People started going crazy over it,” he said.

Walker replaced the frozen-at-sea Icelandic haddock (baked with crushed Ritz crackers and dehydrated parsley on top) with a pan-roasted local hake basted in brown butter and served with new potatoes, roasted turnips and an herb salad.

Probably the most successful dish has been the pork loin, which replaced a pork schnitzel made from frozen pork cutlets and served with “mashed potatoes that were made at 9 o’clock in the morning with garlic powder in them.”

Walker’s version is brined, pan-roasted pork tenderloin served with chicharrones, creamed kale, wood-roasted carrots in brown butter, and peach agrodolce.

“The flavors are designed to work together. The textures are designed to work together,” Walker said. “(The customers) don’t know why it’s good, but they know it is good.”

“They’re being patient. We’re being patient,” he said, “and I think it will end up working out.”